From 1c99e0ab0d871fd17cb78f94e632d98721df89f7 Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Wed, 24 Dec 2025 00:51:54 +0100 Subject: [PATCH] feat: add language switcher between English and German - Add language toggle button in header (EN/DE) - Link directly to the other language version - Style consistent with existing header buttons - Accessible with proper aria-labels --- src/index.de.html | 5 ++++- src/index.html | 5 ++++- src/main.css | 28 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/index.de.html b/src/index.de.html index 7894ae7..aa13f25 100644 --- a/src/index.de.html +++ b/src/index.de.html @@ -20,7 +20,10 @@ CODE CRISPIES Logo

CODECRISPIES

- +
+ EN + +
diff --git a/src/index.html b/src/index.html index 8a25ddb..7b5aa07 100644 --- a/src/index.html +++ b/src/index.html @@ -20,7 +20,10 @@ CODE CRISPIES Logo

CODECRISPIES

- +
+ DE + +
diff --git a/src/main.css b/src/main.css index ee15ade..b78f038 100644 --- a/src/main.css +++ b/src/main.css @@ -155,6 +155,34 @@ code, kbd { color: var(--primary-color); } +.header-actions { + display: flex; + align-items: center; + gap: var(--spacing-sm); +} + +.lang-switch { + display: flex; + align-items: center; + justify-content: center; + width: 28px; + height: 28px; + border-radius: 50%; + border: 2px solid var(--border-color); + background: none; + font-size: 0.7rem; + font-weight: 700; + text-decoration: none; + color: var(--light-text); + transition: all 0.2s; +} + +.lang-switch:hover { + border-color: var(--primary-color); + color: var(--primary-color); + background: var(--primary-bg-light); +} + /* ================= GAME LAYOUT ================= */ .game-layout { display: flex;