aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-09-09 09:11:55 -0700
committerAdam Soltys <[email protected]>2025-09-09 13:44:15 -0700
commit4703776e6e714f56c37b714d40601644b1810bfc (patch)
tree3ce6fe2e70b72f569475a723ab27932f62096d19 /src/routes
parent4cb7c5aaeb077cbab9d0ba4e536ca999f2421a0d (diff)
downloadcoinos-ui-4703776e6e714f56c37b714d40601644b1810bfc.tar.gz
coinos-ui-4703776e6e714f56c37b714d40601644b1810bfc.zip
upgrade dependencies
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/+layout.svelte6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 0d686f47..8ae31608 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -11,6 +11,9 @@
let { pathname, theme } = $state(data);
$effect(() => ($themeStore = data.theme));
$effect(() => (theme = $themeStore));
+ $effect(() => {
+ document.documentElement.setAttribute("data-theme", theme);
+ });
let host = PUBLIC_DOMAIN.includes("localhost")
? `http://${PUBLIC_DOMAIN}`
@@ -21,6 +24,7 @@
navigator.clearAppBadge().catch(() => {});
}
}
+
onMount(() => {
if (!browser) return;
@@ -83,7 +87,7 @@
</svelte:head>
{#if !$loading}
- <main data-theme={theme}>
+ <main>
{@render children?.()}
</main>
{/if}