From c4ffc1c7974d027ca5369cb9472f927ec85ef208 Mon Sep 17 00:00:00 2001 From: Caroline Schulte Date: Sun, 19 Jul 2026 17:19:57 +0200 Subject: [PATCH] Deutlichere Effekte bei Nutzerinteraktionen --- .idea/dataSources.local.xml | 2 +- css/main.css | 20 +++++++++ css/navbar.css | 90 +++++++++++++++++++++++++++++++++++-- 3 files changed, 108 insertions(+), 4 deletions(-) diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml index b341a8a..707e2b3 100644 --- a/.idea/dataSources.local.xml +++ b/.idea/dataSources.local.xml @@ -1,6 +1,6 @@ - + " diff --git a/css/main.css b/css/main.css index e72f17f..82a8780 100644 --- a/css/main.css +++ b/css/main.css @@ -225,4 +225,24 @@ h1 { text-align: center; text-decoration: none; box-sizing: border-box; +} +/* Deutlichere Klickreaktion für normale Buttons */ +.button:active { + transform: translateY(1px); + box-shadow: none; +} + +/* Deutlichere Klickreaktion für Kategorien */ +.category-link:active { + transform: translateY(1px); + box-shadow: none; +} + +/* Sichtbare Tastatur-Markierung */ +.button:focus-visible, +.category-link:focus-visible, +.article-link a:focus-visible, +.register-link a:focus-visible { + outline: 3px solid #fbbf24; + outline-offset: 3px; } \ No newline at end of file diff --git a/css/navbar.css b/css/navbar.css index d7d3d4a..c68e94f 100644 --- a/css/navbar.css +++ b/css/navbar.css @@ -248,9 +248,9 @@ CSS für die navbar z-index: 1000; transition: left 0.3s ease; padding: 2rem 1rem; - box-shadow: 2px 0 10px rgba(0,0,0,0.5); + box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5); overflow-y: auto; - + /* Genug Abstand oben rechts, damit Links nicht hinter dem X liegen */ padding: 4rem 1.5rem 2rem 1.5rem; } @@ -302,5 +302,89 @@ CSS für die navbar padding: 0.8rem 1rem; cursor: pointer; } +} + /* Deutlichere Hover-Effekte für die Navigation */ -} \ No newline at end of file + .nav__dropdown-toggle, + .nav__link { + border-radius: 6px; + transition: + background-color 0.2s ease, + color 0.2s ease, + transform 0.2s ease; + } + + .nav__dropdown-toggle:hover, + .nav__link:hover { + background-color: #ffffff; + color: #1d4ed8; + transform: translateY(-2px); + } + + /* Sichtbare Reaktion beim Anklicken */ + .nav__dropdown-toggle:active, + .nav__link:active { + transform: translateY(1px); + } + + /* Deutlichere Effekte für Anmelden, Registrieren usw. */ + .nav__button { + transition: + background-color 0.2s ease, + color 0.2s ease, + transform 0.2s ease, + box-shadow 0.2s ease; + } + + .nav__button:hover { + background-color: #2563eb; + color: #ffffff; + transform: translateY(-2px); + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); + } + + .nav__button:active { + transform: translateY(1px); + box-shadow: none; + } + + /* Deutlichere Hervorhebung der Einträge im Dropdown-Menü */ + .nav__dropdown-menu a { + display: block; + transition: + background-color 0.2s ease, + color 0.2s ease, + padding-left 0.2s ease; + } + + .nav__dropdown-menu a:hover { + background-color: #dbeafe; + color: #1d4ed8; + padding-left: 1.4rem; + } + + /* Effekt für den Suchbutton */ + .nav__search-button { + transition: + background-color 0.2s ease, + color 0.2s ease, + transform 0.2s ease; + } + + .nav__search-button:hover { + background-color: #2563eb; + color: #ffffff; + } + + .nav__search-button:active { + transform: scale(0.95); + } + + /* Sichtbare Markierung bei Tastaturbedienung */ + .nav a:focus-visible, + .nav button:focus-visible, + .nav input:focus-visible, + .nav label:focus-visible { + outline: 3px solid #fbbf24; + outline-offset: 3px; + }