diff --git a/components/BlogStatBox.vue b/components/BlogStatBox.vue index 3753b0a..b00e554 100644 --- a/components/BlogStatBox.vue +++ b/components/BlogStatBox.vue @@ -2,6 +2,7 @@ import dayjs from "dayjs"; import utc from "dayjs/plugin/utc.js"; import type { BlogParsedContent } from "@/shared/types"; +import { calcReadingTime } from "@/shared/readingTime"; dayjs.extend(utc); @@ -26,33 +27,28 @@ const prettyDate = latestDate.format("DD MMM YYYY"); >

{{ latest.title }}

- {{ prettyDate }} · {{ latest.readingTime.text }} + {{ prettyDate }} · {{ calcReadingTime(latest).minutes }} min read

{{ tag }}
- -

- {{ latest.description }} … -

diff --git a/components/PostPreviewCard.vue b/components/PostPreviewCard.vue new file mode 100644 index 0000000..5accea2 --- /dev/null +++ b/components/PostPreviewCard.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/components/StoryStatBox.vue b/components/StoryStatBox.vue index b8b9e33..1dfb943 100644 --- a/components/StoryStatBox.vue +++ b/components/StoryStatBox.vue @@ -2,6 +2,7 @@ import dayjs from "dayjs"; import utc from "dayjs/plugin/utc.js"; import { type StoryParsedContent } from "@/shared/types"; +import { calcReadingTime } from "@/shared/readingTime"; dayjs.extend(utc); @@ -26,35 +27,28 @@ const prettyDate = latestDate.format("DD MMM YYYY"); >

{{ latest.title }}

- {{ prettyDate }} · {{ latest.readingTime.words }} words + {{ prettyDate }} · {{ calcReadingTime(latest).words.total }} words

{{ tag }}
- -

- {{ latest.description }} ... -

diff --git a/components/Tag.vue b/components/Tag.vue index dbadfb5..e716b09 100644 --- a/components/Tag.vue +++ b/components/Tag.vue @@ -1,11 +1,17 @@