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}

} + +
+ +
+ + -
+