refactor(#48): Address PR comment

This commit is contained in:
Josh Creek
2026-01-10 21:50:56 +00:00
parent 9d14b2d2f1
commit d437c05770
+3 -2
View File
@@ -4,12 +4,12 @@
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<script>
(function () {
try {
const storedTheme = localStorage.getItem('theme');
const theme = storedTheme || 'pokeball';
const allowed = ['pokeball', 'dark'];
const theme = storedTheme && allowed.includes(storedTheme) ? storedTheme : 'pokeball';
document.documentElement.setAttribute('data-theme', theme);
} catch (e) {
// Fallback to default theme if localStorage is not accessible
@@ -17,6 +17,7 @@
}
})();
</script>
%sveltekit.head%
<link rel="stylesheet" href="%sveltekit.assets%/output.css" />
</head>
<body data-sveltekit-preload-data="hover">