diff --git a/src/components/theme.svelte b/src/components/theme.svelte index d1d3900..cbfb0d3 100644 --- a/src/components/theme.svelte +++ b/src/components/theme.svelte @@ -1,59 +1,12 @@ - - - - - - - {#if dark} + + {#if $mode === 'light'} {:else} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 269fff8..c91f78e 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -4,11 +4,12 @@ // Global styles: import '../app.css'; + import { ModeWatcher, mode } from 'mode-watcher'; // Get categories: import { svgs } from '@/data/svgs'; const categories = svgs - .flatMap((svg) => Array.isArray(svg.category) ? svg.category : [svg.category]) + .flatMap((svg) => (Array.isArray(svg.category) ? svg.category : [svg.category])) .filter((category, index, array) => array.indexOf(category) === index); // Toaster: @@ -23,6 +24,7 @@ import { cn } from '@/utils/cn'; +