From ee45c0a8a527e26bdb43180fa4d0d931e8b2e431 Mon Sep 17 00:00:00 2001 From: Marco Walz Date: Tue, 28 Apr 2026 14:17:11 +0200 Subject: [PATCH] infra(nav): replace theme dropdown with icon toggle button Overrides Starlight's ThemeSelect with a single sun/moon button. Drops the three-option select (light/dark/auto) since ThemeProvider already hard-codes light as default and never uses auto. One click instead of two; aria-label updates on each toggle for accessibility. --- astro.config.mjs | 1 + src/components/ThemeSelect.astro | 86 ++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 src/components/ThemeSelect.astro diff --git a/astro.config.mjs b/astro.config.mjs index 234832ac..6c348667 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -29,6 +29,7 @@ export default defineConfig({ Hero: "./src/components/Hero.astro", SiteTitle: "./src/components/SiteTitle.astro", ThemeProvider: "./src/components/ThemeProvider.astro", + ThemeSelect: "./src/components/ThemeSelect.astro", }, head: [ { diff --git a/src/components/ThemeSelect.astro b/src/components/ThemeSelect.astro new file mode 100644 index 00000000..1527e380 --- /dev/null +++ b/src/components/ThemeSelect.astro @@ -0,0 +1,86 @@ +--- +--- + + + + + + + + + +