From 43c151aaba3de8d46dd1f812cc2c81afbc3025a0 Mon Sep 17 00:00:00 2001 From: Spectralitree <72747870+Spectralitree@users.noreply.github.com> Date: Sat, 11 Dec 2021 11:58:50 +0100 Subject: [PATCH] feat: make default style dark --- index.html | 1 - src/App.svelte | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 5a2f1c57..3635f2ca 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,6 @@ pk-webs | home -
diff --git a/src/App.svelte b/src/App.svelte index 9f397aea..1cf05784 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -4,10 +4,11 @@ import Navigation from "./lib/Navigation.svelte"; + // theme cdns (I might make some myself too) let light = "https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css"; let dark = "https://cdn.jsdelivr.net/npm/bootstrap-dark-5@1.1.3/dist/css/bootstrap-night.min.css"; - let styleSrc = light; + let styleSrc = dark; onMount(() => { if (localStorage.getItem("pk-style")) setStyle(localStorage.getItem("pk-style").toLowerCase()); @@ -29,6 +30,8 @@ break; default: styleSrc = light; localStorage.setItem("pk-style", "light"); + default: styleSrc = dark; + localStorage.setItem("pk-style", "dark"); }; };