feat: add language selector with i18n support

- Add createLanguageSelector function to amipro_utils.js
- Add language selector CSS styles to modern.css and core.css
- Support EN/JA language switching with localStorage persistence
This commit is contained in:
qingjie.du
2026-06-21 12:23:26 +09:00
parent d06b4cf629
commit 97a3a007e6
3 changed files with 251 additions and 4 deletions

View File

@@ -400,3 +400,55 @@ body {
left: -38px;
}
}
.lang-selector-wrapper {
margin-left: 12px;
background: var(--bg-panel);
border: 1px solid var(--border-soft);
border-radius: 8px;
padding: 4px;
backdrop-filter: blur(16px);
display: inline-block;
}
.lang-selector-floating {
position: fixed;
top: 16px;
right: 16px;
z-index: 9999;
margin-left: 0;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
transition: box-shadow 0.2s ease;
display: inline-block;
width: fit-content;
max-width: fit-content;
flex-shrink: 0;
white-space: nowrap;
}
.lang-selector-floating:hover {
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.lang-selector {
background: transparent;
border: 1px solid var(--border-soft);
border-radius: 8px;
color: var(--text-bright);
padding: 4px 8px;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
outline: none;
appearance: none;
-webkit-appearance: none;
}
.lang-selector option {
background: #1e293b;
color: var(--text-bright);
}
.lang-selector:hover {
border-color: var(--brand-primary);
}