feat: add light/dark mode toggle with header view transitions
CI / update (push) Successful in 25s

Add theme cycling (system/light/dark) with localStorage persistence
and FOUC prevention. Restructure CSS color tokens to respond to
data-theme attribute across all components. Redesign header as a
floating glass pill bar with smooth view transitions including
clip-reveal logo animation.
This commit is contained in:
2026-03-01 16:15:36 +01:00
parent 486bb69b23
commit 955f893b13
82 changed files with 2317 additions and 1276 deletions
+38
View File
@@ -0,0 +1,38 @@
<script>
import { themeStore } from '$lib/stores/theme.svelte';
import { Sun, Moon, SunMoon } from 'lucide-svelte';
</script>
<style>
button {
display: flex;
align-items: center;
justify-content: center;
padding: 0.3em;
border-radius: 100px;
background: transparent;
color: var(--nav-text);
cursor: pointer;
transition: all 150ms;
border: 1px solid var(--nav-btn-border);
}
button:hover {
color: var(--nav-text-hover);
border-color: var(--nav-btn-border-hover);
background: var(--nav-hover-bg);
}
</style>
<button
onclick={() => themeStore.cycle()}
aria-label="Toggle theme ({themeStore.theme})"
title="Theme: {themeStore.theme}"
>
{#if themeStore.theme === 'light'}
<Sun size={14} strokeWidth={2} />
{:else if themeStore.theme === 'dark'}
<Moon size={14} strokeWidth={2} />
{:else}
<SunMoon size={14} strokeWidth={2} />
{/if}
</button>