video-shuoshan/web/src/components/Sidebar.module.css
seaislee1209 f8a39d55c7 feat(theme): 浅色主题 V2 — 玻璃质感重做 + LandingPage 浅色化 + 双语言系统
Phase A: index.css 完全重写 [data-theme="light"] block
  - 玻璃方向修正: bg-card 从 rgba(0,0,0,0.05) 黑透明 → 双 token 拆分
    --color-bg-card: #ffffff 实体白 (admin 卡)
    --color-bg-glass: rgba(255,255,255,0.65) 透明白玻璃 (sidebar/modal/banner)
  - Aurora 浅色不再 display:none, 改 pastel 紫蓝桃 0.20-0.32 alpha
  - Inset highlight 方向反转: 浅色用 rgba(255,255,255,0.50) 白高光 (玻璃顶边标志)
  - Backdrop-filter 五档标准: --bf-glass-sm/md/lg/xl (12-40px + saturate 140-180%)
  - Multi-layer shadow: --shadow-card-light (2 stops) + --shadow-glass-light (3 stops + inset)
  - 暖调 chip: --color-chip-warm-* GitBook 公告风格
  - 文字主色: #171823 微紫 → #171717 Vercel Black

Phase B: LandingPage + AuroraCanvas 浅色化
  - 移除 LandingPage 的 data-theme="dark" 强制 (V1 的回避)
  - LandingPage.module.css 21 处颜色全 var 化
  - AuroraCanvas: 订阅 useThemeStore, 新 LIGHT_ORBS 数组 pastel 紫蓝桃,
    vignette 浅色用白色, grain opacity 减半

Phase C: 13 个玻璃面升级 (3 sub-agent 并行)
  - Modal 类 (Login/ForceChange/VideoDetail.infoPanel/RecordDetail/AssetLibrary/
    Announcement/Confirm/TeamsPage.detailModal): 接入 bg-modal-glass +
    bf-glass-lg/xl + shadow-glass-light (含 inset highlight)
  - Bar/Dropdown/Toast (AnnouncementBanner/Toast/Dropdown/Select/DatePicker):
    bg-glass-strong + bf-glass-md + inset-highlight
  - Sidebar + 生成页 (Sidebar/PromptInput/GenerationCard): glass + 顶边白高光
  - AnnouncementBanner 写双套独立 [data-theme] 规则 (CSS gradient 内不能 var alpha)

Phase D: admin 实体卡 multi-layer shadow (13 处, 1 sub-agent)
  - DashboardPage / TeamsPage / UsersPage / RecordsPage / AdminAssetsPage /
    LoginRecordsPage / AuditLogsPage / ProfilePage / SettingsPage
    的 .statCard / .tableWrapper / .chartWrapper / .accordionItem 等
    加 var(--shadow-card-light) 双层柔阴影

AdminLayout 修复 (V1 漏的):
  - .layout 改 transparent, 让 AmbientBackground pastel aurora 在主区透出
  - .sidebar 加 bf-glass-md + inset highlight + 立体阴影

LoginModal / ForceChangePassword 残留 mint 清理:
  - submitBtn bg/border/color 用 mint-accent var, 字重 500→600 + 字距 0.04em
  - input:focus border 用 var(--color-mint-accent)
  - 加 bf-glass-sm + inset highlight

验证:
  - TS 编译过
  - vitest 71 fail / 162 pass 与 V1 基线完全一致, 无新增回归
  - 24 张 V2 截图位于 docs/screenshots/v2/ (本地, .gitignore 排除 png)

完成报告: docs/todo/亮色主题切换V2-完成报告.md
V2 plan: docs/todo/亮色主题切换V2.md
视觉对齐稿: docs/todo/showcase.html

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 19:46:55 +08:00

168 lines
3.1 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.sidebar {
width: 76px;
height: 100%;
background: var(--color-sidebar-bg);
backdrop-filter: var(--bf-glass-md);
-webkit-backdrop-filter: var(--bf-glass-md);
border-right: 1px solid var(--color-border-modal-soft);
/* V2 玻璃顶边白高光 + 右侧立体阴影 */
box-shadow:
inset 0 1px 0 var(--color-inset-highlight),
1px 0 0 var(--color-border-soft),
2px 0 12px rgba(0, 0, 0, 0.04);
display: flex;
flex-direction: column;
align-items: center;
padding: 16px 0;
flex-shrink: 0;
z-index: 50;
}
.logo {
margin-bottom: 28px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
.navItems {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.navItem {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 10px 0;
width: 56px;
border-radius: 8px;
color: var(--color-text-disabled);
cursor: pointer;
transition: color 0.15s, background 0.15s;
font-size: 11px;
user-select: none;
}
.navItem:hover {
color: var(--color-text-secondary);
background: var(--color-bg-upload);
}
.navItem.active {
color: var(--color-primary);
background: var(--color-sidebar-active);
}
/* Bottom section */
.bottom {
margin-top: auto;
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
padding-bottom: 8px;
}
/* Quota display — 今日剩余生成次数v0.10.0 起次数制) */
.quota {
display: flex;
flex-direction: column;
align-items: center;
gap: 3px;
cursor: pointer;
padding: 8px 4px;
border-radius: 8px;
transition: background 0.15s;
min-width: 56px;
}
.quota:hover {
background: var(--color-bg-upload);
}
.quotaNumber {
font-size: 18px;
font-weight: 600;
color: var(--color-text-primary);
line-height: 1;
font-variant-numeric: tabular-nums;
letter-spacing: 0.5px;
}
.quotaLabel {
font-size: 10px;
color: var(--color-text-secondary);
white-space: nowrap;
letter-spacing: 0.5px;
}
/* Theme toggle (moon/sun) */
.themeToggle {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 8px;
border: none;
background: transparent;
color: var(--color-text-secondary);
cursor: pointer;
transition: color 0.15s, background 0.15s;
padding: 0;
}
.themeToggle:hover {
color: var(--color-primary);
background: var(--color-bg-card);
}
/* Admin button */
.adminBtn {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 8px;
color: var(--color-text-disabled);
cursor: pointer;
transition: color 0.15s, background 0.15s;
}
.adminBtn:hover {
color: var(--color-primary);
background: var(--color-bg-card);
}
/* User avatar */
.avatar {
width: 34px;
height: 34px;
border-radius: 50%;
background: var(--color-primary);
color: var(--color-on-primary);
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: opacity 0.15s;
}
.avatar:hover {
opacity: 0.85;
}
@media (max-width: 767px) {
.sidebar {
display: none;
}
}