1
0
forked from icd/mt940-mbank-ts

feat: remove theme toggle

This commit is contained in:
Mateusz 2025-08-12 13:07:44 +02:00
parent 7e2c35da70
commit 29abad4fe9
3 changed files with 0 additions and 38 deletions

View File

@ -11,7 +11,6 @@
<header>
<section>
<h1>mBank MT940 konwerter</h1>
<button id="theme-toggle" type="button"></button>
</section>
</header>
<main>

View File

@ -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;

View File

@ -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"));