diff options
| author | Adam Soltys <[email protected]> | 2025-09-09 09:11:55 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-09-10 10:47:04 -0700 |
| commit | 302a487919be4011fbde33532a777611f3b48486 (patch) | |
| tree | c90e5a3d279f3e50be7f03ec042f9e3544b9def0 /src/routes/+layout.svelte | |
| parent | 54923217126b6ea32ce8b110deb521dd5e8664d3 (diff) | |
| download | coinos-ui-302a487919be4011fbde33532a777611f3b48486.tar.gz coinos-ui-302a487919be4011fbde33532a777611f3b48486.zip | |
upgrade dependencies
Diffstat (limited to 'src/routes/+layout.svelte')
| -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} |
