feat: 设计系统迁移至 Microsoft Fluent 2 / Windows 11 风格
Deploy Wiki to Production / deploy (push) Has been cancelled

- 品牌色 #1677FF → #0078D4 (Fluent Communication Blue)
- 中性色升级为 11 级 Fluent 2 阶梯 + 8 级 alpha 透明色
- 新增材质效果 (Acrylic/Mica/Smoke)、动效缓动、完整 Type Ramp
- 阴影升级为 6 级 Elevation 体系 (shadow2-64 + z-index 映射)
- index.html 全面重设计:亚克力顶栏、Fluent 卡片、Tab 风格 Chip
- 响应式断点改为 Fluent 2 标准 (639/1023/1024px)
- 字体优先 Segoe UI Variable,行高 1.4285 (20px)
- design-tokens.md 新增向后兼容矩阵与非标准文件清单
This commit is contained in:
zdh
2026-06-05 18:59:22 +08:00
parent 667786bc94
commit 798200cdd2
2 changed files with 781 additions and 217 deletions
+481 -124
View File
@@ -1,155 +1,446 @@
# UI 设计规范 — Ant Design 阿里云风格
# UI 设计规范 — Microsoft Fluent 2 / Windows 11
> 本项目的报告页面、索引页面均遵循此规范
> 设计灵感来源于 Ant Design v5 + 阿里云控制台主题
> 本项目设计系统已从 Ant Design v5(阿里云风格)迁移至 **Microsoft Fluent 2**Windows 11 风格)
> 旧 Token 名保留不变(向后兼容),新 Token 使用 `--fluent-*` 前缀
---
## 1. 配色方案
## 0. 变更日志
### 1.1 品牌色
| 日期 | 版本 | 变更 |
|------|------|------|
| 2026-06-05 | 2.0 | 主设计系统从 Ant Design v5 迁移至 Fluent 2;品牌色 `#1677FF``#0078D4`;新增材质/动效/完整色彩阶梯/字体体系;`index.html` 同步重设计 |
| ~2026-05 | 1.0 | 初始版本,基于 Ant Design v5 + 阿里云控制台风格 |
---
## 1. 品牌色
### 1.1 核心品牌色
| 用途 | Token | 值 | 说明 |
|------|-------|------|------|
| 品牌主色 | `--color-primary` | `#1677FF` | Ant Design v5 默认品牌蓝 |
| 悬停态 | `--color-primary-hover` | `#4096FF` | 主色上浮一级 |
| 激活态 | `--color-primary-active` | `#0958D9` | 主色下压一级 |
| 浅色背景 | `--color-primary-bg` | `#E6F4FF` | 品牌蓝 6% 不透明度 |
| 品牌主色 | `--color-primary` | `#0078D4` | Fluent 2 Communication Blue |
| 悬停态 | `--color-primary-hover` | `#106EBE` | shade-10 |
| 激活态 | `--color-primary-active` | `#005A9E` | shade-20 |
| 浅色背景 | `--color-primary-bg` | `#DEECF9` | tint-30 |
### 1.2 功能色
### 1.2 Fluent 2 Tint/Shade 链(新增)
| 用途 | Token | 值 |
|------|-------|------|
| 成功 | `--color-success` | `#52C41A` |
| 警告 | `--color-warning` | `#FAAD14` |
| 错误 | `--color-error` | `#FF4D4F` |
| 信息 | `--color-info` | `#1677FF` |
```
tint-40: #EFF6FC 最浅(微妙填充)
tint-30: #DEECF9 浅背景 = --color-primary-bg
tint-20: #C7E0F4 hover 填充 / focus ring
tint-10: #2B88D8 悬停轮廓 / 强调边框
primary: #0078D4 品牌主色 = --color-primary
shade-10: #106EBE 悬停态 = --color-primary-hover
shade-20: #005A9E 激活态 = --color-primary-active
shade-30: #004578 最深(高亮文字 / 深色背景)
```
### 1.3 中性色(亮色主题 / 报告页用暗色主题变体)
对应 CSS Token
| 用途 | Token | 亮色值 | 暗色值 |
|------|-------|--------|--------|
| 页面背景 | `--bg` | `#F5F5F5` | `#0B0F1A` |
| 容器背景 | `--bg-container` | `#FFFFFF` | `#111827` |
| 二级背景 | `--bg-elevated` | `#FAFAFA` | `#1A2235` |
| 边框 | `--border` | `#D9D9D9` | `#1E2A3A` |
| 边框浅 | `--border-light` | `#F0F0F0` | `#151D2E` |
| 主文字 | `--text-primary` | `#141414` | `#E8ECF1` |
| 次要文字 | `--text-secondary` | `#595959` | `#8892A4` |
| 辅助文字 | `--text-tertiary` | `#8C8C8C` | `#5A6478` |
### 1.4 渐变色
| 用途 | 值 |
|------|------|
| 标题渐变 | `linear-gradient(135deg, #1677FF 0%, #722ED1 100%)` |
| 成功渐变 | `linear-gradient(135deg, #52C41A 0%, #1677FF 100%)` |
| Token | 值 |
|-------|-----|
| `--fluent-primary-tint-40` | `#EFF6FC` |
| `--fluent-primary-tint-30` | `#DEECF9` |
| `--fluent-primary-tint-20` | `#C7E0F4` |
| `--fluent-primary-tint-10` | `#2B88D8` |
| `--fluent-primary-shade-10` | `#106EBE` |
| `--fluent-primary-shade-20` | `#005A9E` |
| `--fluent-primary-shade-30` | `#004578` |
---
## 2. 字体规范
## 2. 功能色
基于 Ant Design 动态秩序原则,基准字号 **14px**,行高 **22px**
| 用途 | Token | 值 | Fluent 语义 |
|------|-------|------|------------|
| 成功 | `--color-success` | `#107C10` | Green (深绿,更专业) |
| 警告 | `--color-warning` | `#FF8C00` | Orange (取代琥珀色) |
| 错误 | `--color-error` | `#FF4D4F` | Red (保留 Ant Design 红,对比度更优) |
| 级别 | 字号 | 行高 | 字重 | 场景 |
### 2.1 功能色浅色背景(新增)
| Token | 值 | 说明 |
|-------|-----|------|
| `--fluent-success-bg` | `#DFF6DD` | 成功态浅色背景 |
| `--fluent-warning-bg` | `#FFF4CE` | 警告态浅色背景 |
| `--fluent-error-bg` | `#FDE7E9` | 错误态浅色背景 |
| `--fluent-success-border` | `#A7E3A1` | 成功态边框 |
| `--fluent-warning-border` | `#FFD335` | 警告态边框 |
| `--fluent-error-border` | `#EEACB2` | 错误态边框 |
### 2.2 废弃 Token
| Token | 状态 | 说明 |
|-------|------|------|
| `--color-info` | **已移除** | 0 个文件使用,死 Token |
---
## 3. 中性色
### 3.1 Fluent 2 完整中性阶梯
```css
--fluent-neutral-0: #FFFFFF; 纯白页面/卡片背景
--fluent-neutral-2: #F8F8F8; 微妙灰
--fluent-neutral-4: #F4F4F4;
--fluent-neutral-6: #F2F2F2;
--fluent-neutral-8: #EBEBEB;
--fluent-neutral-10: #E1DFDD; 边框色
--fluent-neutral-20: #C8C8C8;
--fluent-neutral-30: #A6A6A6; 占位文字 / disabled
--fluent-neutral-60: #666666; 次要文字
--fluent-neutral-70: #3C3C3C;
--fluent-neutral-80: #201F1E; 主文字
```
### 3.2 旧 Token → 新值映射(亮色)
| Token | 旧值 (AntD) | 新值 (Fluent 2) | 对应 Fluent Token |
|-------|------------|----------------|-------------------|
| `--bg` | `#F5F5F5` | `#FAF9F8` | neutral-2 |
| `--bg-container` | `#FFFFFF` | `#FFFFFF` | neutral-0 |
| `--bg-elevated` | `#FAFAFA` | `#F3F2F1` | neutral-4 |
| `--border` | `#D9D9D9` | `#E1DFDD` | neutral-10 |
| `--border-light` | `#F0F0F0` | `#EDEBE9` | neutral-8 |
| `--text-primary` | `#141414` | `#201F1E` | neutral-80 |
| `--text-secondary` | `#595959` | `#605E5C` | neutral-70 |
| `--text-tertiary` | `#8C8C8C` | `#8A8886` | neutral-60 |
### 3.3 暗色主题(`[data-theme="dark"]`
| Token | 旧值 (AntD) | 新值 (Fluent 2 Dark) |
|-------|------------|---------------------|
| `--bg` | `#0B0F1A` / `#111111` | `#1F1F1F` |
| `--bg-container` | `#111827` / `#1C1C1E` | `#292929` |
| `--bg-elevated` | `#1A2235` / `#242426` | `#333333` |
| `--border` | `#1E2A3A` / `#3A3A3C` | `#474747` |
| `--border-light` | `#151D2E` / `#2C2C2E` | `#3D3D3D` |
| `--text-primary` | `#E8ECF1` / `#D1D1D6` | `#DADADA` |
| `--text-secondary` | `#8892A4` / `#8E8E93` | `#A0A0A0` |
| `--text-tertiary` | `#5A6478` / `#636366` | `#7A7A7A` |
暗色品牌色:
| Token | 值 |
|-------|-----|
| `--color-primary` (dark) | `#479EF5` |
| `--color-primary-bg` (dark) | `rgba(71,158,245,0.15)` |
### 3.4 透明中性色(Fluent Alpha 系列,新增)
```css
--fluent-alpha-2: rgba(0,0,0,0.02);
--fluent-alpha-4: rgba(0,0,0,0.04);
--fluent-alpha-8: rgba(0,0,0,0.08);
--fluent-alpha-10: rgba(0,0,0,0.10);
--fluent-alpha-20: rgba(0,0,0,0.20);
--fluent-alpha-30: rgba(0,0,0,0.30);
--fluent-alpha-40: rgba(0,0,0,0.40);
--fluent-alpha-80: rgba(0,0,0,0.80);
```
暗色对应 `rgba(255, 255, 255, ...)`
---
## 4. 字体规范
### 4.1 字体族
```css
/* 正文(优先 Windows 11 可变字体) */
--fluent-font-family-text: 'Segoe UI Variable Text', 'Segoe UI', system-ui,
-apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
/* 标题 / 大字号展示 */
--fluent-font-family-display: 'Segoe UI Variable Display', 'Segoe UI',
system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
/* 等宽代码 */
--fluent-font-family-monospace: 'Cascadia Code', 'Fira Code', 'SF Mono',
'Menlo', 'Monaco', 'Courier New', monospace;
/* 旧版兼容(无 Segoe UI Variable 的旧系统自动回退) */
--font-family: var(--fluent-font-family-text);
```
### 4.2 字号阶梯(Fluent 2 Type Ramp
| 级别 | 字号 | 行高 | 字重 | 用途 |
|------|------|------|------|------|
| H1 页面标题 | 30px | 38px | 700 | 报告页眉标题 |
| H2 区块标题 | 24px | 32px | 600 | 报告 section 标题 |
| H3 小节标题 | 20px | 28px | 600 | 子章节标题 |
| H4 小标题 | 16px | 24px | 600 | 卡片内标题 |
| Body 正文 | 14px | 22px | 400 | 正文内容 |
| Caption 辅助 | 12px | 20px | 400 | 标签、注释、日期 |
| Caption 2 | 10px | 14px | 400 | 极小辅助文字 |
| Caption 1 | 12px | 16px | 400 | 辅助文字 / Tag / 日期 |
| **Body 1** | **14px** | **20px** | **400** | **正文(基准)** |
| Body 1 Strong | 14px | 20px | 600 | 强调正文 |
| Subtitle 2 | 16px | 22px | 600 | 卡片标题 |
| Subtitle 1 | 20px | 26/28px | 600 | 小节标题 |
| Title 3 | 24px | 32px | 600 | 区域标题 |
| Title 2 | 28px | 36px | 600 | 页面标题 |
| Title 1 | 32px | 40px | 600 | 大标题 |
| Large Title | 40px | 52px | 600 | Hero 标题 |
| Display | 68px | 92px | 600 | 超大展示 |
### 字体族
**与旧版(Ant Design)差异**
- 正文行高 `22px → 20px`(更紧凑,Fluent 标准)
- 同一字号提供 Regular/Semibold/Bold 字重变体
- 新增 Display (68px) 和 Large Title (40px) 级别
---
## 5. 圆角规范
### 5.1 旧 Token → 新值
| Token | 旧值 | 新值 (Fluent 2) | 使用场景 |
|-------|------|----------------|---------|
| `--radius-xs` | 2px | 2px | Tag、极小 Badge |
| `--radius-sm` | 6px | **4px** | 按钮、输入框(Fluent 基准) |
| `--radius-md` | 8px | **6px** | 卡片、面板 |
| `--radius-lg` | 12px | **8px** | 弹窗、大容器 |
### 5.2 新增 Fluent 命名 Token
| Token | 值 | 说明 |
|-------|-----|------|
| `--fluent-radius-none` | 0px | 无线条 |
| `--fluent-radius-small` | 2px | = `--radius-xs` |
| `--fluent-radius-medium` | 4px | = `--radius-sm` |
| `--fluent-radius-large` | 6px | = `--radius-md` |
| `--fluent-radius-xlarge` | 8px | = `--radius-lg` |
| `--fluent-radius-circular` | 9999px | 胶囊形 / 圆形 |
---
## 6. 间距规范
### 6.1 旧版(保留,标记 Legacy
基于 8px 基准,仅 3 个文件使用:
| Token | 值 | 状态 |
|-------|-----|------|
| `--space-xs` | 4px | Legacy — 已使用 |
| `--space-sm` | 8px | Legacy — 已使用 |
| `--space-md` | 12px | Legacy — 已使用 |
| `--space-lg` | 16px | Legacy — 已使用 |
| `--space-xl` | 24px | Legacy — 已使用 |
| `--space-2xl` | 32px | Legacy — 已使用 |
| `--space-3xl` | 48px | Legacy — 已使用 |
### 6.2 Fluent 2 间距阶梯(推荐新工作使用)
基于 4px 基准,17 级:
| Token | 值 | 使用场景 |
|-------|-----|---------|
| `--fluent-spacing-2xs` | 2px | 图标对齐微调 |
| `--fluent-spacing-xs` | 4px | 极紧凑 |
| `--fluent-spacing-sm` | 8px | 小间距 |
| `--fluent-spacing-md` | 12px | 中等间距 |
| `--fluent-spacing-lg` | 16px | 标准间距 |
| `--fluent-spacing-xl` | 20px | 紧凑段落 |
| `--fluent-spacing-2xl` | 24px | 大间距 |
| `--fluent-spacing-3xl` | 28px | 区块间距 |
| `--fluent-spacing-4xl` | 32px | — |
| `--fluent-spacing-5xl` | 40px | — |
| `--fluent-spacing-6xl` | 48px | 大区块间距 |
| `--fluent-spacing-7xl` | 56px | 最大间距 |
---
## 7. 阴影与层级
### 7.1 旧 Token → 新值
| Token | 新值 (Fluent 2) |
|-------|----------------|
| `--shadow-sm` | `0 0 2px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14)` |
| `--shadow-md` | `0 0 2px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.14)` |
| `--shadow-lg` | `0 0 2px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.14)` |
### 7.2 Fluent 2 完整 Elevation 体系(新增)
| Token | z-index 层级 | 使用场景 |
|-------|-------------|---------|
| `--fluent-shadow-2` | 100 | 卡片静止态 |
| `--fluent-shadow-4` | 200 | 卡片悬停 / Tooltip |
| `--fluent-shadow-8` | 300 | 下拉菜单 / Flyout |
| `--fluent-shadow-16` | 400 | 对话框 / Modal |
| `--fluent-shadow-28` | 500 | 抽屉侧栏 / 教学气泡 |
| `--fluent-shadow-64` | 600 | 通知 / Toast |
### 7.3 z-index 层级表
| 层级 | z-index | 元素 |
|------|---------|------|
| Base | 0 | 正文内容 |
| Sticky | 90 | Chip 筛选栏 |
| Header | 100 | 顶栏 / 卡片静止 |
| Overlay | 200 | 遮罩层 / Tooltip |
| Flyout | 300 | 下拉菜单 |
| Modal | 400 | 模态弹窗 |
| Drawer | 500 | 抽屉 |
| Toast | 600 | 通知 |
---
## 8. 材质效果(Fluent 2 独有,新增)
### 8.1 Acrylic(亚克力)
半透明模糊材质,用于导航栏、侧栏面板:
```css
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
'Helvetica Neue', Helvetica, Arial, sans-serif;
--fluent-acrylic-default: rgba(255, 255, 255, 0.7);
--fluent-acrylic-dark: rgba(47, 47, 47, 0.85);
--fluent-backdrop-blur: 40px;
/* 使用示例 */
.header {
background: var(--fluent-acrylic-default);
backdrop-filter: blur(var(--fluent-backdrop-blur)) saturate(125%);
border-bottom: 0.5px solid var(--fluent-alpha-4);
}
```
代码字体:
### 8.2 Mica(云母)
采样桌面壁纸色调的微弱材质,用于标题栏背景:
```css
font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
--fluent-mica-bg: rgba(243, 242, 241, 0.7);
--fluent-mica-bg-dark: rgba(32, 31, 30, 0.7);
/* 使用示例 */
.title-bar {
background: var(--fluent-mica-bg);
backdrop-filter: blur(8px);
}
```
### 8.3 Smoke(烟雾遮罩)
用于 Modal / Flyout 背后的遮罩层:
```css
--fluent-smoke-default: rgba(0, 0, 0, 0.4);
```
---
## 3. 圆角规范
## 9. 动效与缓动(新增)
Ant Design v5 四级圆角体系:
### 9.1 缓动曲线
| Token | 值 | 使用场景 |
|-------|------|---------|
| `radius-xs` | 2px | Tag、Badge |
| `radius-sm` | 6px | Input、Button、小卡片 |
| `radius-md` | 8px | Card、Panel、大卡片 |
| `radius-lg` | 12px | Modal、弹窗、大容器 |
```css
--fluent-easing-accelerate: cubic-bezier(0.9, 0.1, 1.0, 0.2); /* 元素离开 */
--fluent-easing-decelerate: cubic-bezier(0.1, 0.9, 0.2, 1.0); /* 元素进入 */
--fluent-easing-standard: cubic-bezier(0.8, 0.0, 0.2, 1.0); /* 通用状态变化 */
```
### 9.2 时长
```css
--fluent-duration-faster: 83ms; /* 微交互(ripple、hover 开始) */
--fluent-duration-fast: 100ms; /* hover 进出 */
--fluent-duration-normal: 167ms; /* 标准过渡 */
--fluent-duration-slow: 250ms; /* 面板展开/关闭 */
--fluent-duration-slower: 333ms; /* 页面过渡 */
```
### 9.3 过渡速查
| 场景 | 属性 | 时长 | 缓动 |
|------|------|------|------|
| 链接颜色 | color | 100ms | standard |
| 卡片悬停 | box-shadow | 167ms | standard |
| 按钮 hover | background | 100ms | decelerate |
| 面板展开 | max-height | 250ms | standard |
| 抽屉进出 | transform | 250ms | standard |
| 遮罩淡入 | opacity | 167ms | decelerate |
---
## 4. 间距规范
基于 **8px** 基准单位:
| Token | 值 | 使用场景 |
|-------|------|---------|
| `space-xs` | 4px | 极紧凑间距 |
| `space-sm` | 8px | 小间距 |
| `space-md` | 12px | 中等间距 |
| `space-lg` | 16px | 标准间距 |
| `space-xl` | 24px | 大间距 |
| `space-2xl` | 32px | 区块间距 |
| `space-3xl` | 48px | 大区块间距 |
---
## 5. 布局规范
## 10. 布局规范
| 元素 | 值 | 说明 |
|------|------|------|
| 顶栏高度 | `64px` | Ant Design 标准顶栏 |
| 侧栏宽度 | `260px` | 目录导航 |
| 内容区最大宽度 | `1200px` | 居中显示 |
| 内容区内边距 | `32px 40px` | 桌面端 |
| 移动端内边距 | `16px` | ≤768px |
| 顶栏高度 (`--header-h`) | `64px` | Fluent / Ant Design 通用 |
| 侧栏宽度 (`--sidebar-w`) | `260px` | 桌面端导航 |
| 内容区最大宽度 | `1200px` | 标准内容区 |
| 宽版内容区 | `1600px` | 大屏仪表盘 / Landing |
| 边距 | `5%` | 流式响应(Fluent 风格) |
| 移动端内边距 | `16px` | ≤639px |
---
## 6. 阴影规范
## 11. 响应式断点
| Token | 值 | 使用场景 |
|-------|------|---------|
| `shadow-sm` | `0 1px 2px rgba(0,0,0,0.03), 0 1px 6px -1px rgba(0,0,0,0.02)` | 小卡片 |
| `shadow-md` | `0 2px 4px rgba(0,0,0,0.04), 0 4px 12px -2px rgba(0,0,0,0.04)` | 卡片悬停 |
| `shadow-lg` | `0 4px 8px rgba(0,0,0,0.06), 0 8px 24px -4px rgba(0,0,0,0.08)` | 弹窗、下拉 |
Fluent 2 使用自有断点体系(取代 Ant Design 断点):
暗色主题变体将 rgba 的 alpha 值减半。
| 断点 | 值 | 说明 |
|------|------|------|
| sm | 480px | 小手机横屏 |
| md | 640px | 平板竖屏(侧栏隐藏) |
| lg | 1024px | 平板横屏(紧凑侧栏) |
| xl | 1366px | 桌面完整布局 |
| xxl | 1920px | 大屏 |
**本项目使用**
- `≤639px`:移动端 — 隐藏侧栏,显示 Chip 筛选 + 抽屉导航
- `640px1023px`:平板 — 紧凑侧栏(220px
- `≥1024px`:桌面 — 完整布局(260px 侧栏)
---
## 7. 组件规范
## 12. 组件规范
### 7.1 卡片 Card
### 12.1 卡片 CardFluent 2 风格)
- 背景:`--bg-container`
- 边框:`1px solid --border`
- 圆角:`8px`
- 内边距:`24px`
- 悬停:边框色变为 `--color-primary`,添加 `shadow-md`
- 过渡:`all 0.2s ease`
- 圆角:`6px``--radius-md`
- 内边距:`20px`
- 静止态:`box-shadow: var(--fluent-shadow-2)`(极淡阴影)
- 悬停态:`box-shadow: var(--fluent-shadow-4)`(上浮一层),边框色不变
- 过渡:`box-shadow var(--fluent-duration-normal) var(--fluent-easing-standard)`
- **移除**:旧版 `border-color` 变色 + `transform: scale(0.99)` 点击缩放
### 7.2 标签 Badge
### 12.2 标签 Badge
- 内边距:`2px 10px`
- 圆角:`12px`(胶囊形)
- 圆角:`2px``--radius-xs`Fluent 直角风格) 或 `12px`(胶囊形,按场景选择
- 字号:`12px`
- 字重:`600`
- 背景:对应功能色的 10% 不透明度
- 边框:`1px solid` 对应功能色的 25% 不透明度
- 背景:`--fluent-primary-tint-30`
- 文字色:`--color-primary`
### 7.3 表格 Table
### 12.3 按钮 Button
- 主按钮背景:`--color-primary`
- 主按钮文字:`#FFFFFF`
- 次要按钮背景:`transparent`
- 次要按钮边框:`1px solid --border`
- 圆角:`4px``--fluent-radius-medium`
- 最小高度:`32px`
- hover:背景色上浮至 `shade-10` / `tint-30`
- 过渡:`background var(--fluent-duration-fast) var(--fluent-easing-decelerate)`
### 12.4 输入框 Input
- 边框:`1px solid --border`
- 圆角:`4px``--fluent-radius-medium`
- Focus ring`0 0 0 2px var(--fluent-primary-tint-20)`(外发光,不占布局)
- 内边距:`8px 12px`
- 颜色:`--text-primary`
- 占位符:`--text-tertiary`
### 12.5 表格 Table
- 表头背景:`--bg-elevated`
- 表头字重:`600`
@@ -157,56 +448,122 @@ Ant Design v5 四级圆角体系:
- 单元格内边距:`10px 14px`
- 边框:`1px solid --border`
- 表头 sticky top: 0
- 行悬停:背景色变为 `--color-primary-bg`
- 行悬停:背景色变为 `--color-primary-bg``tint-30`
- 圆角:`6px`(整表圆角)
### 7.4 代码 Code
### 12.6 代码 Code
- 背景:`--bg-elevated`
- 内边距:`2px 8px`
- 圆角:`4px`
- 字号:`13px`
- 字体:monospace
- 颜色:`--color-success`(暗色主题)/ `--color-primary`(亮色主题)
- 字体:`--fluent-font-family-monospace`
- 颜色:`--color-primary`
### 7.5 代码块 CodeBlock
### 12.7 代码块 CodeBlock
- 背景:`--bg-elevated`
- 边框:`1px solid --border`
- 圆角:`8px`
- 圆角:`6px``--radius-md`
- 内边距:`16px`
- 行高:`1.7`
- 字体:`--fluent-font-family-monospace`
### 12.8 导航项 NavItem(侧栏)
- 圆角:`4px``--radius-sm`
- 内边距:`8px 12px`
- 激活态背景:`--fluent-primary-tint-30``#DEECF9`
- 激活态文字:`--color-primary`
- 激活态字重:`500`
- hover 背景:`--bg-elevated`
- 移动端最小高度:`44px`(触控友好)
---
## 8. 主题
## 13. 渐变色
- **索引页(`index.html`**:支持亮色/暗色双主题,通过 `data-theme` 属性 + localStorage 键 `wiki-theme` 持久化,同时跟随 `prefers-color-scheme: dark` 系统偏好
- **报告页(`{主题}/报告/*.html`)**:统一使用**亮色主题**,不定义暗色 CSS 变量
| 用途 | 值 |
|------|-----|
| 标题渐变 | `linear-gradient(135deg, #0078D4 0%, #2B88D8 100%)` |
| 强调渐变 | `linear-gradient(135deg, #0078D4 0%, #106EBE 100%)` |
亮色/暗色两套颜色 Token 值在 §1 中已定义,索引页 `:root``[data-theme="dark"]` 选择器分别引用
> **注意**:旧版标题渐变包含 `#722ED1`(紫色),约 34 个文件在 HTML 中直接硬编码该值。这些文件在独立打开时不使用此规范;通过 `index.html` iframe 导航时才能继承 CSS 变量
---
## 9. 动画与过渡
## 14. 主题架构
| 元素 | 过渡 |
|------|------|
| 卡片悬停 | `all 0.2s ease` |
| 链接颜色 | `color 0.15s ease` |
| 侧栏导航激活态 | `all 0.15s ease` |
| 滚动指示器 | `all 0.15s ease` |
- **索引页(`index.html`**:支持亮色/暗色双主题,通过 `data-theme` 属性切换
- 优先级:`localStorage('wiki-theme')``prefers-color-scheme: dark` 系统偏好 → light
- 暗色模式使用 Fluent 2 暗色中性色 + `#479EF5` 品牌色
- 亮色模式背景使用 `#FAF9F8`Fluent neutral-2
- **报告页**:统一使用**亮色主题**,不定义暗色 CSS 变量。通过 `index.html` iframe 导航时继承 Token 值
---
## 10. 响应式断点
## 15. 向后兼容矩阵
| 断点 | 值 | 说明 |
|------|------|------|
| sm | 576px | 手机横屏 |
| md | 768px | 平板竖屏 |
| lg | 992px | 平板横屏 |
| xl | 1200px | 桌面 |
### 15.1 已迁移(旧名 = 新值)
- `≤768px`:隐藏侧栏,全宽内容
- `≤992px`:缩小侧栏至 220px,减小内边距
- `>992px`:完整布局
| 旧 Token | 新值来源 | 视觉变化 |
|----------|---------|---------|
| `--color-primary` | Fluent `#0078D4` | 偏青蓝(原 `#1677FF` 偏紫蓝) |
| `--color-primary-hover` | Fluent shade-10 `#106EBE` | 更深 |
| `--color-primary-active` | Fluent shade-20 `#005A9E` | 更深 |
| `--color-primary-bg` | Fluent tint-30 `#DEECF9` | 几乎一致 |
| `--color-success` | Fluent `#107C10` | **显著变化**:亮绿→深绿 |
| `--color-warning` | Fluent `#FF8C00` | 琥珀→橙色 |
| `--color-error` | 保留 `#FF4D4F` | 不变 |
| `--bg` | Fluent neutral-2 `#FAF9F8` | 微调 |
| `--bg-elevated` | Fluent neutral-4 `#F3F2F1` | 微调 |
| `--border` | Fluent neutral-10 `#E1DFDD` | 微调 |
| `--text-primary/secondary/tertiary` | Fluent neutral-80/70/60 | 暗色文本对比度改善 |
| `--radius-sm/md/lg` | Fluent 4/6/8px | 整体更方正 |
| `--shadow-sm/md/lg` | Fluent elevation 2/4/8 | 更轻、更自然 |
| `--gradient-title` | 纯蓝渐变(移除紫色) | 34 个硬编码文件不受影响 |
### 15.2 未迁移(独立 Token 体系的文件)
以下 7 个文件使用独立的命名体系,不受本次迁移影响:
| 文件 | Token 体系 | 命名示例 |
|------|-----------|---------|
| `深国际综合改革方案/index.html` | 自定 + 部分标准 | `--primary: #1a3a5c`, `--accent: #c8102e` |
| `深国际综合改革方案/报告/*.html` (3 文件) | 自定 + 部分标准 | 同上 |
| `YqBoot系统说明书/系统说明书.html` | Google 风格 | `--primary: #1a73e8` |
| `YqBoot系统说明书/系统说明书-演示文稿.html` | Google 风格 | 同上 |
| `政府审批流解决方案/政府审批流解决方案.html` | 暗红金色 | `--primary: #8B0000`, `--accent: #C9A84C` |
| `中医馆内部管理系统/报告/*.html` (2 文件) | 多色功能色 | `--green/red/orange/purple` |
| `szihl-soe-reform-report.html` | 混合 | 标准 + `--accent: #c8102e` + 暗色模式 |
### 15.3 废弃 Token
| Token | 原因 |
|-------|------|
| `--color-info` | 定义但从未被 `var()` 引用 |
---
## 16. 图标规范
| 规则 | Do | Don't |
|------|----|----- |
| 图标来源 | SVG Icon 库(Heroicons / Lucide | Emoji 作为 UI 图标 |
| 图标尺寸 | 固定 24×24 viewBox`w-6 h-6` | 混合不同尺寸 |
| 品牌 Logo | 从 Simple Icons 获取官方 SVG | 猜测或使用错误路径 |
| 悬停反馈 | `transition-colors duration-200` | 瞬时状态变化 |
| 触控目标 | 最小 44×44px | 不可点击区域 |
---
## 参考资料
- [Fluent 2 Design System](https://fluent2.microsoft.design)
- [Fluent 2 Design Tokens](https://fluent2.microsoft.design/design-tokens)
- [Fluent 2 Typography](https://fluent2.microsoft.design/typography)
- [Fluent 2 Layout](https://fluent2.microsoft.design/layout)
- [Fluent 2 Shapes](https://fluent2.microsoft.design/shapes)
- [Windows 11 Design Principles](https://learn.microsoft.com/en-us/windows/apps/design/design-principles)
- [Windows 11 Typography](https://learn.microsoft.com/en-gb/windows/apps/design/signature-experiences/typography)
- [Fluent UI Web Components Design Tokens](https://learn.microsoft.com/en-gb/fluent-ui/web-components/design-system/design-tokens)
+300 -93
View File
@@ -5,101 +5,233 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wiki — 一人公司知识库</title>
<style>
/* ===== Fluent 2 / Windows 11 Design Tokens ===== */
:root {
--color-primary: #1677FF;
--color-primary-hover: #4096FF;
--color-primary-active: #0958D9;
--color-primary-bg: #E6F4FF;
--bg: #F5F5F5;
/* Brand — Fluent 2 Communication Blue */
--color-primary: #0078D4;
--color-primary-hover: #106EBE;
--color-primary-active: #005A9E;
--color-primary-bg: #DEECF9;
/* Functional */
--color-success: #107C10;
--color-warning: #FF8C00;
--color-error: #FF4D4F;
/* Neutral — light */
--bg: #FAF9F8;
--bg-container: #FFFFFF;
--bg-elevated: #FAFAFA;
--border: #D9D9D9;
--border-light: #F0F0F0;
--text-primary: #141414;
--text-secondary: #595959;
--text-tertiary: #8C8C8C;
--radius-sm: 6px;
--radius-md: 8px;
--radius-lg: 12px;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.03), 0 1px 6px -1px rgba(0,0,0,0.02);
--shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 4px 12px -2px rgba(0,0,0,0.04);
--bg-elevated: #F3F2F1;
--border: #E1DFDD;
--border-light: #EDEBE9;
--text-primary: #201F1E;
--text-secondary: #605E5C;
--text-tertiary: #8A8886;
/* Radius */
--radius-xs: 2px;
--radius-sm: 4px;
--radius-md: 6px;
--radius-lg: 8px;
/* Shadows — Fluent 2 elevation */
--shadow-sm: 0 0 2px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14);
--shadow-md: 0 0 2px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.14);
--shadow-lg: 0 0 2px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.14);
/* Layout */
--header-h: 64px;
--sidebar-w: 260px;
--drawer-bg: #FFFFFF;
/* === Added: Fluent 2 native tokens === */
/* Brand tint/shade chain */
--fluent-primary-tint-40: #EFF6FC;
--fluent-primary-tint-30: #DEECF9;
--fluent-primary-tint-20: #C7E0F4;
--fluent-primary-tint-10: #2B88D8;
--fluent-primary-shade-10: #106EBE;
--fluent-primary-shade-20: #005A9E;
--fluent-primary-shade-30: #004578;
/* Functional backgrounds */
--fluent-success-bg: #DFF6DD;
--fluent-warning-bg: #FFF4CE;
--fluent-error-bg: #FDE7E9;
--fluent-success-border: #A7E3A1;
--fluent-warning-border: #FFD335;
--fluent-error-border: #EEACB2;
/* Neutral alpha overlay */
--fluent-alpha-2: rgba(0,0,0,0.02);
--fluent-alpha-4: rgba(0,0,0,0.04);
--fluent-alpha-8: rgba(0,0,0,0.08);
--fluent-alpha-10: rgba(0,0,0,0.10);
--fluent-alpha-20: rgba(0,0,0,0.20);
--fluent-alpha-30: rgba(0,0,0,0.30);
--fluent-alpha-40: rgba(0,0,0,0.40);
/* Radius — Fluent naming */
--fluent-radius-medium: 4px;
--fluent-radius-large: 6px;
--fluent-radius-xlarge: 8px;
--fluent-radius-circular: 9999px;
/* Shadows — Fluent elevation system */
--fluent-shadow-2: 0 0 2px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.14);
--fluent-shadow-4: 0 0 2px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.14);
--fluent-shadow-8: 0 0 2px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.14);
--fluent-shadow-16: 0 0 2px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.14);
--fluent-shadow-28: 0 0 2px rgba(0,0,0,0.12), 0 14px 28px rgba(0,0,0,0.14);
--fluent-shadow-64: 0 0 2px rgba(0,0,0,0.12), 0 32px 64px rgba(0,0,0,0.14);
/* Material */
--fluent-acrylic-default: rgba(255,255,255,0.7);
--fluent-mica-bg: rgba(243,242,241,0.7);
--fluent-smoke-default: rgba(0,0,0,0.4);
--fluent-backdrop-blur: 40px;
/* Motion */
--fluent-easing-accelerate: cubic-bezier(0.9, 0.1, 1.0, 0.2);
--fluent-easing-decelerate: cubic-bezier(0.1, 0.9, 0.2, 1.0);
--fluent-easing-standard: cubic-bezier(0.8, 0.0, 0.2, 1.0);
--fluent-duration-faster: 83ms;
--fluent-duration-fast: 100ms;
--fluent-duration-normal: 167ms;
--fluent-duration-slow: 250ms;
--fluent-duration-slower: 333ms;
/* Typography */
--fluent-font-family-text: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
--fluent-font-family-display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
--fluent-font-family-monospace: 'Cascadia Code', 'Fira Code', 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
}
/* ===== Dark Theme — Fluent 2 Dark ===== */
[data-theme="dark"] {
--color-primary: #177DDC;
--color-primary-hover: #4096FF;
--color-primary-active: #0958D9;
--color-primary-bg: rgba(23,125,220,0.15);
--bg: #111111;
--bg-container: #1C1C1E;
--bg-elevated: #242426;
--border: #3A3A3C;
--border-light: #2C2C2E;
--text-primary: #D1D1D6;
--text-secondary: #8E8E93;
--text-tertiary: #636366;
--shadow-sm: 0 1px 2px rgba(0,0,0,0.15), 0 1px 4px -1px rgba(0,0,0,0.1);
--shadow-md: 0 2px 4px rgba(0,0,0,0.2), 0 4px 10px -2px rgba(0,0,0,0.15);
--drawer-bg: #1C1C1E;
--color-primary: #479EF5;
--color-primary-hover: #60A5FA;
--color-primary-active: #3B8AD9;
--color-primary-bg: rgba(71,158,245,0.15);
--bg: #1F1F1F;
--bg-container: #292929;
--bg-elevated: #333333;
--border: #474747;
--border-light: #3D3D3D;
--text-primary: #DADADA;
--text-secondary: #A0A0A0;
--text-tertiary: #7A7A7A;
--drawer-bg: #292929;
/* Dark material */
--fluent-acrylic-default: rgba(47,47,47,0.85);
--fluent-mica-bg: rgba(32,31,30,0.7);
--fluent-smoke-default: rgba(0,0,0,0.6);
/* Dark alpha */
--fluent-alpha-2: rgba(255,255,255,0.02);
--fluent-alpha-4: rgba(255,255,255,0.04);
--fluent-alpha-8: rgba(255,255,255,0.08);
--fluent-alpha-10: rgba(255,255,255,0.10);
--fluent-alpha-20: rgba(255,255,255,0.20);
--fluent-alpha-30: rgba(255,255,255,0.30);
--fluent-alpha-40: rgba(255,255,255,0.40);
/* Dark functional backgrounds */
--fluent-success-bg: rgba(16,124,16,0.15);
--fluent-warning-bg: rgba(255,140,0,0.15);
--fluent-error-bg: rgba(255,77,79,0.15);
}
/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-family: var(--fluent-font-family-text);
background: var(--bg); color: var(--text-primary);
line-height: 1.57; font-size: 14px; min-height: 100vh;
line-height: 1.4285; font-size: 14px; min-height: 100vh;
-webkit-tap-highlight-color: transparent;
transition: background 0.2s ease, color 0.2s ease;
transition: background var(--fluent-duration-normal) var(--fluent-easing-standard),
color var(--fluent-duration-normal) var(--fluent-easing-standard);
}
/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
/* ===== Header — Fluent 2 Acrylic Command Bar ===== */
.header-bar {
position: sticky; top: 0; height: var(--header-h);
background: rgba(255,255,255,0.85); backdrop-filter: blur(12px);
background: var(--fluent-acrylic-default);
backdrop-filter: blur(var(--fluent-backdrop-blur)) saturate(125%);
-webkit-backdrop-filter: blur(var(--fluent-backdrop-blur)) saturate(125%);
border-bottom: 1px solid var(--border-light);
display: flex; align-items: center; justify-content: center; padding: 0 2rem; z-index: 100; gap: 16px;
display: flex; align-items: center; justify-content: center;
padding: 0 2rem; z-index: 100; gap: 16px;
}
.header-bar-inner {
display: flex; align-items: center; gap: 16px;
max-width: 1200px; width: 100%;
}
.header-bar-inner { display: flex; align-items: center; gap: 16px; max-width: 1200px; width: 100%; }
[data-theme="dark"] .header-bar { background: rgba(28,28,30,0.85); }
.header-bar .menu-btn {
width: 36px; height: 36px; border: none; background: none;
cursor: pointer; border-radius: var(--radius-sm);
display: flex; align-items: center; justify-content: center;
flex-shrink: 0; padding: 0;
color: var(--text-secondary);
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.header-bar .menu-btn:hover { background: var(--bg-elevated); }
.header-bar .menu-btn svg { width: 20px; height: 20px; color: var(--text-secondary); }
.header-bar .menu-btn svg { width: 20px; height: 20px; }
.header-bar .brand { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.header-bar h1 {
font-size: 18px; font-weight: 700;
background: linear-gradient(135deg, var(--color-primary) 0%, #722ED1 100%);
background: linear-gradient(135deg, #0078D4 0%, #2B88D8 100%);
-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.header-bar .tagline { font-size: 12px; color: var(--text-tertiary); display: inline; }
/* Search — Fluent 2 outline input */
.search-box { flex: 1; min-width: 120px; max-width: 360px; position: relative; }
.search-box input {
width: 100%; padding: 8px 12px 8px 34px;
border: 1px solid var(--border); border-radius: var(--radius-sm);
font-size: 14px; outline: none; background: var(--bg-elevated); color: var(--text-primary);
transition: border-color 0.15s ease, box-shadow 0.15s ease;
transition: border-color var(--fluent-duration-fast) var(--fluent-easing-standard),
box-shadow var(--fluent-duration-fast) var(--fluent-easing-standard),
background var(--fluent-duration-fast) var(--fluent-easing-standard);
}
.search-box input::placeholder { color: var(--text-tertiary); }
.search-box input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary-bg); background: var(--bg-container); }
.search-box .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-tertiary); font-size: 15px; pointer-events: none; }
.search-box input:focus {
border-color: var(--color-primary);
box-shadow: 0 0 0 2px var(--fluent-primary-tint-20);
background: var(--bg-container);
}
.search-box .search-icon {
position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
color: var(--text-tertiary); font-size: 15px; pointer-events: none;
}
/* Theme toggle */
.header-bar .theme-btn {
width: 36px; height: 36px; border: none; background: none;
cursor: pointer; border-radius: var(--radius-sm);
display: flex; align-items: center; justify-content: center;
font-size: 16px; color: var(--text-secondary); flex-shrink: 0; padding: 0;
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.header-bar .theme-btn:hover { background: var(--bg-elevated); }
/* ===== Mobile Chip Bar — Fluent 2 Tab style ===== */
.chip-bar {
display: none; padding: 10px 16px 0; background: var(--bg-container);
border-bottom: 1px solid var(--border-light); position: sticky; top: var(--header-h); z-index: 90;
border-bottom: 1px solid var(--border-light);
position: sticky; top: var(--header-h); z-index: 90;
}
.chip-bar-inner {
display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
@@ -108,43 +240,69 @@ body {
.chip-bar-inner::-webkit-scrollbar { display: none; }
.chip {
display: inline-flex; align-items: center; gap: 5px;
padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; white-space: nowrap;
border: 1px solid var(--border); background: var(--bg-container); color: var(--text-secondary);
cursor: pointer; transition: all 0.15s ease; user-select: none;
padding: 6px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
white-space: nowrap; border: 1px solid var(--border);
background: var(--bg-container); color: var(--text-secondary);
cursor: pointer; user-select: none;
-webkit-tap-highlight-color: transparent; min-height: 36px;
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate),
border-color var(--fluent-duration-fast) var(--fluent-easing-decelerate),
color var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.chip:active { transform: scale(0.96); }
.chip.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.chip .chip-count { font-size: 11px; background: rgba(0,0,0,0.08); border-radius: 10px; padding: 0 5px; }
.chip.active .chip-count { background: rgba(255,255,255,0.25); }
.chip:hover { background: var(--fluent-primary-tint-40); border-color: var(--fluent-primary-tint-20); }
.chip.active {
background: var(--fluent-primary-tint-30);
border-color: var(--color-primary);
color: var(--color-primary);
}
.chip .chip-count { font-size: 11px; background: var(--fluent-alpha-8); border-radius: 10px; padding: 0 5px; }
.chip.active .chip-count { background: var(--fluent-primary-tint-20); color: var(--color-primary); }
.layout { display: flex; max-width: 1200px; margin: 0 auto; min-height: calc(100vh - var(--header-h)); }
/* ===== Layout ===== */
.layout {
display: flex; max-width: 1200px; margin: 0 auto;
min-height: calc(100vh - var(--header-h));
}
/* ===== Sidebar — Fluent 2 NavigationView ===== */
.sidebar {
width: var(--sidebar-w); flex-shrink: 0; background: var(--bg-container);
border-right: 1px solid var(--border); padding: 1.25rem 0;
overflow-y: auto; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h));
overflow-y: auto; position: sticky; top: var(--header-h);
height: calc(100vh - var(--header-h));
}
.sidebar .nav-section { padding: 0 16px; margin-bottom: 8px; }
.sidebar .nav-section-title {
font-size: 11px; font-weight: 600; color: var(--text-tertiary);
letter-spacing: 0.5px; margin-bottom: 4px; padding: 4px 0;
font-size: 10px; font-weight: 600; color: var(--text-tertiary);
text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; padding: 4px 0;
}
.sidebar .nav-item {
display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm);
font-size: 13px; color: var(--text-secondary); cursor: pointer;
transition: all 0.12s ease; text-decoration: none; min-height: 40px;
display: flex; align-items: center; gap: 8px; padding: 8px 12px;
border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
cursor: pointer; text-decoration: none; min-height: 40px;
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate),
color var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.sidebar .nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sidebar .nav-item.active { background: var(--color-primary-bg); color: var(--color-primary); font-weight: 500; }
.sidebar .nav-item.active {
background: var(--fluent-primary-tint-30);
color: var(--color-primary); font-weight: 500;
}
.sidebar .nav-item .nav-icon { font-size: 14px; flex-shrink: 0; width: 20px; text-align: center; }
.sidebar .nav-item .nav-count {
margin-left: auto; font-size: 11px; color: var(--text-tertiary);
background: var(--bg-elevated); border-radius: 10px; padding: 0 6px;
}
.sidebar .nav-item.active .nav-count { background: rgba(22,119,255,0.12); color: var(--color-primary); }
.sidebar .sub-nav { padding-left: 24px; overflow: hidden; max-height: 0; transition: max-height 0.25s ease; }
.sidebar .nav-item.active .nav-count {
background: var(--fluent-primary-tint-20); color: var(--color-primary);
}
.sidebar .sub-nav {
padding-left: 24px; overflow: hidden; max-height: 0;
transition: max-height var(--fluent-duration-slow) var(--fluent-easing-standard);
}
.sidebar .sub-nav.open { max-height: 500px; }
.sidebar .sub-nav .nav-item { font-size: 12px; padding: 5px 12px; }
.sidebar .theme-section {
padding: 12px 16px; border-top: 1px solid var(--border-light); margin-top: 8px;
}
@@ -153,18 +311,25 @@ body {
padding: 8px 12px; border: none; background: none; cursor: pointer;
border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
min-height: 40px;
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate),
color var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.sidebar .theme-toggle-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
/* ===== Drawer — Fluent 2 Flyout ===== */
.drawer-overlay {
display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55);
z-index: 200; opacity: 0; transition: opacity 0.2s ease;
display: none; position: fixed; inset: 0;
background: var(--fluent-smoke-default);
z-index: 200; opacity: 0;
transition: opacity var(--fluent-duration-normal) var(--fluent-easing-decelerate);
}
.drawer-overlay.show { display: block; opacity: 1; }
.drawer {
position: fixed; top: 0; left: 0; bottom: 0; width: 280px; max-width: 85vw;
background: var(--drawer-bg); z-index: 201;
transform: translateX(-100%); transition: transform 0.25s ease; overflow-y: auto;
transform: translateX(-100%);
transition: transform var(--fluent-duration-slow) var(--fluent-easing-standard);
overflow-y: auto;
}
.drawer-overlay.show .drawer { transform: translateX(0); }
.drawer-header {
@@ -173,48 +338,75 @@ body {
}
.drawer-header .close-btn {
width: 32px; height: 32px; border: none; background: var(--bg-elevated);
border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center;
justify-content: center; font-size: 18px; color: var(--text-secondary);
border-radius: var(--radius-sm); cursor: pointer; display: flex;
align-items: center; justify-content: center; font-size: 18px;
color: var(--text-secondary);
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.drawer-header .close-btn:hover { background: var(--fluent-primary-tint-30); color: var(--color-primary); }
.drawer .theme-toggle-btn {
display: flex; align-items: center; gap: 8px; width: calc(100% - 32px); margin: 12px 16px;
padding: 8px 12px; border: 1px solid var(--border); background: var(--bg-elevated);
cursor: pointer; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
min-height: 40px;
display: flex; align-items: center; gap: 8px; width: calc(100% - 32px);
margin: 12px 16px; padding: 8px 12px; border: 1px solid var(--border);
background: var(--bg-elevated); cursor: pointer; border-radius: var(--radius-sm);
font-size: 13px; color: var(--text-secondary); min-height: 40px;
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate),
color var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.drawer .theme-toggle-btn:hover { background: var(--color-primary-bg); color: var(--color-primary); }
/* ===== Main Content ===== */
.main { flex: 1; padding: 32px 40px 64px; min-width: 0; }
.breadcrumb { font-size: 12px; color: var(--text-tertiary); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-tertiary); text-decoration: none; }
.breadcrumb {
font-size: 12px; color: var(--text-tertiary); margin-bottom: 12px;
}
.breadcrumb a { color: var(--text-tertiary); text-decoration: none;
transition: color var(--fluent-duration-fast) var(--fluent-easing-standard);
}
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { margin: 0 4px; }
/* Stats — Fluent 2 Info style */
.stats-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-item {
display: flex; align-items: baseline; gap: 4px; padding: 8px 14px;
background: var(--bg-container); border: 1px solid var(--border-light); border-radius: var(--radius-sm);
display: flex; align-items: baseline; gap: 4px;
padding: 8px 14px; background: var(--bg-container);
border: 1px solid var(--border-light); border-radius: var(--radius-sm);
}
.stat-num { font-size: 18px; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: 12px; color: var(--text-tertiary); }
/* Section */
.wiki-section { margin-bottom: 28px; }
.wiki-section-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.wiki-section-title {
font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px;
}
.wiki-section-desc { font-size: 13px; color: var(--text-tertiary); margin-bottom: 14px; }
.all-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
/* ===== Cards — Fluent 2 Card with elevation ===== */
.all-grid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.all-card {
background: var(--bg-container); border: 1px solid var(--border);
border-radius: var(--radius-md); padding: 24px;
transition: all 0.2s ease; text-decoration: none; color: var(--text-primary); display: block;
border-radius: var(--radius-md); padding: 20px;
box-shadow: var(--fluent-shadow-2);
text-decoration: none; color: var(--text-primary); display: block; cursor: pointer;
transition: box-shadow var(--fluent-duration-normal) var(--fluent-easing-standard),
border-color var(--fluent-duration-normal) var(--fluent-easing-standard);
}
.all-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); }
.all-card:active { transform: scale(0.99); }
.all-card:hover { box-shadow: var(--fluent-shadow-4); border-color: var(--border); }
.all-card .card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.all-card .card-desc {
font-size: 12px; color: var(--text-tertiary); line-height: 1.5;
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.all-card .card-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.all-card .card-badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.all-card .card-badge {
font-size: 11px; padding: 2px 8px; border-radius: var(--radius-xs); font-weight: 500;
}
.all-card .card-date { font-size: 11px; color: var(--text-tertiary); }
/* ===== Wiki TOC — Fluent 2 Accordion ===== */
.wiki-toc {
background: var(--bg-container); border: 1px solid var(--border-light);
border-radius: var(--radius-md); overflow: hidden; margin-top: 8px;
@@ -222,40 +414,53 @@ body {
.wiki-toc-header {
display: flex; align-items: center; gap: 10px; padding: 14px 18px;
background: var(--bg-elevated); border-bottom: 1px solid var(--border-light);
cursor: pointer; user-select: none; transition: background 0.12s ease; min-height: 44px;
cursor: pointer; user-select: none; min-height: 44px;
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.wiki-toc-header:hover { background: var(--fluent-primary-tint-30); }
.wiki-toc-header .toc-icon {
font-size: 16px; color: var(--text-secondary);
transition: transform var(--fluent-duration-normal) var(--fluent-easing-standard);
}
.wiki-toc-header:hover { background: var(--color-primary-bg); }
.wiki-toc-header .toc-icon { font-size: 16px; transition: transform 0.2s ease; }
.wiki-toc-header.open .toc-icon { transform: rotate(90deg); }
.wiki-toc-header .toc-title { font-size: 14px; font-weight: 600; flex: 1; }
.wiki-toc-header .toc-count { font-size: 12px; color: var(--text-tertiary); }
.wiki-toc-body { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.wiki-toc-body {
overflow: hidden; max-height: 0;
transition: max-height var(--fluent-duration-slow) var(--fluent-easing-standard);
}
.wiki-toc-body.open { max-height: 2000px; }
.wiki-toc-item {
display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 42px;
border-bottom: 1px solid var(--border-light); transition: background 0.1s ease;
border-bottom: 1px solid var(--border-light);
text-decoration: none; color: var(--text-primary); min-height: 48px;
transition: background var(--fluent-duration-fast) var(--fluent-easing-decelerate);
}
.wiki-toc-item:last-child { border-bottom: none; }
.wiki-toc-item:active { background: var(--color-primary-bg); }
.wiki-toc-item:hover { background: var(--bg-elevated); }
.wiki-toc-item:active { background: var(--fluent-primary-tint-30); }
.wiki-toc-item .item-icon { font-size: 14px; color: var(--text-tertiary); flex-shrink: 0; }
.wiki-toc-item .item-title { flex: 1; font-size: 13px; }
.wiki-toc-item .item-tag {
font-size: 11px; padding: 2px 8px; border-radius: 10px;
font-size: 11px; padding: 2px 8px; border-radius: var(--radius-xs);
background: var(--bg-elevated); color: var(--text-tertiary); flex-shrink: 0;
}
@media (min-width: 769px) { .chip-bar { display: none !important; } }
@media (max-width: 768px) {
.header-bar { padding: 0 20px; }
/* ===== Responsive — Fluent 2 Breakpoints ===== */
@media (min-width: 1024px) { .chip-bar { display: none !important; } }
@media (max-width: 1023px) {
.sidebar { width: 220px; }
}
@media (max-width: 639px) {
.header-bar { padding: 0 16px; }
.header-bar .tagline { display: none; }
.search-box input { padding: 7px 10px 7px 30px; }
.search-box .search-icon { left: 8px; font-size: 14px; }
.chip-bar { display: block; }
.sidebar { display: none; }
.main { padding: 24px 20px 48px; }
.main { padding: 24px 16px 48px; }
.all-grid { grid-template-columns: 1fr; }
.all-card { padding: 20px; }
.all-card { padding: 16px; }
.stats-bar { gap: 8px; }
.stat-item { padding: 6px 10px; }
.stat-num { font-size: 16px; }
@@ -363,6 +568,8 @@ const wikiData = [
{ path: "研发型企业AI转型方案/报告/ai-enterprise-maturity-model.html", title: "企业 AI 成熟度五级模型", desc: "L0前AI期→L1萌芽期→L2规范期→L2.5增强期→L3原生期,含每级判定标准、跃迁路径、触发信号与常见陷阱", date: "2026-06-03" },
{ path: "研发型企业AI转型方案/报告/ai-training-outline-for-it-services.html", title: "AI 赋能 IT 服务团队:培训与落地全套提纲", desc: "融合企业实际需求:工具全景图→四角色赋能矩阵→三阶培训体系→方法论进化→12周落地路线图,面向IT服务企业的端到端AI赋能方案", date: "2026-06-03" },
{ path: "智能体平台调研/报告/ai-agent-platform-comparison.html", title: "全功能智能体平台深度对比", desc: "覆盖10个核心平台(GitHub 7+Gitee 3),五大功能维度矩阵:多智能体平面·低代码编排·Harness基建·技能市场·评测服务,含81个开源项目索引与选型建议", date: "2026-06-04" },
{ path: "智能体平台调研/报告/spring-ai-alibaba-deployment-guide.html", title: "Spring AI Alibaba 全功能部署指南", desc: "本地内网环境从零部署全功能平台:WSL2环境准备→PostgreSQL+Nacos+MinIO中间件→全功能模块激活→内网访问配置→运维手册→故障排查,含Docker Compose一键编排与启动脚本", date: "2026-06-05" },
{ path: "AI核心技能原理说明.html", title: "AI 核心技能原理说明", desc: "系统梳理 LLM / Prompt Engineering / Agent / Skills 编排 / RAG / AI Coding / YOLO 七大方向的技术原理与工程实践", date: "2026-06-05" },
]},
{ dir: "抖音话题", icon: "🎙️", desc: "行业观点、口播话术、短视频脚本", color: "orange",
items: [