From a37955cbecaacf31e8f16d8dab3ba734e2799ddc Mon Sep 17 00:00:00 2001 From: June Date: Tue, 18 Nov 2025 14:15:05 +1300 Subject: [PATCH] Greatly improve postCard design --- web/src/components/postList/postCard.astro | 26 +++++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/web/src/components/postList/postCard.astro b/web/src/components/postList/postCard.astro index 0b49301..e186233 100644 --- a/web/src/components/postList/postCard.astro +++ b/web/src/components/postList/postCard.astro @@ -1,27 +1,41 @@ --- -import { getFormattedDate } from "@utils/date" +import { calcReadTime } from "@utils/post" import { authPB } from "@utils/pocketbase" +import PostInfo from "@components/post/postInfo" const pb = await authPB() const { p } = Astro.props + +const wordCount = p.content.split(' ').length; +const readTime = calcReadTime(wordCount); --- -
+
- -

{p.title}

+

{p.title}

{ p.description !== "" && - {p['description']} +

{p.description}

} + +
+ +
+ + -
+