initial commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import Link from 'next/link';
|
||||
import { BlogPost } from '@/lib/content';
|
||||
|
||||
interface BlogCardProps {
|
||||
post: BlogPost;
|
||||
}
|
||||
|
||||
export function BlogCard({ post }: BlogCardProps) {
|
||||
return (
|
||||
<Link
|
||||
href={`/blog/${post.slug}`}
|
||||
className="block group"
|
||||
>
|
||||
<article className="space-y-3">
|
||||
<time className="text-sm text-muted-foreground">
|
||||
{new Date(post.date).toLocaleDateString('en-US', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
})}
|
||||
</time>
|
||||
<h3 className="text-xl font-semibold text-foreground group-hover:text-primary transition-colors">
|
||||
{post.title}
|
||||
</h3>
|
||||
<p className="text-base text-muted-foreground line-clamp-2">
|
||||
{post.excerpt}
|
||||
</p>
|
||||
</article>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user