feat(ui): replace language dropdown with globe icon and expandable menu

This commit is contained in:
2026-07-07 09:54:57 +08:00
parent 591ad3e178
commit 02269417a9
2 changed files with 26 additions and 8 deletions

View File

@@ -30,9 +30,15 @@ a:hover { text-decoration: underline; }
.nav-logout { color: var(--danger) !important; }
.nav-lang-btn { background: none; border: 1px solid var(--border); border-radius: 4px; padding: .15rem .45rem; font-size: .72rem; color: var(--text-muted); cursor: pointer; line-height: 1; }
.nav-lang-btn:hover { background: var(--bg); color: var(--primary); }
.nav-lang-select { background: none; border: 1px solid var(--border); border-radius: 4px; padding: .15rem .3rem; font-size: .72rem; color: var(--text-muted); cursor: pointer; line-height: 1; outline: none; }
.nav-lang-select:hover { background: var(--bg); color: var(--primary); }
.nav-lang-select option { background: var(--card-bg); color: var(--text); }
.lang-switcher { position: relative; }
.lang-globe { background: none; border: none; cursor: pointer; font-size: 1rem; padding: .1rem .2rem; line-height: 1; border-radius: 4px; }
.lang-globe:hover { background: var(--bg); }
.lang-dropdown { display: none; position: absolute; right: 0; top: 100%; background: var(--card-bg); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.12); z-index: 100; min-width: 100px; padding: .25rem 0; }
.lang-dropdown.show { display: block; }
.lang-dropdown form { margin: 0; }
.lang-option { display: block; width: 100%; padding: .35rem .75rem; border: none; background: none; text-align: left; font-size: .8rem; color: var(--text); cursor: pointer; white-space: nowrap; }
.lang-option:hover { background: var(--bg); color: var(--primary); }
.lang-option.active { color: var(--primary); font-weight: 600; }
/* Container */
.container { max-width: 960px; margin: 2rem auto; padding: 0 1.5rem; }