From 704b35ae2b7cbaf7410e1e687aafa3b059c9ca6b Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Sat, 7 May 2022 03:27:41 +0300 Subject: [PATCH] frontend: add theme switching --- frontend/public/global.css | 9 ----- frontend/src/components/Main.svelte | 25 ++++++++++++- frontend/src/components/Sidebar.svelte | 5 +++ .../src/components/overlays/Settings.svelte | 37 ++++++++++++++----- frontend/src/storage.js | 1 + frontend/src/stores.js | 21 ++++++++++- 6 files changed, 77 insertions(+), 21 deletions(-) diff --git a/frontend/public/global.css b/frontend/public/global.css index 68c8c8f..5f66b94 100644 --- a/frontend/public/global.css +++ b/frontend/public/global.css @@ -59,15 +59,6 @@ --radius-xxl: calc(5.25 * var(--sradius-unit)); } -.theme-light { - --foreground-color-1: hsl(180, 11%, 7%); - --foreground-color-2: hsl(180, 11%, 12%); - --foreground-color-3: hsl(180, 11%, 17%); - --background-color-1: rgb(253, 254, 255); - --background-color-2: rgb(218, 219, 220); - --background-color-3: rgb(153, 154, 155); -} - html, body { width: 100%; height: 100%; diff --git a/frontend/src/components/Main.svelte b/frontend/src/components/Main.svelte index 2107dd6..353eaaa 100644 --- a/frontend/src/components/Main.svelte +++ b/frontend/src/components/Main.svelte @@ -1,11 +1,34 @@ + + {#if $theme === "light"} + + {/if} + +