From 77bf0bfa7415b29332ce3f68f0a5529f2dcd7e36 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:46:21 +0200 Subject: [PATCH] feat(hero): rotate three positioning lines on a 10s cycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All three lines render in the DOM; CSS drives the fade via data-active. Reduced-motion users see the first line only (no interval, no fade). Rotation pauses on hover and keyboard focus. aria-live=off on the rotator so AT does not announce every swap; aria-hidden flips per-swap to avoid duplicate heading announcements. Also set vite.build.assetsInlineLimit=0 in astro.config.mjs so Astro emits the rotator script as a same-origin external file (dist/assets/) rather than inlining it — required for CSP script-src 'self' compliance. --- astro.config.mjs | 5 +++ src/components/sections/Hero.astro | 64 +++++++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index e1dbf77..9f74347 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -19,6 +19,11 @@ export default defineConfig({ vite: { build: { cssMinify: 'lightningcss', + // Prevent Astro from inlining small scripts into the HTML. + // Without this, the hero rotator script (< 4 KB) gets inlined as a + //