diff --git a/docs/working-notes/todo3.md b/docs/working-notes/todo3.md index de82124..4ec177c 100644 --- a/docs/working-notes/todo3.md +++ b/docs/working-notes/todo3.md @@ -437,10 +437,13 @@ open images in new tab and check all sizes links in md colors fix table of contents styling retest vertical spacing, font-size and content width + // maybe -astro transitions + astro transitions, works for PostCard on blog, tags, categories, explore -------- ask about optimal max-width image width fix .mdx live reload +firefox has white flash bug on theme change after transitions, https://youtu.be/9MChTVlXbf8?t=363 + ``` diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index b02dbb9..717e993 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -106,5 +106,5 @@ const ogImageUrl = new URL(image, baseUrl); --> - + diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index 99f27aa..d39bb79 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -9,6 +9,7 @@ import TagList from '@/components/TagList.astro'; import { draftText } from '@/constants/data'; import { IMAGE_SIZES } from '@/constants/image'; import { ROUTES } from '@/constants/routes'; +import { setTransitionSlug, TRANSITION_ELEMENT_IDS } from '@/constants/transitions'; import { formatDate, formatDateIso } from '@/utils/datetime'; import { cn } from '@/utils/styles'; @@ -39,6 +40,8 @@ const { lastAccessDate, isUpdatedDate } = getPublishedOrUpdatedDate({ publishDate, updatedDate, }); + +const getTransitionNameFromElementId = setTransitionSlug({ pageSlug: slug }); ---
) @@ -67,7 +72,12 @@ const { lastAccessDate, isUpdatedDate } = getPublishedOrUpdatedDate({ {/* right column */}
{/* category and publishDate row*/} -
+
{/* title */} -

+

{title} {draft && {draftText}}

- {description &&

{description}

} + { + description && ( +

+ {description} +

+ ) + } {/* reading time and read more link */}
diff --git a/src/components/PostCardSmall.astro b/src/components/PostCardSmall.astro index 5bfecf1..b761199 100644 --- a/src/components/PostCardSmall.astro +++ b/src/components/PostCardSmall.astro @@ -7,6 +7,7 @@ import Link from '@/components/Link.astro'; import { draftText } from '@/constants/data'; import { IMAGE_SIZES } from '@/constants/image'; import { ROUTES } from '@/constants/routes'; +import { setTransitionSlug, TRANSITION_ELEMENT_IDS } from '@/constants/transitions'; import { formatDate, formatDateIso } from '@/utils/datetime'; import { cn } from '@/utils/styles'; @@ -25,6 +26,8 @@ const { lastAccessDate, isUpdatedDate } = getPublishedOrUpdatedDate({ publishDate, updatedDate, }); + +const getTransitionNameFromElementId = setTransitionSlug({ pageSlug: slug }); ---