feat: add basic theming support
This commit is contained in:
1 parent
2d991fc4a2
commit
81ac6accf4
7 files changed
+299
-72
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { colors, colorsToVars } from '$lib/ui/colors'
|
||||
import { routes } from '$lib/util.js'
|
||||
|
||||
export let route: { id: string | null } | undefined = undefined
|
||||
@@ -11,7 +12,7 @@
|
||||
|
||||
<svelte:window bind:scrollY={scroll} />
|
||||
|
||||
<div class="shell {$$props.class}">
|
||||
<div class="shell {$$props.class}" style={colorsToVars($colors)}>
|
||||
<slot />
|
||||
<slot
|
||||
name="navbar"
|
||||
@@ -29,17 +30,17 @@
|
||||
>
|
||||
<slot
|
||||
name="sidebar"
|
||||
class="hidden md:flex sticky top-16 left-0 w-full max-w-full"
|
||||
class="hidden md:flex sticky top-16 left-0 w-full max-w-full bg-slate-50 dark:bg-zinc-950"
|
||||
style="grid-area: sidebar; width: 100% !important;"
|
||||
/>
|
||||
<slot
|
||||
name="main"
|
||||
class="w-full bg-slate-25 dark:bg-zinc-925 dark:bg-transparent justify-self-center shadow-sm"
|
||||
class="w-full bg-slate-25 dark:bg-zinc-925 justify-self-center shadow-sm"
|
||||
style="grid-area: main"
|
||||
/>
|
||||
<slot
|
||||
name="suffix"
|
||||
class="max-xl:hidden w-full sticky top-16 left-0 h-full max-h-[calc(100svh-4rem)]"
|
||||
class="max-xl:hidden w-full sticky top-16 left-0 h-full max-h-[calc(100svh-4rem)] bg-slate-50 dark:bg-zinc-950"
|
||||
style="grid-area: suffix;"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user