From 29abad4fe968d071ce2bed6c3bb94d98f8b35fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jab=C5=82o=C5=84ski?= Date: Tue, 12 Aug 2025 13:07:44 +0200 Subject: [PATCH] feat: remove theme toggle --- public/index.html | 1 - public/styles.css | 21 --------------------- src/browser.ts | 16 ---------------- 3 files changed, 38 deletions(-) diff --git a/public/index.html b/public/index.html index 1b15abf..772e0dd 100644 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,6 @@

mBank MT940 konwerter

-
diff --git a/public/styles.css b/public/styles.css index 36e84dd..602bf2d 100644 --- a/public/styles.css +++ b/public/styles.css @@ -2,12 +2,6 @@ --pico-font-family: "Atkinson Hyperlegible", sans-serif; } -/* use to enforce styles for both themes */ -[data-theme="dark"], -:not([data-theme="dark"]) { - --noop: none; -} - section { max-width: 800px; margin: 0 auto; @@ -42,21 +36,6 @@ header section { align-items: center; } -#theme-toggle { - width: auto; - background: none; - border: none; - font-size: 2rem; -} - -#theme-toggle::before { - content: "☀️"; -} - -#theme-toggle[dark]::before { - content: "🌙"; -} - #icd-logo { height: 50px; aspect-ratio: 1200/319; diff --git a/src/browser.ts b/src/browser.ts index 17fb1e9..01996e6 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -45,19 +45,3 @@ async function handle() { document.querySelector("#submit")?.addEventListener("click", handle); console.log("added handler to", document.querySelector("#submit")); - -async function toggleTheme() { - const html = document.documentElement; - const toggle = document.getElementById("theme-toggle")!; - const theme = html.getAttribute("data-theme"); - if (theme === "dark") { - html.removeAttribute("data-theme"); - toggle.removeAttribute("dark"); - } else { - html.setAttribute("data-theme", "dark"); - toggle.setAttribute("dark", ""); - } -} - -document.querySelector("#theme-toggle")?.addEventListener("click", toggleTheme); -console.log("added handler to", document.querySelector("#theme-toggle"));