From edb5d2334895b1724819b90e1f03d704a911a960 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Wed, 1 Jan 2025 21:13:27 +0100 Subject: [PATCH] featL: add dark theme toggle --- src/components/Header.astro | 2 ++ src/components/ThemeIcon.astro | 66 ++++++++++++++++++++++++++++++++++ src/styles/global.css | 9 +++++ 3 files changed, 77 insertions(+) create mode 100644 src/components/ThemeIcon.astro diff --git a/src/components/Header.astro b/src/components/Header.astro index d7e2f4e..a5da95a 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -1,9 +1,11 @@ --- import Hamburger from "./Hamburger.astro"; import Navigation from "./Navigation.astro"; +import ThemeIcon from "./ThemeIcon.astro"; ---
+
diff --git a/src/components/ThemeIcon.astro b/src/components/ThemeIcon.astro new file mode 100644 index 0000000..99d660e --- /dev/null +++ b/src/components/ThemeIcon.astro @@ -0,0 +1,66 @@ + + + + + diff --git a/src/styles/global.css b/src/styles/global.css index db67bd9..4cdba9b 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -80,3 +80,12 @@ h1 { display: none; } } + +html.dark { + background-color: #0d0950; + color: #fff; +} + +.dark .nav-links a { + color: #fff; +}