Unify scroll reveals, hero entrance, nav active-underline, button springs, the scroll-progress bar and backdrop parallax under one Motion system (src/scripts/anim.ts), bundled into a self-hosted /_astro module so CSP script-src 'self' holds. Progress bar + parallax now scroll()-driven and cross-browser (was Chromium-only animation-timeline). Fail-open, reduced-motion aware, content fully visible with JS off.
This commit is contained in:
@@ -70,5 +70,11 @@ const ogImage = new URL(site.ogImage, site.url).href;
|
||||
<slot />
|
||||
</main>
|
||||
<Footer />
|
||||
|
||||
<!-- Motion (motion.dev) animation layer. NOT is:inline → Astro/Vite bundles
|
||||
it to a self-hosted /_astro/[hash].js (has src=) → strict CSP holds. -->
|
||||
<script>
|
||||
import "../scripts/anim.ts";
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user