diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44a2fc7..123bae3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: feed: specifier: ^5.0.1 version: 5.0.1 + gsap: + specifier: ^3.13.0 + version: 3.13.0 markdown-it: specifier: ^14.1.0 version: 14.1.0 @@ -2191,6 +2194,9 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + gsap@3.13.0: + resolution: {integrity: sha512-QL7MJ2WMjm1PHWsoFrAQH/J8wUeqZvMtHO58qdekHpCfhvhSL4gSiz6vJf5EeMP0LOn3ZCprL2ki/gjED8ghVw==} + gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -6284,6 +6290,8 @@ snapshots: graphemer@1.4.0: {} + gsap@3.13.0: {} + gzip-size@6.0.0: dependencies: duplexer: 0.1.2 diff --git a/src/components/Button.astro b/src/components/Button.astro index 353962d..fa282f2 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -93,15 +93,15 @@ function setupThemeToggle() { } // Temporarily add markers during animation to implement view transition and disable CSS transitions - document.documentElement.style.setProperty('view-transition-name', 'theme-transition') - document.documentElement.setAttribute('data-theme-transition', '') + document.documentElement.style.setProperty('view-transition-name', 'animation-theme-toggle') + document.documentElement.setAttribute('data-theme-changing', '') // If browser supports View Transitions API, use it to update theme const themeTransition = document.startViewTransition(updateTheme) // Remove markers after animation themeTransition.finished.then(() => { document.documentElement.style.removeProperty('view-transition-name') - document.documentElement.removeAttribute('data-theme-transition') + document.documentElement.removeAttribute('data-theme-changing') }) }) }) diff --git a/src/components/Header.astro b/src/components/Header.astro index 01ecec4..f47df3e 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -32,7 +32,7 @@ const SubtitleTag = isPost ? 'div' : 'h2'