diff --git a/src/components/animate-in.tsx b/src/components/animate-in.tsx index 1c703fb..f5fb962 100644 --- a/src/components/animate-in.tsx +++ b/src/components/animate-in.tsx @@ -25,8 +25,9 @@ export function AnimateIn({ children, delay = 0, threshold = 0.15 }: AnimateInPr const rect = el.getBoundingClientRect(); const inView = rect.top < window.innerHeight && rect.bottom > 0; const isReload = (performance.getEntriesByType?.("navigation")?.[0] as PerformanceNavigationTiming)?.type === "reload"; + const isSpaNav = !!(window as any).__astroNavigation; - if (inView && isReload) { + if (inView && (isReload || isSpaNav)) { setSkip(true); setVisible(true); return; diff --git a/src/layouts/content.astro b/src/layouts/content.astro index 3b974b2..0aeabf5 100644 --- a/src/layouts/content.astro +++ b/src/layouts/content.astro @@ -40,28 +40,51 @@ const ogImage = "https://timmypidashev.dev/og-image.jpg"; handleFocus={false} /> - - +
+