From 87f6f6a461095fc4575681a8cf82df8cd831adb3 Mon Sep 17 00:00:00 2001 From: Patrick Schwarzer Date: Sat, 10 May 2025 01:45:49 +0200 Subject: [PATCH] Make darkmode the default --- index.html | 4 ++-- script.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 3a5d53a..f482956 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ Tarions Portfolio - +
diff --git a/script.js b/script.js index 2212afd..b8b1247 100644 --- a/script.js +++ b/script.js @@ -14,9 +14,9 @@ document.addEventListener("DOMContentLoaded", () => { // Load Dark Mode preference from cache const theme = localStorage.getItem("theme"); - if (theme === "dark"){ - body.classList.remove("light-mode"); - darkModeButton.textContent = "🌙"; + if (theme === "light"){ + body.classList.add("light-mode"); + darkModeButton.textContent = "☀️"; } darkModeButton.addEventListener("click", () => {