-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthor-card.tsx
More file actions
61 lines (57 loc) · 1.93 KB
/
author-card.tsx
File metadata and controls
61 lines (57 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { Twitter, Github, Linkedin } from "lucide-react";
import { BlogConfig } from "./config";
interface AuthorCardProps {
authorId: string;
config: BlogConfig;
}
export function AuthorCard({ authorId, config }: AuthorCardProps) {
const author = config.authors[authorId];
if (!author) return null;
return (
<div className="mt-16 pt-8 border-t border-gray-800">
<div className="flex gap-4 items-start">
<img
src={author.avatar}
alt={author.name}
className="w-[60px] h-[60px] rounded-full object-cover"
/>
<div className="flex-1">
<h3 className="text-lg font-semibold mb-2">{author.name}</h3>
<p className="text-gray-400 mb-4">{author.bio}</p>
<div className="flex gap-4">
{author.social.twitter && (
<a
href={`https://twitter.com/${author.social.twitter}`}
className="text-gray-400 hover:text-white transition-colors"
target="_blank"
rel="noopener noreferrer"
>
<Twitter className="w-5 h-5" />
</a>
)}
{author.social.github && (
<a
href={`https://github.com/${author.social.github}`}
className="text-gray-400 hover:text-white transition-colors"
target="_blank"
rel="noopener noreferrer"
>
<Github className="w-5 h-5" />
</a>
)}
{author.social.linkedin && (
<a
href={`https://www.linkedin.com/in/${author.social.linkedin}`}
className="text-gray-400 hover:text-white transition-colors"
target="_blank"
rel="noopener noreferrer"
>
<Linkedin className="w-5 h-5" />
</a>
)}
</div>
</div>
</div>
</div>
);
}