From d61c23d6a9e0622b898723e0034a35c85caf3074 Mon Sep 17 00:00:00 2001 From: DylanBarnes Date: Sun, 10 May 2026 12:21:43 +0000 Subject: [PATCH] Refactor navbar into separate component, fix dropdown menu and dark mode --- components/navbar.html | 30 ++++++++ css/style.css | 54 ++++++++++++++ eis_projekt.html | 32 +-------- impressum.html | 32 +-------- index.html | 32 +-------- js/navbar.js | 156 +++++++++++++++++++++++++++++++++++++++++ js/script.js | 60 +--------------- kontakt.html | 31 +------- notenrechner-dom.html | 23 +----- notenrechner.html | 23 +----- team.html | 32 +-------- textanalyse.html | 23 +----- ueber_uns.html | 32 +-------- 13 files changed, 250 insertions(+), 310 deletions(-) create mode 100644 components/navbar.html create mode 100644 js/navbar.js diff --git a/components/navbar.html b/components/navbar.html new file mode 100644 index 0000000..b1dcf5d --- /dev/null +++ b/components/navbar.html @@ -0,0 +1,30 @@ +
+ +
diff --git a/css/style.css b/css/style.css index 6234c27..28a1a80 100644 --- a/css/style.css +++ b/css/style.css @@ -83,6 +83,48 @@ header { display: block; } +/* New dropdown submenu styles for component */ +.dropdown-submenu { + position: absolute; + top: 100%; + left: 0; + background: rgba(0, 0, 0, 0.2); + border-radius: 8px; + min-width: 220px; + list-style: none; + padding: 0.5rem 0; + margin: 0.5rem 0 0 0; + display: none; + flex-direction: column; + z-index: 1001; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); + backdrop-filter: blur(10px); +} + +.dropdown-submenu.show { + display: flex; +} + +.dropdown-submenu li { + list-style: none; + padding: 0; +} + +.dropdown-submenu li a { + display: block; + padding: 0.7rem 1.25rem; + white-space: nowrap; + color: rgba(255, 255, 255, 0.95); + transition: all 0.2s ease; + text-decoration: none; +} + +.dropdown-submenu li a:hover { + background: rgba(255, 255, 255, 0.15); + padding-left: 1.5rem; + color: white; +} + .nav-menu a { text-decoration: none; color: rgba(255, 255, 255, 0.9); @@ -1162,6 +1204,18 @@ body.dark .exercise-card td { color: #a0aec0; } +body.dark .dropdown-submenu { + background: rgba(0, 0, 0, 0.4); +} + +body.dark .dropdown-submenu li a { + color: rgba(226, 232, 240, 0.95); +} + +body.dark .dropdown-submenu li a:hover { + background: rgba(226, 232, 240, 0.15); +} + body.dark .exercise-card th { background-color: #2d3e5f; color: #e2e8f0; diff --git a/eis_projekt.html b/eis_projekt.html index 1b29ca0..98b54a7 100644 --- a/eis_projekt.html +++ b/eis_projekt.html @@ -11,37 +11,6 @@ -
- -
-