From 393eb3f87e86e71e0c3ad67b596e1d4800241ea4 Mon Sep 17 00:00:00 2001 From: Neeldhara Misra Date: Sun, 22 Feb 2026 12:12:37 +0530 Subject: [PATCH] Add date prefix to blog listings and fix Hyvor reload on navigation - ArrowCard now shows DD/MM. prefix before post descriptions - Hyvor comments reload properly after View Transitions navigation Co-Authored-By: Claude Opus 4.5 --- src/components/ArrowCard.astro | 8 +++++++- src/components/Hyvor.astro | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/components/ArrowCard.astro b/src/components/ArrowCard.astro index 80cad83..1958f63 100644 --- a/src/components/ArrowCard.astro +++ b/src/components/ArrowCard.astro @@ -8,6 +8,12 @@ type Props = { const { entry } = Astro.props as { entry: CollectionEntry<"blog"> | CollectionEntry<"projects">; }; + +// Format date as DD/MM +const date = entry.data.date; +const day = date.getDate().toString().padStart(2, '0'); +const month = (date.getMonth() + 1).toString().padStart(2, '0'); +const datePrefix = `${day}/${month}. `; ---
- {entry.data.description} + {datePrefix}{entry.data.description}
{ el.style.display = 'none'; }); } - + // Run multiple times after Hyvor loads [500, 1000, 2000, 3000].forEach(delay => { setTimeout(hideReactionText, delay); }); + + // Reinitialize Hyvor after View Transitions navigation (only add listener once) + if (!window._hyvorPageLoadListenerAdded) { + window._hyvorPageLoadListenerAdded = true; + document.addEventListener('astro:page-load', function reloadHyvor() { + const commentsEl = document.querySelector('hyvor-talk-comments'); + if (commentsEl && window.hyvorTalk && typeof window.hyvorTalk.reload === 'function') { + window.hyvorTalk.reload(); + } + }); + }