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/BlogPostCard.astro | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/components/BlogPostCard.astro (limited to 'src/components/BlogPostCard.astro') diff --git a/src/components/BlogPostCard.astro b/src/components/BlogPostCard.astro new file mode 100644 index 0000000..875ddca --- /dev/null +++ b/src/components/BlogPostCard.astro @@ -0,0 +1,34 @@ +--- +import { Card, CardContent, CardDescription, CardHeader, CardFooter } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Separator } from "@/components/ui/separator"; + +interface Props { + title: string; + slug: string; + description: string; + author: string; + publishDate: Date; +} + +const { title, slug, description, author, publishDate } = Astro.props as Props; + +const dateFormatter = new Intl.DateTimeFormat('en-GB', { + day: '2-digit', + month: 'long', + year: 'numeric', +}); +--- + + + +

{title}

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