diff --git a/src/lib/ui/navigators/titles/CourseTitle.svelte b/src/lib/ui/navigators/titles/CourseTitle.svelte index 7f0931e3..ed9bce0b 100644 --- a/src/lib/ui/navigators/titles/CourseTitle.svelte +++ b/src/lib/ui/navigators/titles/CourseTitle.svelte @@ -1,7 +1,6 @@ {#if currentLo?.value} diff --git a/src/lib/ui/themes/theme-controller.svelte.ts b/src/lib/ui/themes/theme-controller.svelte.ts index 981a6a44..59594a19 100644 --- a/src/lib/ui/themes/theme-controller.svelte.ts +++ b/src/lib/ui/themes/theme-controller.svelte.ts @@ -18,14 +18,20 @@ export const themeService = { isSnowing: false, - initDisplay(): void { - if (localStorage.modeCurrent) { - lightMode.value = localStorage.modeCurrent; + initDisplay(forceTheme?: string, forceMode?: string): void { + if (forceTheme && forceMode && !localStorage.forceTheme) { + this.setDisplayMode(forceMode); + this.setTheme(forceTheme); + localStorage.forceTheme = true; } else { - lightMode.value = "light"; + if (localStorage.modeCurrent) { + lightMode.value = localStorage.modeCurrent; + } else { + lightMode.value = "light"; + } + this.setDisplayMode(localStorage.modeCurrent); + this.setTheme(localStorage.theme); } - this.setDisplayMode(localStorage.modeCurrent); - this.setTheme(localStorage.theme); }, setDisplayMode(mode: string): void { diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index bc99eb87..9d42a42f 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -18,7 +18,7 @@ onMount(async () => { if (browser) { - themeService.initDisplay(); + themeService.initDisplay("festive", "dark"); } });