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(); + } + }); + }