@bytechain.cn/colamd-themes 0.3.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/.claude/skills/colamd-themes-preview.skill.md +333 -0
  2. package/.claude/skills/colamd-themes.skill.md +10 -0
  3. package/.dsh/skills/colamd-themes/SKILL.md +14 -0
  4. package/.github/supported-topics.yml +17 -0
  5. package/.hermes/skills/tools/colamd-themes/SKILL.md +14 -0
  6. package/.openclaw/skills/colamd-themes/SKILL.md +1 -37
  7. package/.opencode/skills/colamd-themes/SKILL.md +17 -0
  8. package/.trae/rules/colamd-themes.md +0 -36
  9. package/CHANGELOG.md +331 -241
  10. package/DSH_SUPPORT_SUMMARY.md +87 -0
  11. package/README.md +414 -384
  12. package/README_CN.md +412 -384
  13. package/RELEASENOTE.md +541 -389
  14. package/dist/cli.js +36 -55
  15. package/dist/cli.js.map +1 -1
  16. package/dist/color-utils.d.ts +1 -0
  17. package/dist/color-utils.js +25 -6
  18. package/dist/color-utils.js.map +1 -1
  19. package/dist/extractors/pdf-extractor.js +6 -1
  20. package/dist/extractors/pdf-extractor.js.map +1 -1
  21. package/dist/extractors/url-extractor.d.ts +0 -4
  22. package/dist/extractors/url-extractor.js +13 -126
  23. package/dist/extractors/url-extractor.js.map +1 -1
  24. package/dist/generator.d.ts +1 -1
  25. package/dist/generator.js +32 -11
  26. package/dist/generator.js.map +1 -1
  27. package/dist/models.d.ts +5 -4
  28. package/dist/models.js +2 -3
  29. package/dist/models.js.map +1 -1
  30. package/dist/renderer.d.ts +6 -3
  31. package/dist/renderer.js +54 -93
  32. package/dist/renderer.js.map +1 -1
  33. package/dist/templates/template.css +220 -498
  34. package/dist/templates/theme-paradigm.md +530 -658
  35. package/dist/templates/theme-template.hbs +256 -370
  36. package/dist/theme-store.js +19 -3
  37. package/dist/theme-store.js.map +1 -1
  38. package/dist/utils/document-paradigm.d.ts +12 -0
  39. package/dist/utils/document-paradigm.js +109 -0
  40. package/dist/utils/document-paradigm.js.map +1 -0
  41. package/dist/validators.d.ts +4 -1
  42. package/dist/validators.js +115 -1
  43. package/dist/validators.js.map +1 -1
  44. package/mcp-server/dist/index.d.ts +13 -0
  45. package/mcp-server/dist/index.d.ts.map +1 -0
  46. package/mcp-server/dist/index.js +0 -0
  47. package/mcp-server/dist/index.js.map +1 -0
  48. package/mcp-server/package-lock.json +1759 -0
  49. package/mcp-server/package.json +24 -0
  50. package/mcp-server/src/index.ts +0 -0
  51. package/mcp-server/tsconfig.json +19 -0
  52. package/package.json +54 -36
  53. package/skills/build-skills.sh +30 -5
  54. package/skills/colamd-themes/SKILL.md +180 -178
  55. package/src/cli.ts +474 -487
  56. package/src/color-systems.ts +289 -289
  57. package/src/color-utils.ts +137 -120
  58. package/src/contrast.ts +66 -66
  59. package/src/docx-style-paradigm.ts +811 -811
  60. package/src/export-cli.ts +356 -356
  61. package/src/extractors/base.ts +8 -8
  62. package/src/extractors/docx-extractor.ts +417 -417
  63. package/src/extractors/pdf-extractor.ts +533 -527
  64. package/src/extractors/url-extractor.ts +846 -981
  65. package/src/generator.ts +197 -169
  66. package/src/index.ts +29 -29
  67. package/src/models.ts +212 -212
  68. package/src/renderer.ts +310 -359
  69. package/src/templates/template.css +220 -498
  70. package/src/templates/theme-paradigm.md +530 -658
  71. package/src/templates/theme-template.hbs +256 -370
  72. package/src/theme-store.ts +185 -170
  73. package/src/types/pdf-parse.d.ts +12 -12
  74. package/src/utils/cli-utils.ts +84 -84
  75. package/src/utils/document-paradigm.ts +118 -0
  76. package/src/validators.ts +298 -176
  77. package/themes/academic-paper-pt.css +353 -1805
  78. package/themes/academic-paper.css +350 -1099
  79. package/themes/academic-style.css +342 -2430
  80. package/themes/colly.css +256 -370
  81. package/themes/elegant.css +288 -671
  82. package/themes/forest-ink.css +240 -664
  83. package/themes/guizang.css +250 -732
  84. package/themes/hermes-security.css +279 -0
  85. package/themes/meeting-minutes.css +256 -370
  86. package/themes/pixso-design.css +278 -1261
  87. package/themes/salvator-blog.css +256 -370
  88. package/themes/shimo-theme.css +256 -0
  89. package/themes/swiss-design.css +285 -746
  90. package/themes/template.css +220 -498
  91. package/themes/trae-blue.css +280 -737
  92. package/themes/word-contract.css +249 -0
  93. package/themes-preview/demo-content.md +187 -187
  94. package/tsconfig.json +18 -18
  95. package/src/mermaid-presets.ts +0 -142
  96. package/themes/swiss-design copy.css +0 -746
  97. package/themes-preview/colly-preview.html +0 -623
  98. package/themes-preview/meeting-minutes-preview.html +0 -625
  99. package/themes-preview/salvator-blog-preview.html +0 -623
@@ -1,746 +0,0 @@
1
- /*
2
- * ColaMD 主题:Swiss Design (瑞士国际主义平面设计风格)
3
- * 版本:v3.0(遵循 theme-paradigm.md 范式)
4
- *
5
- * 风格特征:
6
- * - 纯粹的黑白红三色体系,极简克制
7
- * - 几何无衬线字体(Helvetica / Inter),拒绝任何衬线体
8
- * - 网格化排版,大量留白,不对称但平衡
9
- * - 形式服从功能,无任何装饰性元素
10
- *
11
- * 配色来源:Swiss Design / International Typographic Style
12
- * 字体哲学:Typography is the primary design element
13
- *
14
- * 导入:Theme > Import Theme
15
- */
16
-
17
- /* ═══════════════════════════════════════════════════════════
18
- SECTION 1 — 设计令牌 (Design Tokens)
19
- ═══════════════════════════════════════════════════════════ */
20
-
21
- body.theme-custom {
22
-
23
- /* ═══════════════════════════════════════════════════════════
24
- 1.1 种子色板
25
- Swiss Design 三色体系:白底 + 黑字 + 红点缀
26
- ═══════════════════════════════════════════════════════════ */
27
-
28
- /* 点缀色:Swiss Red — 用于链接、强调、标题、关键分割线 */
29
- --seed-accent: #e30613; /* Swiss Red (标准瑞士红) */
30
- --seed-accent-light: #fef0f1; /* 极浅红(仅作极少数背景) */
31
- --seed-accent-dark: #b8000b; /* 深红(hover 态) */
32
-
33
- /* 表面色:纯白体系 — Swiss Design 以留白为核心设计元素 */
34
- --seed-surface: #ffffff; /* L0 页面背景(纯白) */
35
- --seed-panel: #f4f4f4; /* L1 卡片/代码区背景(极浅灰) */
36
- --seed-panel-alt: #eaeaea; /* L2 表头/引用块背景 */
37
-
38
- /* 文字色:黑白灰三阶 — 高对比度,拒绝暧昧的中间调 */
39
- --seed-ink: #0d0d0d; /* T0 正文/标题(近乎纯黑) */
40
- --seed-ink-muted: #5c5c5c; /* T1 次要文字 */
41
- --seed-ink-dim: #999999; /* T2 弱化/禁用文字 */
42
-
43
- /* 边框色:极克制 — Swiss Design 避免可见边框,仅用留白分隔 */
44
- --seed-border: #e0e0e0; /* 极浅灰(仅在必要时出现) */
45
- --seed-border-strong: #0d0d0d; /* 强调边框 = 纯黑 */
46
-
47
- /* ═══════════════════════════════════════════════════════════
48
- 1.2 字体系统
49
- Swiss Design 的核心:几何无衬线体,拒绝一切衬线体
50
- ═══════════════════════════════════════════════════════════ */
51
-
52
- /* 正文字体栈:Helvetica → Inter → 通用无衬线 */
53
- --font-body: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont,
54
- "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
55
-
56
- /* 标题字体栈:与正文同体系,粗体 + 紧凑字距体现 Swiss 风格 */
57
- --font-heading: "Helvetica Neue", "Inter", -apple-system, BlinkMacSystemFont,
58
- "PingFang SC", "Microsoft YaHei", sans-serif;
59
-
60
- /* 等宽字体栈 */
61
- --font-code: "JetBrains Mono", "SF Mono", "Fira Code", Menlo, Consolas, monospace;
62
-
63
- /* Mermaid 图表字体:与标题一致(无衬线几何体) */
64
- --font-mermaid: var(--font-heading);
65
-
66
- /* ═══════════════════════════════════════════════════════════
67
- 1.3 字号 & 间距
68
- Swiss Design 偏爱大标题 + 紧凑字距 + 大量留白
69
- ═══════════════════════════════════════════════════════════ */
70
-
71
- --font-size-root: 16px;
72
-
73
- /* 标题倍率 — Swiss 风格:大而有力 */
74
- --font-scale-h1: 2.25; /* 36px — 强有力的主标题 */
75
- --font-scale-h2: 1.625; /* 26px */
76
- --font-scale-h3: 1.25; /* 20px */
77
- --font-scale-h4: 1.1; /* 17.6px */
78
- --font-scale-h5: 1.0; /* 16px */
79
- --font-scale-h6: 0.875; /* 14px — 小号仍保持清晰 */
80
-
81
- /* Mermaid 独立字号 */
82
- --font-size-mermaid: 13px;
83
-
84
- /* 行高 — Swiss Design:适度紧凑,拒绝松散 */
85
- --line-height-body: 1.6;
86
- --line-height-heading: 1.2;
87
- --line-height-code: 1.5;
88
-
89
- /* ═══════════════════════════════════════════════════════════
90
- 1.4 圆角 & 间距
91
- Swiss Design:直角优先,圆角仅作极小值
92
- ═══════════════════════════════════════════════════════════ */
93
- --radius-sm: 0px;
94
- --radius-md: 0px;
95
- --radius-lg: 0px;
96
- --content-width: 780px;
97
-
98
- /* ═══════════════════════════════════════════════════════════
99
- SECTION 2 — 语义映射 (Semantic Mapping)
100
- ═══════════════════════════════════════════════════════════ */
101
-
102
- /* ── 2.1 编辑区表面色 ── */
103
- --bg-color: var(--seed-surface);
104
- --surface-color: var(--seed-panel);
105
- --surface-alt: var(--seed-panel-alt);
106
-
107
- /* ── 2.2 编辑区文字色 ── */
108
- --text-color: var(--seed-ink);
109
- --heading-color: var(--seed-ink);
110
- --text-muted: var(--seed-ink-muted);
111
- --text-dim: var(--seed-ink-dim);
112
-
113
- /* ── 2.3 链接 & 强调 ── */
114
- --link-color: var(--seed-accent);
115
- --accent-color: var(--seed-accent);
116
- --accent-dark: var(--seed-accent-dark);
117
- --accent-light: var(--seed-accent-light);
118
- --selection-bg: rgba(227, 6, 19, 0.12); /* Swiss Red 选区 */
119
-
120
- /* ── 2.4 边框 & 分割线 ── */
121
- --border-color: var(--seed-border);
122
- --blockquote-border: var(--seed-ink); /* 引用线用黑色,不用红色 */
123
- --hr-color: var(--seed-border);
124
-
125
- /* ── 2.5 内联代码 ── */
126
- --code-bg: var(--seed-panel);
127
- --code-color: var(--seed-accent-dark);
128
-
129
- /* ── 2.6 代码块 ── */
130
- --code-block-bg: var(--seed-panel-alt);
131
- --code-block-text: var(--seed-ink);
132
- --code-block-color: var(--seed-ink);
133
-
134
- /* ── 2.7 引用块 ── */
135
- --blockquote-bg: var(--seed-panel);
136
-
137
- /* ── 2.8 表格 ── */
138
- --table-header-bg: var(--seed-ink); /* 表头黑底白字 — Swiss 风格 */
139
- --table-border: var(--seed-border);
140
-
141
- /* ── 2.9 表格 — Swiss 黑底白字表头 ── */
142
- --table-header-text: #ffffff;
143
-
144
- /* ── 2.10 滚动条 — 极简 ── */
145
- --scrollbar-thumb: var(--seed-border);
146
- --scrollbar-thumb-hover: var(--seed-ink-muted);
147
-
148
- /* ═══════════════════════════════════════════════════════════
149
- SECTION 3 — Mermaid 图表变量
150
- Swiss 风格图表:白底黑框红点缀,极致克制
151
- ═══════════════════════════════════════════════════════════ */
152
-
153
- /* ── 3.1 容器 ── */
154
- --mermaid-background: var(--seed-surface);
155
- --mermaid-border-color: var(--seed-border);
156
- --mermaid-border-radius: var(--radius-md);
157
- --mermaid-padding: 24px;
158
-
159
- /* ── 3.2 字体 ── */
160
- --mermaid-font-family: var(--font-mermaid);
161
- --mermaid-font-size: var(--font-size-mermaid);
162
-
163
- /* ── 3.3 节点 — 白底黑框,Swiss 式克制 ── */
164
- --mermaid-node-fill: var(--seed-surface);
165
- --mermaid-node-stroke: var(--seed-ink); /* 黑色描边 */
166
- --mermaid-node-stroke-width: 1.5px;
167
- --mermaid-node-text: var(--seed-ink);
168
-
169
- /* ── 3.4 连线 ── */
170
- --mermaid-edge-stroke: var(--seed-ink-muted);
171
- --mermaid-edge-stroke-width: 1.5px;
172
-
173
- /* ── 3.5 聚类 — 极浅灰,几乎不可见 ── */
174
- --mermaid-cluster-fill: rgba(0, 0, 0, 0.03);
175
- --mermaid-cluster-stroke: var(--seed-ink-muted);
176
-
177
- /* ── 3.6 标签 ── */
178
- --mermaid-label-text: var(--seed-ink);
179
- --mermaid-edge-label-text: var(--seed-ink-muted);
180
- --mermaid-edge-label-bg: var(--seed-surface);
181
-
182
- /* ── 3.7 标题 & 坐标轴 ── */
183
- --mermaid-title-text: var(--seed-ink);
184
- --mermaid-axis-text: var(--seed-ink-muted);
185
- --mermaid-highlight: var(--seed-accent); /* 仅高亮处用红色 */
186
-
187
- /* ── 3.8 人物节点 ── */
188
- --mermaid-person-stroke: var(--seed-ink);
189
- --mermaid-person-fill: var(--seed-panel);
190
-
191
- /* ── 3.9 偏移 ── */
192
- --mermaid-label-offset-y: 0px;
193
-
194
- /* ═══════════════════════════════════════════════════════════
195
- SECTION 4 — 排版微调变量
196
- ═══════════════════════════════════════════════════════════ */
197
- --line-height-base: var(--line-height-body);
198
- }
199
-
200
- /* ═════════════════════════════════════════════════════════════
201
- SECTION 5 — 选择器级微调 (Selector Fine-Tuning)
202
- ═════════════════════════════════════════════════════════════ */
203
-
204
- /* ── 5.1 全局:纯白底 + 无衬线体 + 左对齐 ── */
205
- html { font-size: var(--font-size-root); }
206
- body.theme-custom, html, body {
207
- background-color: var(--bg-color);
208
- color: var(--text-color);
209
- font-family: var(--font-body);
210
- line-height: var(--line-height-body);
211
- /* Swiss Design: flush left, ragged right — 禁止两端对齐 */
212
- text-align: left;
213
- }
214
-
215
- /* ── 5.2 编辑区 — 大量留白 ── */
216
- #write {
217
- max-width: var(--content-width);
218
- margin: 0 auto;
219
- padding: 40px 60px 100px;
220
- }
221
-
222
- /* ── 5.2.1 正文段落:中文排版首行缩进 ── */
223
- body.theme-custom p, body.theme-custom #write > p {
224
- margin: 0;
225
- line-height: var(--line-height-body);
226
- text-align: left;
227
- text-indent: 2em;
228
- font-size: var(--font-size-root);
229
- }
230
- body.theme-custom p + p { margin-top: 0; }
231
-
232
- /* 重置:列表、表格、引用块、图表中的段落不缩进 */
233
- body.theme-custom li p,
234
- body.theme-custom li,
235
- body.theme-custom td p,
236
- body.theme-custom th p,
237
- body.theme-custom blockquote p,
238
- body.theme-custom .mermaid-block p,
239
- body.theme-custom figure p,
240
- body.theme-custom pre p {
241
- text-indent: 0;
242
- }
243
-
244
- /* 列表整体缩进与正文首行对齐 */
245
- body.theme-custom ul,
246
- body.theme-custom ol,
247
- body.theme-custom li {
248
- margin: 0;
249
- padding: 0;
250
- }
251
-
252
- body.theme-custom #editor .ProseMirror > ul,
253
- body.theme-custom #editor .ProseMirror > ol,
254
- body.theme-custom #write > ul,
255
- body.theme-custom #write > ol {
256
- margin: 6px 0 6px 2em;
257
- padding-left: 1.5em;
258
- list-style-position: outside;
259
- }
260
-
261
- body.theme-custom ul ul,
262
- body.theme-custom ul ol,
263
- body.theme-custom ol ul,
264
- body.theme-custom ol ol {
265
- margin: 0;
266
- padding-left: 1.5em;
267
- }
268
-
269
- body.theme-custom li {
270
- line-height: var(--line-height-body);
271
- font-family: var(--font-body);
272
- font-size: var(--font-size-root);
273
- font-weight: normal;
274
- text-indent: 0;
275
- padding: 2px 0;
276
- }
277
-
278
- body.theme-custom li::before {
279
- content: none;
280
- }
281
-
282
- /* ProseMirror li > p 内联化 */
283
- body.theme-custom #editor .ProseMirror li > p {
284
- display: inline;
285
- margin: 0;
286
- padding: 0;
287
- text-indent: 0;
288
- font-size: inherit;
289
- font-weight: inherit;
290
- font-family: inherit;
291
- }
292
-
293
- /* ── 5.3 标题:大而有力,紧凑字距,左对齐 ── */
294
- body.theme-custom h1, body.theme-custom h2, body.theme-custom h3,
295
- body.theme-custom h4, body.theme-custom h5, body.theme-custom h6 {
296
- font-family: var(--font-heading);
297
- color: var(--heading-color);
298
- font-weight: 700;
299
- line-height: var(--line-height-heading);
300
- text-align: left;
301
- letter-spacing: -0.02em; /* Swiss 风格:紧凑字距 */
302
- }
303
-
304
- /* h1 用 Swiss Red — 标志性设计特征 */
305
- body.theme-custom h1 {
306
- font-size: calc(var(--font-size-root) * var(--font-scale-h1));
307
- color: var(--seed-ink);
308
- margin-top: 1.5em;
309
- margin-bottom: 0.35em;
310
- letter-spacing: -0.03em;
311
- }
312
-
313
- /* h2 用黑色 + 底线分割 */
314
- body.theme-custom h2 {
315
- font-size: calc(var(--font-size-root) * var(--font-scale-h2));
316
- margin-top: 1.5em;
317
- margin-bottom: 0.5em;
318
- padding-bottom: 0.25em;
319
- border-bottom: 2px solid var(--seed-ink);
320
- }
321
-
322
- body.theme-custom h3 {
323
- font-size: calc(var(--font-size-root) * var(--font-scale-h3));
324
- margin-top: 1.25em;
325
- margin-bottom: 0.4em;
326
- }
327
-
328
- body.theme-custom h4 {
329
- font-size: calc(var(--font-size-root) * var(--font-scale-h4));
330
- color: var(--heading-color);
331
- margin-top: 1em;
332
- margin-bottom: 0.35em;
333
- }
334
-
335
- body.theme-custom h5 {
336
- font-size: calc(var(--font-size-root) * var(--font-scale-h5));
337
- }
338
-
339
- body.theme-custom h6 {
340
- font-size: calc(var(--font-size-root) * var(--font-scale-h6));
341
- color: var(--text-muted);
342
- }
343
-
344
- /* ── 5.4 内联强调:用 Swiss Red ── */
345
- body.theme-custom strong { color: var(--accent-dark); font-weight: 700; }
346
- body.theme-custom em { font-style: italic; }
347
-
348
- /* ── 5.5 链接:红 + 底部横线 ── */
349
- body.theme-custom a {
350
- color: var(--link-color);
351
- text-decoration: none;
352
- border-bottom: 1px solid var(--link-color);
353
- }
354
- body.theme-custom a:hover {
355
- color: var(--accent-dark);
356
- border-bottom: 2px solid var(--accent-dark);
357
- }
358
-
359
- /* ── 5.6 内联代码 ── */
360
- body.theme-custom code {
361
- font-family: var(--font-code);
362
- background: var(--code-bg);
363
- color: var(--code-color);
364
- border-radius: 0; /* Swiss: 直角 */
365
- padding: 1px 6px;
366
- }
367
-
368
- /* ── 5.7 代码块 — 浅灰底黑字,直角 ── */
369
- body.theme-custom pre {
370
- background: var(--code-block-bg);
371
- font-family: var(--font-code);
372
- line-height: var(--line-height-code);
373
- border-radius: 0;
374
- border-left: 4px solid var(--seed-ink);
375
- }
376
-
377
- body.theme-custom pre code {
378
- color: var(--code-block-text);
379
- background: transparent;
380
- }
381
-
382
- /* ── 5.8 引用块 — 黑线左侧,极简 ── */
383
- body.theme-custom blockquote {
384
- background: var(--blockquote-bg);
385
- border-left: 4px solid var(--blockquote-border);
386
- padding: 12px 20px 12px 24px;
387
- border-radius: 0;
388
- }
389
-
390
- /* ── 5.9 表格:Swiss 风格 — 黑底白字表头 + 极细边框 ── */
391
- body.theme-custom table {
392
- border-collapse: collapse;
393
- }
394
- body.theme-custom table th {
395
- background: var(--seed-ink);
396
- color: var(--table-header-text);
397
- font-family: var(--font-heading);
398
- font-weight: 600;
399
- text-transform: uppercase;
400
- letter-spacing: 0.05em;
401
- font-size: 0.875em;
402
- padding: 10px 14px;
403
- border: 1px solid var(--seed-ink);
404
- }
405
- body.theme-custom table td {
406
- padding: 8px 14px;
407
- border: 1px solid var(--seed-border);
408
- }
409
-
410
- /* ── 5.10 分割线:极细,大量上下留白 ── */
411
- body.theme-custom hr {
412
- border: none;
413
- border-top: 1px solid var(--hr-color);
414
- margin: 3em 0;
415
- }
416
-
417
- /* ── 5.11 图片 — 无圆角,满宽或居中 ── */
418
- body.theme-custom img { max-width: 100%; border-radius: 0; }
419
-
420
- /* ── 5.12 图表标题(.mermaid-block + p):无衬线居中 ── */
421
- body.theme-custom .mermaid-block + p {
422
- text-align: center;
423
- font-family: var(--font-heading);
424
- font-size: calc(var(--font-size-root) * 0.875);
425
- color: var(--text-muted);
426
- margin-top: 8px;
427
- }
428
-
429
- /* ── 5.13 响应式 ── */
430
- @media only screen and (max-width: 768px) {
431
- #write { padding: 20px; }
432
- body.theme-custom h1 { font-size: calc(var(--font-size-root) * 1.75); }
433
- body.theme-custom .mermaid-block { padding: 12px; }
434
- body.theme-custom .mermaid-preview svg { max-width: 100% !important; height: auto !important; }
435
- }
436
-
437
- /* ═════════════════════════════════════════════════════════════
438
- SECTION 6 — 打印 / 导出
439
- 原则:屏幕样式的完整镜像。每个屏幕属性都必须在 print 中显式声明。
440
- Swiss Design 印刷品:保留 Swiss Red + 黑底白字表头 + 纯白底色 + 紧凑字距
441
- ═════════════════════════════════════════════════════════════ */
442
- @media print {
443
- @page { margin: 20mm; }
444
-
445
- /* ── 6.0 变量重声明 ── */
446
- body.theme-custom {
447
- --seed-accent: #e30613;
448
- --seed-accent-dark: #b8000b;
449
- --seed-surface: #ffffff;
450
- --seed-ink: #0d0d0d;
451
- --seed-ink-muted: #5c5c5c;
452
- --seed-panel: #f4f4f4;
453
- --seed-panel-alt: #eaeaea;
454
- --seed-border: #e0e0e0;
455
- --font-size-root: 16px;
456
- --line-height-body: 1.6;
457
- --line-height-heading: 1.2;
458
- --line-height-code: 1.5;
459
- --font-scale-h1: 2.25;
460
- --font-scale-h2: 1.625;
461
- --font-scale-h3: 1.25;
462
- --font-scale-h4: 1.1;
463
- --font-scale-h5: 1.0;
464
- --font-scale-h6: 0.875;
465
- --content-width: 780px;
466
- --font-size-mermaid: 13px;
467
- --accent-color: var(--seed-accent);
468
- --accent-dark: var(--seed-accent-dark);
469
- --code-bg: var(--seed-panel);
470
- --code-color: var(--seed-accent-dark);
471
- --code-block-bg: var(--seed-panel-alt);
472
- --code-block-text: var(--seed-ink);
473
- --blockquote-bg: var(--seed-panel);
474
- --table-header-bg: var(--seed-ink);
475
- --table-header-text: #ffffff;
476
- --border-color: var(--seed-border);
477
- --hr-color: var(--seed-border);
478
- --font-body: "Plus Jakarta Sans", "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont,
479
- "PingFang SC", "Noto Sans SC", sans-serif;
480
-
481
- --font-heading: "Plus Jakarta Sans", "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
482
- "PingFang SC", "Noto Sans SC", sans-serif;
483
-
484
- --font-code: "JetBrains Mono", "SF Mono", "Fira Code", Menlo, Consolas, monospace;
485
- }
486
-
487
- /* ── 6.1 根元素:字号 + 无衬线体 + 左对齐 + 底色 ── */
488
- html {
489
- font-size: var(--font-size-root) !important;
490
- }
491
- html, body, body.theme-custom {
492
- background: var(--seed-surface) !important;
493
- color: var(--seed-ink) !important;
494
- font-family: var(--font-body) !important;
495
- line-height: var(--line-height-body) !important;
496
- text-align: left !important;
497
- -webkit-print-color-adjust: exact !important;
498
- print-color-adjust: exact !important;
499
- }
500
-
501
- /* ── 6.2 编辑区:大量留白 ── */
502
- #write {
503
- max-width: var(--content-width) !important;
504
- margin: 0 auto !important;
505
- padding: 40px 60px 100px !important;
506
- }
507
-
508
- /* 正文段落:中文排版首行缩进 */
509
- body.theme-custom p, body.theme-custom #write > p {
510
- margin: 0 !important;
511
- line-height: var(--line-height-body) !important;
512
- text-align: left !important;
513
- text-indent: 2em !important;
514
- font-size: var(--font-size-root) !important;
515
- }
516
- body.theme-custom p + p { margin-top: 0 !important; }
517
-
518
- /* 重置:列表、表格、引用块、图表中的段落不缩进 */
519
- body.theme-custom li p,
520
- body.theme-custom li,
521
- body.theme-custom td p,
522
- body.theme-custom th p,
523
- body.theme-custom blockquote p,
524
- body.theme-custom .mermaid-block p,
525
- body.theme-custom figure p,
526
- body.theme-custom pre p {
527
- text-indent: 0 !important;
528
- }
529
-
530
- /* 列表整体缩进与正文首行对齐 */
531
- body.theme-custom ul,
532
- body.theme-custom ol,
533
- body.theme-custom li {
534
- margin: 0 !important;
535
- padding: 0 !important;
536
- }
537
-
538
- body.theme-custom #editor .ProseMirror > ul,
539
- body.theme-custom #editor .ProseMirror > ol,
540
- body.theme-custom #write > ul,
541
- body.theme-custom #write > ol {
542
- margin: 6px 0 6px 2em !important;
543
- padding-left: 1.5em !important;
544
- list-style-position: outside !important;
545
- }
546
-
547
- body.theme-custom ul ul,
548
- body.theme-custom ul ol,
549
- body.theme-custom ol ul,
550
- body.theme-custom ol ol {
551
- margin: 0 !important;
552
- padding-left: 1.5em !important;
553
- }
554
-
555
- body.theme-custom li {
556
- line-height: var(--line-height-body) !important;
557
- font-family: var(--font-body) !important;
558
- font-size: var(--font-size-root) !important;
559
- font-weight: normal !important;
560
- text-indent: 0 !important;
561
- padding: 2px 0 !important;
562
- }
563
-
564
- body.theme-custom li::before {
565
- content: none !important;
566
- }
567
-
568
- /* ProseMirror li > p 内联化 */
569
- body.theme-custom #editor .ProseMirror li > p {
570
- display: inline !important;
571
- margin: 0 !important;
572
- padding: 0 !important;
573
- text-indent: 0 !important;
574
- font-size: inherit !important;
575
- font-weight: inherit !important;
576
- font-family: inherit !important;
577
- }
578
-
579
- /* ── 6.3 标题:紧凑字距 + 无衬线体 ── */
580
- body.theme-custom h1, body.theme-custom h2, body.theme-custom h3,
581
- body.theme-custom h4, body.theme-custom h5, body.theme-custom h6 {
582
- font-family: var(--font-heading) !important;
583
- color: var(--seed-ink) !important;
584
- font-weight: 700 !important;
585
- line-height: var(--line-height-heading) !important;
586
- text-align: left !important;
587
- letter-spacing: -0.02em !important;
588
- -webkit-print-color-adjust: exact !important;
589
- print-color-adjust: exact !important;
590
- }
591
-
592
- /* h1: Swiss Red + 紧凑字距(标志性特征) */
593
- body.theme-custom h1 {
594
- font-size: calc(var(--font-size-root) * var(--font-scale-h1)) !important;
595
- color: var(--seed-ink) !important;
596
- letter-spacing: -0.03em !important;
597
- margin-top: 1.5em !important;
598
- margin-bottom: 0.35em !important;
599
- }
600
-
601
- /* h2: 黑色 + 底线 */
602
- body.theme-custom h2 {
603
- font-size: calc(var(--font-size-root) * var(--font-scale-h2)) !important;
604
- color: var(--seed-ink) !important;
605
- margin-top: 1.5em !important;
606
- margin-bottom: 0.5em !important;
607
- padding-bottom: 0.25em !important;
608
- border-bottom: 2px solid var(--seed-ink) !important;
609
- }
610
-
611
- body.theme-custom h3 {
612
- font-size: calc(var(--font-size-root) * var(--font-scale-h3)) !important;
613
- color: var(--seed-ink) !important;
614
- margin-top: 1.25em !important;
615
- margin-bottom: 0.4em !important;
616
- }
617
-
618
- body.theme-custom h4 {
619
- font-size: calc(var(--font-size-root) * var(--font-scale-h4)) !important;
620
- color: var(--seed-ink) !important;
621
- margin-top: 1em !important;
622
- margin-bottom: 0.35em !important;
623
- }
624
-
625
- body.theme-custom h5 {
626
- font-size: calc(var(--font-size-root) * var(--font-scale-h5)) !important;
627
- color: var(--seed-ink) !important;
628
- }
629
-
630
- body.theme-custom h6 {
631
- font-size: calc(var(--font-size-root) * var(--font-scale-h6)) !important;
632
- color: var(--seed-ink-muted) !important;
633
- }
634
-
635
- /* ── 6.4 内联强调 ── */
636
- body.theme-custom strong {
637
- color: var(--seed-accent-dark) !important;
638
- font-weight: 700 !important;
639
- -webkit-print-color-adjust: exact !important;
640
- print-color-adjust: exact !important;
641
- }
642
- body.theme-custom em {
643
- font-style: italic !important;
644
- }
645
-
646
- /* ── 6.5 链接:红 + 底部横线 ── */
647
- body.theme-custom a {
648
- color: var(--seed-accent) !important;
649
- text-decoration: none !important;
650
- border-bottom: 1px solid var(--seed-accent) !important;
651
- -webkit-print-color-adjust: exact !important;
652
- print-color-adjust: exact !important;
653
- }
654
-
655
- /* ── 6.6 内联代码:直角 ── */
656
- body.theme-custom code {
657
- font-family: var(--font-code) !important;
658
- background: var(--code-bg) !important;
659
- color: var(--code-color) !important;
660
- border-radius: 0 !important;
661
- padding: 1px 6px !important;
662
- -webkit-print-color-adjust: exact !important;
663
- print-color-adjust: exact !important;
664
- }
665
-
666
- /* ── 6.7 代码块:浅灰底 + 左侧黑线 + 直角 ── */
667
- body.theme-custom pre {
668
- background: var(--code-block-bg) !important;
669
- font-family: var(--font-code) !important;
670
- line-height: var(--line-height-code) !important;
671
- border-radius: 0 !important;
672
- border-left: 4px solid var(--seed-ink) !important;
673
- -webkit-print-color-adjust: exact !important;
674
- print-color-adjust: exact !important;
675
- }
676
- body.theme-custom pre code {
677
- color: var(--code-block-text) !important;
678
- background: transparent !important;
679
- }
680
-
681
- /* ── 6.8 引用块:黑线左侧 + 极简 + 直角 ── */
682
- body.theme-custom blockquote {
683
- background: var(--blockquote-bg) !important;
684
- border-left: 4px solid var(--seed-ink) !important;
685
- padding: 12px 20px 12px 24px !important;
686
- border-radius: 0 !important;
687
- -webkit-print-color-adjust: exact !important;
688
- print-color-adjust: exact !important;
689
- }
690
-
691
- /* ── 6.9 表格:黑底白字表头(Swiss 标志性特征) ── */
692
- body.theme-custom table {
693
- border-collapse: collapse !important;
694
- }
695
- body.theme-custom table th {
696
- background: var(--seed-ink) !important;
697
- color: var(--table-header-text) !important;
698
- font-family: var(--font-heading) !important;
699
- font-weight: 600 !important;
700
- text-transform: uppercase !important;
701
- letter-spacing: 0.05em !important;
702
- font-size: 0.875em !important;
703
- padding: 10px 14px !important;
704
- border: 1px solid var(--seed-ink) !important;
705
- -webkit-print-color-adjust: exact !important;
706
- print-color-adjust: exact !important;
707
- }
708
- body.theme-custom table td {
709
- padding: 8px 14px !important;
710
- border: 1px solid var(--seed-border) !important;
711
- }
712
-
713
- /* ── 6.10 分割线:大量上下留白 ── */
714
- body.theme-custom hr {
715
- border: none !important;
716
- border-top: 1px solid var(--hr-color) !important;
717
- margin: 3em 0 !important;
718
- }
719
-
720
- /* ── 6.11 图片:无圆角 ── */
721
- body.theme-custom img {
722
- max-width: 100% !important;
723
- border-radius: 0 !important;
724
- }
725
-
726
- /* ── 6.12 Mermaid 图表容器 ── */
727
- body.theme-custom .mermaid-block {
728
- background: var(--seed-surface) !important;
729
- border-color: var(--seed-border) !important;
730
- -webkit-print-color-adjust: exact !important;
731
- print-color-adjust: exact !important;
732
- }
733
- body.theme-custom .mermaid-preview svg * {
734
- -webkit-print-color-adjust: exact !important;
735
- print-color-adjust: exact !important;
736
- }
737
-
738
- /* ── 6.13 图表标题:无衬线居中 ── */
739
- body.theme-custom .mermaid-block + p {
740
- color: var(--seed-ink-muted) !important;
741
- text-align: center !important;
742
- font-family: var(--font-heading) !important;
743
- font-size: calc(var(--font-size-root) * 0.875) !important;
744
- margin-top: 8px !important;
745
- }
746
- }