From 2db5a5abab05e44cde814fbf33e9730aeb6353d2 Mon Sep 17 00:00:00 2001 From: Korbs Date: Fri, 25 Oct 2024 14:53:49 -0400 Subject: [PATCH] Check cookies for theme toggle --- source/src/layouts/Base.astro | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/src/layouts/Base.astro b/source/src/layouts/Base.astro index cb6dad6..349fbcd 100644 --- a/source/src/layouts/Base.astro +++ b/source/src/layouts/Base.astro @@ -10,6 +10,13 @@ import Footer from "@components/global/Footer.astro"; // Styles import '@styles/index.scss' import '@styles/mobile.scss' + +// User Configuration +if (Astro.cookies.get("Theme").value === "Light") { + var ThemeScheme = 'light' +} else if (Astro.cookies.get("Theme").value === "Dark") { + var ThemeScheme = 'dark' +} ---