wip: not loading themes until reload, missing in dashboard, bad alignment and scaling

This commit is contained in:
rasmusq
2025-11-28 00:26:43 +01:00
parent 85f8671c72
commit 7c6ff9458f
21 changed files with 417 additions and 20 deletions

View File

@@ -0,0 +1,37 @@
<script lang="ts">
import TopPattern from './svgs/TopPattern.svelte';
import BottomPattern from './svgs/BottomPattern.svelte';
import { getTheme, getThemeColor } from '$lib/utils/themes';
let {
themeName,
color,
showTop = true,
showBottom = true
}: {
themeName?: string | null;
color?: string | null;
showTop?: boolean;
showBottom?: boolean;
} = $props();
const theme = $derived(getTheme(themeName));
const themeColor = $derived(getThemeColor(color));
</script>
{#if theme.pattern !== 'none'}
{#if showTop}
<TopPattern
pattern={theme.pattern}
color={themeColor}
opacity={theme.opacity}
/>
{/if}
{#if showBottom}
<BottomPattern
pattern={theme.pattern}
color={themeColor}
opacity={theme.opacity}
/>
{/if}
{/if}