diff --git a/css/style.css b/css/style.css index c5a8594..64e2efb 100644 --- a/css/style.css +++ b/css/style.css @@ -332,20 +332,35 @@ input#punkteInput { DARK MODE (WICHTIG: AUSSERHALB MEDIA QUERY) ================================ */ + body.dark { + background-color: #1e293b; + color: #e2e8f0; --cream: #120d14; --text: #f5e9f2; --muted: #c7b2c9; - - background: var(--cream); - color: var(--text); } body.dark nav { - background: rgba(18, 13, 20, 0.85); - border-bottom: 1px solid rgba(255,255,255,0.08); + background-color: #0f172a; + border-color: #334155; } +body.dark a { + color: #60a5fa; +} + + + + + + + + + + + + body.dark .stat-card, body.dark .gallery-card { background: #1b141d; diff --git a/eis_projekt.html b/eis_projekt.html index 46e8c9d..c2fb688 100644 --- a/eis_projekt.html +++ b/eis_projekt.html @@ -27,7 +27,7 @@
  • Kontakt
  • Impressum
  • - +
    diff --git a/impressum.html b/impressum.html index a94bda2..33fb6ac 100644 --- a/impressum.html +++ b/impressum.html @@ -28,7 +28,7 @@
  • Kontakt
  • Impressum
  • - +
    diff --git a/index.html b/index.html index 16e04ce..2b79e25 100644 --- a/index.html +++ b/index.html @@ -25,8 +25,7 @@
  • Kontakt
  • Impressum
  • - - +
    diff --git a/js/script.js b/js/script.js index 433f1d0..6f36a1d 100644 --- a/js/script.js +++ b/js/script.js @@ -1,20 +1,20 @@ -document.querySelector("form")?.addEventListener("submit", function (e) { - e.preventDefault(); - alert("Nachricht gesendet πŸ’–"); -}); +document.addEventListener("DOMContentLoaded", () => { + const toggle = document.getElementById("dark-mode-toggle"); -function toggleDarkMode() { - document.body.classList.toggle("dark"); - - if (document.body.classList.contains("dark")) { - localStorage.setItem("theme", "dark"); - } else { - localStorage.setItem("theme", "light"); - } -} - -window.addEventListener("load", () => { - if (localStorage.getItem("theme") === "dark") { + // gespeicherten Zustand laden + if (localStorage.getItem("darkMode") === "true") { document.body.classList.add("dark"); + toggle.textContent = "Light Mode"; } + + toggle.addEventListener("click", () => { + document.body.classList.toggle("dark"); + + const isDark = document.body.classList.contains("dark"); + + localStorage.setItem("darkMode", isDark); + + // Button Text Γ€ndern + toggle.textContent = isDark ? "Light Mode" : "Dark Mode"; + }); }); \ No newline at end of file diff --git a/kontakt.html b/kontakt.html index 2f0919e..deb94a8 100644 --- a/kontakt.html +++ b/kontakt.html @@ -27,7 +27,7 @@
  • Kontakt
  • Impressum
  • - + diff --git a/notenrechner.html b/notenrechner.html index 883770b..e489b61 100644 --- a/notenrechner.html +++ b/notenrechner.html @@ -28,7 +28,7 @@
  • Impressum
  • - +
    diff --git a/textanalyse.html b/textanalyse.html index 5c51bef..e983da5 100644 --- a/textanalyse.html +++ b/textanalyse.html @@ -28,7 +28,7 @@
  • Impressum
  • - +
    diff --git a/ueber_uns.html b/ueber_uns.html index b479db5..b172086 100644 --- a/ueber_uns.html +++ b/ueber_uns.html @@ -45,18 +45,7 @@ window.onload = function () {
  • Kontakt
  • Impressum
  • - +