Files
mce/templates/MetaLab-2026/static/css/settings.css
Victor_Jay 39d13993ba fix: 设计原则审查修复 — DIP/ISP, LoD, DRY, OCP, URL, 301缓存
- P0 DIP+ISP: 全链路注入接口,消除零接口紧耦合
- P0 URL: auth 301→302,修复登出后浏览器缓存陷阱
- P1 DRY: JWT 认证逻辑收敛至 TokenService+中间件
- P2 DRY: 前后端角色/状态映射统一为 model 常量
- P2 LoD: 新增 SettingsController,router 不再跨层调 repo
- P2 URL: settings ?tab= → /settings/:tab 伪静态
- P3 OCP: 角色权限 map 化,告别硬编码 switch
2026-05-26 21:12:19 +08:00

216 lines
4.3 KiB
CSS

/* ============================================================
MetaLab Settings Styles — 个人设置页样式
左侧导航 + 右侧卡片信息展示,只读
============================================================ */
/* ---------- Page Body ---------- */
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* ---------- Layout ---------- */
.settings-layout {
display: flex;
flex: 1;
max-width: 1200px;
width: 100%;
margin: 0 auto;
padding: 2rem 20px;
gap: 2rem;
}
/* ---------- Left Sidebar Nav ---------- */
.settings-sidebar {
width: 220px;
flex-shrink: 0;
background: var(--color-surface);
border-radius: var(--radius);
box-shadow: var(--shadow);
border: 1px solid var(--color-border);
padding: 1.25rem 1rem;
align-self: flex-start;
}
.settings-nav {
display: flex;
flex-direction: column;
gap: 4px;
}
.settings-nav-item {
display: flex;
align-items: center;
gap: .6rem;
padding: .65rem 1rem;
border-radius: var(--radius);
font-size: .92rem;
color: var(--color-secondary);
font-weight: 500;
transition: all .15s ease;
}
.settings-nav-item:hover {
background: rgba(52, 152, 219, .06);
color: var(--color-accent);
}
.settings-nav-item.active {
background: rgba(52, 152, 219, .1);
color: var(--color-accent);
font-weight: 600;
}
.settings-nav-icon {
width: 18px;
height: 18px;
flex-shrink: 0;
}
/* ---------- Right Content Area ---------- */
.settings-main {
flex: 1;
min-width: 0;
}
.settings-card {
background: var(--color-surface);
border-radius: var(--radius);
box-shadow: var(--shadow);
border: 1px solid var(--color-border);
}
.settings-card-header {
padding: 1.5rem 2rem 0;
}
.settings-card-header h2 {
font-size: 1.25rem;
font-weight: 600;
color: var(--color-primary);
margin-bottom: .3rem;
}
.settings-card-desc {
font-size: .85rem;
color: var(--color-text-light);
padding-bottom: 1.25rem;
border-bottom: 1px solid var(--color-border);
margin-bottom: 0;
}
.settings-card-body {
padding: 1.25rem 2rem 1.5rem;
}
/* ---------- Info Rows ---------- */
.info-row {
display: flex;
align-items: flex-start;
padding: .9rem 0;
border-bottom: 1px solid #f0f0f0;
}
.info-row:last-child {
border-bottom: none;
}
.info-label {
width: 100px;
flex-shrink: 0;
font-size: .88rem;
color: var(--color-text-light);
font-weight: 500;
padding-top: 1px;
}
.info-value {
flex: 1;
font-size: .92rem;
color: var(--color-text);
min-width: 0;
word-break: break-all;
}
.info-muted {
color: #aaa;
}
.info-mono {
font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
font-size: .85rem;
background: #f5f5f5;
padding: 1px 8px;
border-radius: 4px;
}
/* ---------- Avatar Preview ---------- */
.avatar-preview {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
border: 2px solid var(--color-border);
}
/* ---------- Role Tag ---------- */
.role-tag {
display: inline-block;
padding: 2px 10px;
border-radius: 4px;
font-size: .82rem;
font-weight: 600;
}
.role-user { background: #e3f2fd; color: #1976d2; }
.role-moderator { background: #e8f5e9; color: #2e7d32; }
.role-admin { background: #fce4ec; color: #c62828; }
.role-owner { background: #fff3e0; color: #e65100; }
/* ---------- Status Badge ---------- */
.status-badge {
display: inline-block;
padding: 2px 10px;
border-radius: 12px;
font-size: .82rem;
font-weight: 600;
}
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-banned { background: #ffebee; color: #c62828; }
.status-deleted { background: #fff3e0; color: #e65100; }
.status-locked { background: #eceff1; color: #546e7a; }
/* ---------- Responsive ---------- */
@media (max-width: 768px) {
.settings-layout {
flex-direction: column;
padding: 1rem 16px;
gap: 1rem;
}
.settings-sidebar {
width: 100%;
align-self: auto;
}
.settings-nav {
flex-direction: row;
gap: 2px;
}
.settings-nav-item {
padding: .5rem .9rem;
font-size: .85rem;
}
.settings-card-header {
padding: 1.25rem 1.25rem 0;
}
.settings-card-body {
padding: 1rem 1.25rem 1.25rem;
}
}