From 500d9e2ea03c07bc819132b91c99e12cd8d5fc56 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Fri, 13 Mar 2026 10:59:25 -0500 Subject: [PATCH] feat: move script handling to use swup instead of astro transitions, move animations to baselayout --- src/components/Header.astro | 2 - .../buttons/ThemeToggleButton.astro | 163 ++++++++---------- .../sections/SelectedPostsSection.astro | 2 +- src/layouts/BaseLayout.astro | 53 +++++- src/pages/404.astro | 18 -- src/pages/about.astro | 30 ---- src/pages/all.astro | 53 ------ src/pages/apps.astro | 20 --- src/pages/blog/[...slug].astro | 17 -- src/pages/blog/index.astro | 53 ------ src/pages/categories/[...slug].astro | 53 ------ src/pages/categories/index.astro | 53 ------ src/pages/index.astro | 59 ------- src/support/animation.ts | 50 ------ 14 files changed, 128 insertions(+), 498 deletions(-) delete mode 100644 src/support/animation.ts diff --git a/src/components/Header.astro b/src/components/Header.astro index e7ccf02..cd25ca3 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -95,5 +95,3 @@ const currentPath = pathname.slice(1); - - diff --git a/src/components/buttons/ThemeToggleButton.astro b/src/components/buttons/ThemeToggleButton.astro index 75dcf89..69b5b6a 100644 --- a/src/components/buttons/ThemeToggleButton.astro +++ b/src/components/buttons/ThemeToggleButton.astro @@ -49,100 +49,88 @@ (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches); document.documentElement.classList.toggle('dark', isDark); }; - applyTheme(); - - document.addEventListener('astro:after-swap', applyTheme); + + + +