222 lines
6.9 KiB
HTML
222 lines
6.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>方案 4:Split Master-Detail 双栏沉浸分栏</title>
|
||
<style>
|
||
:root {
|
||
--color-primary: #3949AB;
|
||
--color-primary-container: #EEF2FF;
|
||
--color-surface: #FFFFFF;
|
||
--color-background: #F8FAFC;
|
||
--text-primary: #0F172A;
|
||
--text-secondary: #64748B;
|
||
--divider: #E2E8F0;
|
||
--outline: #CBD5E1;
|
||
--corner-card: 16px;
|
||
}
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
|
||
background: var(--color-background);
|
||
color: var(--text-primary);
|
||
min-height: 100vh;
|
||
-webkit-font-smoothing: antialiased;
|
||
}
|
||
.device-container {
|
||
width: 100%;
|
||
max-width: 1024px;
|
||
margin: 20px auto;
|
||
background: var(--color-surface);
|
||
border-radius: 18px;
|
||
border: 1px solid var(--divider);
|
||
overflow: hidden;
|
||
box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
|
||
}
|
||
.appbar {
|
||
height: 62px;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0 24px;
|
||
background: var(--color-surface);
|
||
border-bottom: 1px solid var(--divider);
|
||
}
|
||
.appbar-nav {
|
||
width: 38px;
|
||
height: 38px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-radius: 10px;
|
||
cursor: pointer;
|
||
background: #F1F5F9;
|
||
transition: all 0.15s ease;
|
||
}
|
||
.appbar-nav:hover { background: #E2E8F0; }
|
||
.appbar-nav svg { width: 20px; height: 20px; fill: var(--text-primary); }
|
||
.appbar-title {
|
||
font-size: 19px;
|
||
font-weight: 600;
|
||
margin-left: 14px;
|
||
}
|
||
.page-body {
|
||
padding: 28px 24px;
|
||
display: flex;
|
||
gap: 24px;
|
||
max-width: 920px;
|
||
margin: 0 auto;
|
||
}
|
||
.info-sidebar {
|
||
flex: 0 0 280px;
|
||
background: #F8FAFC;
|
||
border-radius: var(--corner-card);
|
||
padding: 24px 20px;
|
||
border: 1px solid var(--divider);
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.sidebar-icon {
|
||
width: 48px;
|
||
height: 48px;
|
||
border-radius: 12px;
|
||
background: #EEF2FF;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin-bottom: 16px;
|
||
}
|
||
.sidebar-icon svg { width: 26px; height: 26px; fill: var(--color-primary); }
|
||
.sidebar-title {
|
||
font-size: 17px;
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
margin-bottom: 6px;
|
||
}
|
||
.sidebar-desc {
|
||
font-size: 13px;
|
||
line-height: 1.5;
|
||
color: var(--text-secondary);
|
||
margin-bottom: 20px;
|
||
}
|
||
.curr-badge-box {
|
||
background: #FFFFFF;
|
||
border-radius: 12px;
|
||
padding: 14px 16px;
|
||
border: 1px solid #E2E8F0;
|
||
margin-top: auto;
|
||
}
|
||
.curr-badge-label {
|
||
font-size: 12px;
|
||
color: var(--text-secondary);
|
||
margin-bottom: 4px;
|
||
}
|
||
.curr-badge-val {
|
||
font-size: 16px;
|
||
font-weight: 700;
|
||
color: var(--color-primary);
|
||
}
|
||
.lang-main-panel {
|
||
flex: 1;
|
||
background: #FFFFFF;
|
||
border-radius: var(--corner-card);
|
||
border: 1px solid var(--divider);
|
||
overflow: hidden;
|
||
box-shadow: 0 1px 3px rgba(0,0,0,0.02);
|
||
}
|
||
.lang-row {
|
||
height: 52px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 0 20px;
|
||
cursor: pointer;
|
||
border-bottom: 1px solid var(--divider);
|
||
transition: all 0.15s ease;
|
||
}
|
||
.lang-row:last-child { border-bottom: none; }
|
||
.lang-row:hover { background: #F8FAFC; }
|
||
.lang-row.is-selected {
|
||
background: var(--color-primary-container);
|
||
}
|
||
.lang-name {
|
||
font-size: 15px;
|
||
font-weight: 500;
|
||
color: var(--text-primary);
|
||
}
|
||
.lang-row.is-selected .lang-name {
|
||
color: var(--color-primary);
|
||
font-weight: 600;
|
||
}
|
||
.radio-circle {
|
||
width: 20px;
|
||
height: 20px;
|
||
border-radius: 50%;
|
||
border: 2px solid var(--outline);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: all 0.15s ease;
|
||
background: #FFFFFF;
|
||
}
|
||
.lang-row.is-selected .radio-circle {
|
||
border-color: var(--color-primary);
|
||
}
|
||
.radio-dot {
|
||
width: 9px;
|
||
height: 9px;
|
||
border-radius: 50%;
|
||
background: var(--color-primary);
|
||
opacity: 0;
|
||
transform: scale(0.3);
|
||
transition: all 0.15s ease;
|
||
}
|
||
.lang-row.is-selected .radio-dot {
|
||
opacity: 1;
|
||
transform: scale(1);
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="device-container">
|
||
<div class="appbar">
|
||
<div class="appbar-nav">
|
||
<svg viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg>
|
||
</div>
|
||
<div class="appbar-title">语言设置</div>
|
||
</div>
|
||
<div class="page-body">
|
||
<div class="info-sidebar">
|
||
<div class="sidebar-icon">
|
||
<svg viewBox="0 0 24 24"><path d="M12.87 15.07l-2.54-2.51.03-.08c1.74-1.94 2.98-4.17 3.71-6.49H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"/></svg>
|
||
</div>
|
||
<div class="sidebar-title">系统显示语言</div>
|
||
<div class="sidebar-desc">选择后即时应用到系统所有界面与交互提示。</div>
|
||
<div class="curr-badge-box">
|
||
<div class="curr-badge-label">当前选定语言</div>
|
||
<div class="curr-badge-val" id="currLangName">中文</div>
|
||
</div>
|
||
</div>
|
||
<div class="lang-main-panel" id="langList">
|
||
<div class="lang-row" onclick="selectLang(this, 'English')"><span class="lang-name">English</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
<div class="lang-row" onclick="selectLang(this, 'Français')"><span class="lang-name">Français</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
<div class="lang-row is-selected" onclick="selectLang(this, '中文')"><span class="lang-name">中文</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
<div class="lang-row" onclick="selectLang(this, '日本語')"><span class="lang-name">日本語</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
<div class="lang-row" onclick="selectLang(this, '한국어')"><span class="lang-name">한국어</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
<div class="lang-row" onclick="selectLang(this, 'Español')"><span class="lang-name">Español</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
<div class="lang-row" onclick="selectLang(this, 'Italiano')"><span class="lang-name">Italiano</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
<div class="lang-row" onclick="selectLang(this, 'Ελληνικά')"><span class="lang-name">Ελληνικά</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
<div class="lang-row" onclick="selectLang(this, 'Português')"><span class="lang-name">Português</span><div class="radio-circle"><div class="radio-dot"></div></div></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script>
|
||
function selectLang(el, name) {
|
||
document.querySelectorAll('.lang-row').forEach(r => r.classList.remove('is-selected'));
|
||
el.classList.add('is-selected');
|
||
document.getElementById('currLangName').innerText = name;
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|