From 540754d7d01990c94b9b1fe6646540fe845f0743 Mon Sep 17 00:00:00 2001 From: oswaldsimona Date: Mon, 20 Apr 2026 22:18:14 +0200 Subject: [PATCH] Logout-Button in Navigation --- css/event_create.css | 32 ++++---------------------------- css/event_overview.css | 1 - css/login_signup.css | 2 -- css/my_profil.css | 2 -- css/stylesheet_global.css | 20 +++++++++++++------- js/event_create.js | 6 +++--- js/navigation.js | 13 +++++++++++++ my_profil.html | 8 ++++++-- 8 files changed, 39 insertions(+), 45 deletions(-) diff --git a/css/event_create.css b/css/event_create.css index 84a1a33..ea1fd10 100644 --- a/css/event_create.css +++ b/css/event_create.css @@ -14,12 +14,6 @@ box-sizing: border-box; } -.site-header { - background: var(--color-bg); - border-top: 2px solid #232323; - border-bottom: 1px solid var(--color-border); -} - .event-create-page { width: min(100% - 2rem, var(--max-width)); margin: 0 auto; @@ -40,7 +34,7 @@ .step { display: none; - padding: var(--space-4) 0 var(--space-7); + padding: var(--space-4) 0 var(--space-4); } .submission-success { @@ -242,7 +236,7 @@ textarea:focus { } .option-card--invalid { - border-color: var(--tomato) !important; + border-color: var(--error) !important; box-shadow: 0 0 0 2px rgba(212, 75, 36, 0.14); } @@ -339,9 +333,10 @@ textarea:focus { } .error-message { - order: -1; /* nach oben verschieben */ + margin: 0; text-align: center; width: 100%; + } .progress-wrap { @@ -393,25 +388,6 @@ textarea:focus { gap: var(--space-4); } -.error-message { - min-height: 1.5rem; - margin: 0; - color: var(--color-error); - font-size: 0.95rem; -} - -/*.button { - display: inline-flex; - align-items: center; - justify-content: center; - padding: 0.9rem 1.35rem; - border-radius: var(--radius-pill); - border: 1px solid var(--color-border); - background: transparent; - color: var(--color-text); - cursor: pointer; -}*/ - .button--ghost:hover { background: rgba(0, 0, 0, 0.03); } diff --git a/css/event_overview.css b/css/event_overview.css index b20d548..196a1a6 100644 --- a/css/event_overview.css +++ b/css/event_overview.css @@ -322,7 +322,6 @@ font-size: 13px; font-weight: 600; letter-spacing: var(--ls-la); - text-transform: uppercase; } .empty-state h3 { diff --git a/css/login_signup.css b/css/login_signup.css index 151f815..3b204d7 100644 --- a/css/login_signup.css +++ b/css/login_signup.css @@ -139,8 +139,6 @@ button[type="submit"]:active { /* --- Hints & errors --- */ .error-message { - color: var(--error); - font-size: 0.8rem; margin-top: 5px; display: none; } diff --git a/css/my_profil.css b/css/my_profil.css index c378347..94ea2f0 100644 --- a/css/my_profil.css +++ b/css/my_profil.css @@ -162,7 +162,6 @@ font-size: 0.72rem; font-weight: 700; letter-spacing: var(--ls-la); - text-transform: uppercase; } .profile-event-address { @@ -262,7 +261,6 @@ font-size: 0.8rem; font-weight: 600; letter-spacing: var(--ls-la); - text-transform: uppercase; } .profile-empty-state h3 { diff --git a/css/stylesheet_global.css b/css/stylesheet_global.css index d94ae2b..e61ddb4 100644 --- a/css/stylesheet_global.css +++ b/css/stylesheet_global.css @@ -30,6 +30,7 @@ --blue: #3489DA; --blue-dark: #1D70BF; --error: #FF3B30; + --error-text: #d91200; --font-main: 'Jost', sans-serif; --font-size-base: 1rem; @@ -146,7 +147,7 @@ p { } .error-message { - color: var(--error); + color: var(--error-text); font-size: 1rem; } @@ -379,20 +380,25 @@ p { .button-small { background: var(--olive); color: var(--butter-light); + border: none; font-size: 1.125rem; - font-weight: 400; letter-spacing: var(--ls-sm); + font-family: var(--font-main); + font-weight: 400; line-height: 1; + border-radius: var(--radius-pill); + padding: 10px var(--space-3); text-decoration: none; - - padding: var(--space-1) var(--space-4); - border-radius: var(--radius-md); + cursor: pointer; } - +§ .button-small:hover, .button-small:active, .button-small:focus-visible { background: var(--olive-dark); - color: var(--butter-light); +} + +.logout-button { + margin-right: -1.25rem; } /* Auth-Links in ausgeloggter Navigation: klarer Aktiv-/Default-Zustand. */ diff --git a/js/event_create.js b/js/event_create.js index 608c422..0139208 100644 --- a/js/event_create.js +++ b/js/event_create.js @@ -386,9 +386,9 @@ function buildMenuItems(value) { */ function mapEventTypeToCategory(value) { const categoryMap = { - Brunch: "BRUNCH", - Lunch: "LUNCH", - Dinner: "DINNER", + Brunch: "Brunch", + Lunch: "Lunch", + Dinner: "Dinner", "Kaffee + Kuchen": "COFFEE" }; diff --git a/js/navigation.js b/js/navigation.js index 31f943a..8844a9c 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -25,6 +25,12 @@ document.addEventListener('DOMContentLoaded', () => { } } + // Logout-Funktion + window.logout = function() { + localStorage.removeItem(CURRENT_USER_KEY); + window.location.href = 'index.html'; + }; + // Baut die Navigation für ausgeloggte Besucher. function buildLoggedOutNavigation() { const loginIsActive = currentPage === 'login.html'; @@ -85,6 +91,13 @@ document.addEventListener('DOMContentLoaded', () => { > Event erstellen + @@ -31,7 +36,6 @@

Mein Profil

Hier findest du deine Events, deine Anmeldungen und kannst deine Profildaten verwalten.

-