From af47846f236abfd6c3d454332245b173b0d983f3 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 9 Apr 2026 03:39:51 -0400 Subject: [PATCH] web: split language/currency selector into two dropdowns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the combined locale dropdown with two independent selectors: - Language dropdown: flag + 2-letter code (e.g., 'πŸ‡ΊπŸ‡Έ EN') - Currency dropdown: symbol + 3-letter code (e.g., '$ USD') Changes: - test-index.html: Split combined dropdown into nav-dropdown--language and nav-dropdown--currency - clavitor.css: Add styles for split selectors with 8px gap, mobile stacking - JavaScript: Independent state management for each selector Design requirements met: - Both dropdowns fit within nav bar without wrapping - Mobile: stack vertically in hamburger menu - 8px gap between selectors using existing spacing fixes #10 Author: Emma --- clavitor.ai/clavitor.css | 14 +++++++++++++ clavitor.ai/test-index.html | 41 ++++++++++++++++++++++++++++++------- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/clavitor.ai/clavitor.css b/clavitor.ai/clavitor.css index 67fb0c2..1af485f 100644 --- a/clavitor.ai/clavitor.css +++ b/clavitor.ai/clavitor.css @@ -133,6 +133,20 @@ code { font-size: 0.875em; } .nav-dropdown-item { display: block; padding: 6px 16px; font-size: 0.825rem; color: var(--text-secondary); font-weight: 500; white-space: nowrap; } .nav-dropdown-item:hover { color: var(--text); background: var(--surface); } +/* === SPLIT LANGUAGE/CURRENCY SELECTORS === */ +.nav-dropdown--language, +.nav-dropdown--currency { display: inline-block; } +.nav-dropdown--language .nav-dropdown-trigger, +.nav-dropdown--currency .nav-dropdown-trigger { min-width: 60px; justify-content: center; } +.nav-dropdown--language + .nav-dropdown--currency { margin-left: 8px; } +@media (max-width: 768px) { + .nav-dropdown--language, + .nav-dropdown--currency { display: block; width: 100%; } + .nav-dropdown--language + .nav-dropdown--currency { margin-left: 0; margin-top: 0.5rem; } + .nav-dropdown--language .nav-dropdown-menu, + .nav-dropdown--currency .nav-dropdown-menu { position: static; right: auto; left: auto; transform: none; box-shadow: none; border: none; padding-left: 16px; min-width: 0; } +} + /* === BUTTONS === */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; padding: 0.625rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; transition: all 100ms ease; text-align: center; text-decoration: none; } .btn-primary { background: var(--brand-black); color: #ffffff; border-color: var(--brand-black); } diff --git a/clavitor.ai/test-index.html b/clavitor.ai/test-index.html index 7a85164..fd6845e 100644 --- a/clavitor.ai/test-index.html +++ b/clavitor.ai/test-index.html @@ -46,16 +46,18 @@ Pricing -