Skip to content

Commit dac445d

Browse files
authored
tailwind-v4添加 (#3)
1 parent 3559c9e commit dac445d

File tree

6 files changed

+1112
-17
lines changed

6 files changed

+1112
-17
lines changed

PROJECT_PLAN_YARN.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@
6060
- [ ] 日语内容 (ja) - 🔴 预留
6161
- [ ] 法语内容 (fr) - 🔴 预留
6262
- [ ] 俄语内容 (ru) - 🔴 预留
63-
- [ ] **Tailwind CSS v4 集成**(可选)
64-
- [ ] 配置 Tailwind CSS v4
65-
- [ ] 设计系统/组件库
66-
- [ ] 响应式布局优化
67-
- [ ] 深色模式支持
63+
- [x] **Tailwind CSS v4 集成**(可选)
64+
- [x] 配置 Tailwind CSS v4
65+
- [x] 设计系统/组件库
66+
- [x] 响应式布局优化
67+
- [x] 深色模式支持
6868
- [x] **自动化部署**
6969
- [x] GitHub Actions 配置
7070
- [x] GitHub Pages 部署
@@ -102,7 +102,7 @@ case-lambda/
102102
│ │ ├── config.mts # 主配置 (TypeScript)
103103
│ │ ├── theme/ # 主题配置
104104
│ │ │ ├── index.ts # 扩展默认主题
105-
│ │ │ └── style.css # 自定义样式
105+
│ │ │ └── style.css # 自定义样式(含 Tailwind)
106106
│ │ └── env.d.ts # 类型声明
107107
│ ├── zh/ # 中文内容(默认)✅
108108
│ │ ├── index.md # 首页
@@ -112,7 +112,8 @@ case-lambda/
112112
│ │ │ ├── cli.md
113113
│ │ │ ├── repl.md
114114
│ │ │ ├── modules.md
115-
│ │ │ └── modes.md
115+
│ │ │ ├── modes.md
116+
│ │ │ └── tailwind.md # Tailwind CSS 使用示例
116117
│ │ └── api/ # API 文档
117118
│ │ ├── index.md
118119
│ │ ├── liii/ # Liii 库 (19个文件)
@@ -233,6 +234,21 @@ yarn install
233234
- ✅ 响应式设计
234235
- ✅ 深色/浅色模式
235236
- ✅ 自定义样式通过 `style.css`
237+
- ✅ Tailwind CSS v4 集成
238+
239+
### Tailwind CSS (style.css)
240+
241+
```css
242+
/* Tailwind CSS v4 */
243+
@import 'tailwindcss';
244+
245+
/* 暗黑模式:与 VitePress 的 .dark 类同步 */
246+
@custom-variant dark (&:where(.dark, .dark *));
247+
```
248+
249+
- 使用 CSS 优先配置(Tailwind v4 新特性)
250+
- `@custom-variant` 实现与 VitePress 暗黑模式同步
251+
- 编辑器可能对 `@custom-variant` 显示警告,但不影响功能
236252

237253
---
238254

@@ -283,7 +299,9 @@ docs/
283299
"eslint-plugin-vue": "^10.8.0",
284300
"prettier": "^3.8.1",
285301
"vitepress": "^1.6.4",
286-
"vue": "^3.5.32"
302+
"vue": "^3.5.32",
303+
"tailwindcss": "^4.2.2",
304+
"@tailwindcss/vite": "^4.2.2"
287305
}
288306
```
289307

@@ -363,7 +381,7 @@ yarn eslint --print-config eslint.config.js
363381
| 阶段1 | 基础配置 | ✅ 完成 |
364382
| 阶段2 | 文档架构 | ✅ 完成 |
365383
| 阶段3 | 内容编写 | ✅ 完成 |
366-
| 阶段4 | 高级功能 | 🔴 待开始 |
384+
| 阶段4 | 高级功能 | 🟡 进行中 |
367385
| 阶段5 | Playground | 🔴 待调研 |
368386

369387
---
@@ -375,7 +393,7 @@ yarn eslint --print-config eslint.config.js
375393
---
376394

377395
**计划制定者**: 月见八千代
378-
**制定时间**: 2024年4月4日
396+
**制定时间**: 2024年4月4日 **更新时间**: 2026年4月4日
379397
**Yarn 版本**: 1.22.22
380398

381399
> _"一步一步来,基础打好了,后面就顺畅了~"_

docs/.vitepress/config.mts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { defineConfig } from 'vitepress'
2+
import tailwindcss from '@tailwindcss/vite'
23

34
// https://vitepress.dev/reference/site-config
45
export default defineConfig({
6+
vite: {
7+
plugins: [tailwindcss()],
8+
},
59
// 构建输出目录 (docs/dist/)
610
outDir: './dist',
711

@@ -168,7 +172,7 @@ export default defineConfig({
168172
},
169173
footer: {
170174
message: '基于 Apache 2.0 许可发布',
171-
copyright: 'Copyright © 2024 Goldfish Scheme Authors',
175+
copyright: 'Copyright © 2026 MoganLab',
172176
},
173177
},
174178
},
@@ -182,7 +186,7 @@ export default defineConfig({
182186
themeConfig: {
183187
footer: {
184188
message: 'Released under the Apache 2.0 License',
185-
copyright: 'Copyright © 2024 Goldfish Scheme Authors',
189+
copyright: 'Copyright © 2026 MoganLab',
186190
},
187191
},
188192
},
@@ -196,7 +200,7 @@ export default defineConfig({
196200
themeConfig: {
197201
footer: {
198202
message: 'Apache 2.0 ライセンスの下で公開',
199-
copyright: 'Copyright © 2024 Goldfish Scheme Authors',
203+
copyright: 'Copyright © 2026 MoganLab',
200204
},
201205
},
202206
},
@@ -210,7 +214,7 @@ export default defineConfig({
210214
themeConfig: {
211215
footer: {
212216
message: 'Publié sous licence Apache 2.0',
213-
copyright: 'Copyright © 2024 Goldfish Scheme Authors',
217+
copyright: 'Copyright © 2026 MoganLab',
214218
},
215219
},
216220
},
@@ -224,7 +228,7 @@ export default defineConfig({
224228
themeConfig: {
225229
footer: {
226230
message: 'Выпущено под лицензией Apache 2.0',
227-
copyright: 'Copyright © 2024 Goldfish Scheme Authors',
231+
copyright: 'Copyright © 2026 MoganLab',
228232
},
229233
},
230234
},

docs/.vitepress/theme/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@import "tailwindcss";
2+
3+
/* 暗黑模式:使用 class 策略,与 VitePress 的 .dark 类同步 */
4+
@custom-variant dark (&:where(.dark, .dark *));
5+
16
/* 增大导航栏 logo */
27
.VPNavBarTitle .logo {
38
height: 60px; /* 默认是 24px,调大到 60px */

0 commit comments

Comments
 (0)