diff options
| author | Adam Soltys <[email protected]> | 2025-09-09 09:11:55 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-09-09 13:44:15 -0700 |
| commit | 4703776e6e714f56c37b714d40601644b1810bfc (patch) | |
| tree | 3ce6fe2e70b72f569475a723ab27932f62096d19 /src/routes | |
| parent | 4cb7c5aaeb077cbab9d0ba4e536ca999f2421a0d (diff) | |
| download | coinos-ui-4703776e6e714f56c37b714d40601644b1810bfc.tar.gz coinos-ui-4703776e6e714f56c37b714d40601644b1810bfc.zip | |
upgrade dependencies
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/+layout.svelte | 6 |
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} |
