Files
hideck/web/index.html
T
yibaiba bd177400d6 feat(web): restore Chinese and English UI language switching
Add a locale catalog and switcher. The console language is stored in the browser; the sidebar gear toggles it, and the login page keeps a dedicated control.
2026-09-08 17:24:04 +08:00

50 lines
1.1 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HiDeck</title>
<script>
try {
const theme = localStorage.getItem('theme')
const dark = theme === 'dark' || theme === 'navy-night' || theme === 'classic'
document.documentElement.classList.toggle('dark', dark)
document.documentElement.classList.toggle('classic', theme === 'classic')
const locale = localStorage.getItem('hideck_locale')
document.documentElement.lang = locale === 'en' || locale === 'en-US' || locale === 'en-GB' ? 'en' : 'zh-CN'
} catch { }
</script>
<style>
:root {
color-scheme: light dark;
}
html,
body {
height: 100%;
margin: 0;
}
body {
background: #FBF9F6;
}
html.dark body {
background: #0B1420;
}
html.classic body {
background: #0d1518;
}
</style>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>