theme toggle with dark map style and mapterhorn terrain

This commit is contained in:
Vincent van der Wal
2026-07-22 11:26:26 +02:00
parent addef8b78e
commit bca5154459
5 changed files with 199 additions and 42 deletions
+5
View File
@@ -4,6 +4,11 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script>
// apply the stored theme before first paint to avoid a flash
const t = localStorage.getItem('theme');
if (t === 'light' || t === 'dark') document.documentElement.dataset.theme = t;
</script>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">