add wordcount to read time title, shrink footer text size a bit

This commit is contained in:
2025-11-14 18:36:28 +13:00
parent 8b8d03f2cf
commit 3c61f85091
3 changed files with 4 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ const links = [
] ]
--- ---
<footer class="text-xl mt-auto"> <footer class="text-lg mt-auto">
{ {
links.map((l, i) => ( links.map((l, i) => (
<> <>

View File

@@ -1,10 +1,10 @@
--- ---
import { getFormattedDate } from '@utils/date' import { getFormattedDate } from '@utils/date'
const { publishDate, readTime, tags } = Astro.props const { publishDate, wordCount, readTime, tags } = Astro.props
--- ---
<time datetime={publishDate}>{getFormattedDate(publishDate)}</time> | <time datetime={publishDate}>{getFormattedDate(publishDate)}</time> |
{readTime} min. read | <span title={`${wordCount} words`}>{readTime} min. read</span> |
{ {
tags.map((tag, i) => ( tags.map((tag, i) => (
<> <>

View File

@@ -30,6 +30,7 @@ const readTime = calcReadTime(wordCount);
<PostInfo <PostInfo
publishDate={publishDate}, publishDate={publishDate},
wordCount={wordCount},
readTime={readTime}, readTime={readTime},
tags={post.tags} tags={post.tags}
/> />