From e88144ab670e7585f998ce9d54236d5cc77d6bd4 Mon Sep 17 00:00:00 2001 From: IwanIDev Date: Fri, 27 Mar 2026 16:14:29 +0000 Subject: refactor: made the home page blog post cards and the blog post card header more consistent They are now the same component. I've renamed the component from PostHeader to BlogPostCard, which is more accurate now. --- src/components/BlogPosts.astro | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/components/BlogPosts.astro') diff --git a/src/components/BlogPosts.astro b/src/components/BlogPosts.astro index 48b94f0..87a75f4 100644 --- a/src/components/BlogPosts.astro +++ b/src/components/BlogPosts.astro @@ -1,6 +1,8 @@ --- import { getCollection } from 'astro:content'; import { Card, CardContent, CardDescription, CardHeader } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import PostHeader from "@/components/PostHeader.astro"; // Fetch all blog posts from the content collection const posts = await getCollection('blog'); @@ -22,18 +24,13 @@ const dateFormatter = new Intl.DateTimeFormat('en-GB', {
{sortedPosts.map((post) => ( - - -

{post.data.title}

- {post.data.description} -
- -
- {dateFormatter.format(post.data.publishDate)} - by {post.data.author} -
-
-
+
))}
-- cgit