vscode-colaview 0.3.2 → 0.4.0
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.
- package/.vscode/settings.json +1 -1
- package/CHANGELOG.md +30 -0
- package/README.md +311 -279
- package/README_CN.md +311 -279
- package/RELEASE_NOTES.md +56 -0
- package/esbuild.js +2 -0
- package/package.json +58 -19
- package/package.nls.json +14 -0
- package/package.nls.zh-cn.json +14 -0
- package/src/commands/commands.ts +48 -0
- package/src/docx/docx-builder.ts +241 -0
- package/src/export/docx-exporter.ts +961 -961
- package/src/export/html-exporter.ts +8 -2
- package/src/export/pdf-exporter.ts +65 -0
- package/src/export/pptx-exporter.ts +63 -0
- package/src/export/render-export-images.ts +386 -372
- package/src/export/theme-style.ts +195 -155
- package/src/pptx/pptx-builder.ts +249 -0
- package/src/pptx/zip.ts +158 -0
- package/src/present/presenter.ts +64 -0
- package/src/preview/preview-manager.ts +783 -541
- package/src/preview/webview/app.ts +588 -366
- package/src/preview/webview/index.html +167 -134
- package/src/slides/deck.ts +397 -0
- package/src/slides/markdown.ts +393 -0
- package/src/slides/render.ts +484 -0
- package/src/slides/slides.css +1082 -0
- package/src/themes/built-in/bear.css +89 -38
- package/src/themes/built-in/dark.css +87 -20
- package/src/themes/built-in/dracula.css +93 -38
- package/src/themes/built-in/elegant.css +109 -52
- package/src/themes/built-in/gruvbox.css +97 -42
- package/src/themes/built-in/light.css +80 -20
- package/src/themes/built-in/midnight.css +93 -31
- package/src/themes/built-in/nord.css +93 -38
- package/src/themes/built-in/notion.css +98 -48
- package/src/themes/built-in/sepia.css +99 -47
- package/src/themes/built-in/solarized-dark.css +94 -35
- package/src/themes/built-in/writer.css +99 -44
- package/src/themes/theme-manager.ts +207 -180
- package/src/types/colamd-renderer.d.ts +47 -47
- package/patches/@bytechain.cn+colamd+2.7.11.patch +0 -22
|
@@ -0,0 +1,1082 @@
|
|
|
1
|
+
/* 幻灯片版式包(slides.css)
|
|
2
|
+
*
|
|
3
|
+
* 一页在 markdown 里声明版式:`---` 后写一个页头块,第一行是 `<!-- slide: cover`,
|
|
4
|
+
* 后续可写 kicker / label / chapter 字段;该页所有行便带上 `cm-md-slide-<版式>` 类
|
|
5
|
+
* (editor/slide-layout.ts 打的),这里的规则在放映(body.presenting)与导出
|
|
6
|
+
* (body.slides-printing)时命中,编辑视图里一条也不生效。版式名与 markdown 结构
|
|
7
|
+
* (标题/列表/引用)共同构成公开契约:自定义主题或用户 CSS 可以覆盖任何一条,
|
|
8
|
+
* 也可以照样新增自己的版式。
|
|
9
|
+
*
|
|
10
|
+
* 页角色也由 Markdown 结构给出:一页第一个标题是页标题(cm-md-page-title),标题
|
|
11
|
+
* 后第一段是导语(cm-md-page-lead),标题前紧邻的段落兜底当 kicker。
|
|
12
|
+
*
|
|
13
|
+
* 整副牌还有 deck 级公共元素(chrome):一个 `<!-- deck … -->` 块(logo / brand /
|
|
14
|
+
* title / meta)写在文档顶部,放映与导出的每页固定位置呈现,DOM 由 slides-enhance.ts
|
|
15
|
+
* 挂载(.slide-chrome / .slide-foot / .slide-ghost)。
|
|
16
|
+
*
|
|
17
|
+
* 设计语言(学杂志风网页 PPT 与报告类 PPTX 的共性,色彩仍只引 themes/contract.json
|
|
18
|
+
* 的活变量,随主题走):
|
|
19
|
+
* - 字体三件套:衬线(标题/大数字/金句)、无衬线(正文)、等宽(chrome、页码、标签)
|
|
20
|
+
* - 细线代替色块:1px 分隔线、tag 边框、卡片描边
|
|
21
|
+
* - 全出血:内容占满 16:9 纸面,只留 6vw 边距,不再聚在中央窄栏
|
|
22
|
+
* - 幽灵装饰:右下角超大低透明度页码(放映);封面与章节页保留 chrome,
|
|
23
|
+
* 只有收束页淡出
|
|
24
|
+
*
|
|
25
|
+
* 两种作用域写法,各有分工:
|
|
26
|
+
* - 容器级:放映时 slides-enhance 会把当前页版式写进 #editor 的 data-slide-layout
|
|
27
|
+
* 属性,页面级布局(双栏、封面排版)用它选;只在放映时存在,导出是流式分纸,
|
|
28
|
+
* 没有「当前页」可言。
|
|
29
|
+
* - 行级:直接选 .cm-md-slide-* 的行,放映导出都生效;导出的双栏/卡片用
|
|
30
|
+
* inline-block 在纸面上排出来(页首行保持 block,分页符 break-before 依赖它)。
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/* ─── 版式令牌:主题与导入 CSS 的入口 ────────────────────────────────
|
|
34
|
+
* 默认值放在 :root,内置主题用 body.theme-* 覆盖;用户导入的 CSS 在
|
|
35
|
+
* slides.css 之后加载,写 `body { --slide-*: … }` 即可定义自己的 PPT 气质。
|
|
36
|
+
* 想直接改结构,也可以覆写 body.presenting .cm-md-page-title 这类规则。 */
|
|
37
|
+
:root {
|
|
38
|
+
--slide-serif: 'Songti SC', 'Noto Serif CJK SC', 'Noto Serif SC', 'Source Han Serif SC',
|
|
39
|
+
'STSong', 'SimSun', Georgia, serif;
|
|
40
|
+
--slide-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, 'Menlo', monospace;
|
|
41
|
+
|
|
42
|
+
--slide-title-font: var(--slide-serif);
|
|
43
|
+
--slide-title-size: 4.2em;
|
|
44
|
+
--slide-title-weight: 700;
|
|
45
|
+
--slide-subhead-weight: 600;
|
|
46
|
+
--slide-title-tracking: -0.01em;
|
|
47
|
+
--slide-title-line-height: 1.08;
|
|
48
|
+
--slide-cover-title-size: 6.8em;
|
|
49
|
+
--slide-cover-title-line-height: 0.98;
|
|
50
|
+
--slide-cover-title-tracking: -0.02em;
|
|
51
|
+
--slide-section-title-size: 5.2em;
|
|
52
|
+
--slide-closing-title-size: 4.2em;
|
|
53
|
+
|
|
54
|
+
--slide-lead-size: 1.25em;
|
|
55
|
+
--slide-kicker-size: clamp(11px, 0.72vw, 15px);
|
|
56
|
+
--slide-kicker-tracking: 0.3em;
|
|
57
|
+
--slide-kicker-transform: uppercase;
|
|
58
|
+
|
|
59
|
+
--slide-chrome-opacity: 0.68;
|
|
60
|
+
--slide-chrome-transform: uppercase;
|
|
61
|
+
--slide-kpi-number-size: 3.8em;
|
|
62
|
+
--slide-quote-size: 2.4em;
|
|
63
|
+
|
|
64
|
+
--slide-page-pad-x: 6vw;
|
|
65
|
+
/* 页顶安全区按 1080p 高 24px 的比例随窗口高度缩放(2026-11-27 定):
|
|
66
|
+
1080p 全屏解出 24px。导出在 slides-export.ts 的 PAPER 里按纸面 1080 定死 24px,
|
|
67
|
+
两处解出同一个数。 */
|
|
68
|
+
--slide-page-top-pad: calc(100vh * 24 / 1080);
|
|
69
|
+
/* 放映与导出共用的基准字号。纸面 1920×1080 时 1.35vw 解出 25.92px:
|
|
70
|
+
导出不再自带一套字号(2026-11-23 之前导出写死 24px,稿子看着和放映
|
|
71
|
+
不是同一份)。 */
|
|
72
|
+
--slide-body-size: clamp(17px, 1.35vw, 26px);
|
|
73
|
+
/* 跟着视口走的几处:chrome 的上下留白、logo 的高、页脚的留白、图的高度上限。
|
|
74
|
+
做成令牌,是为了让导出能把它们按 1920×1080 的纸面定死(见 slides-export.ts):
|
|
75
|
+
导出在屏幕布局里量页高,屏幕的视口不是纸面,靠视口的值两处会对不上。 */
|
|
76
|
+
--slide-chrome-pad-y: clamp(20px, 3.2vh, 40px);
|
|
77
|
+
--slide-chrome-logo-h: clamp(18px, 1.6vw, 30px);
|
|
78
|
+
--slide-foot-pad-y: clamp(16px, 2.4vh, 28px);
|
|
79
|
+
/* 图的高度上限。放映时 base.css 对 .cm-content 里的 img/svg 统一给 72vh,
|
|
80
|
+
这里取同一个数,导出才能按纸面 1080 的 72vh 解出一样的大小(之前写 62vh,
|
|
81
|
+
放映被 base.css 压回 72vh,导出却按 62vh 收,纸上的图小一圈)。 */
|
|
82
|
+
--slide-img-max-h: 72vh;
|
|
83
|
+
--slide-figure-max-h: 66vh;
|
|
84
|
+
--slide-cover-text-align: left;
|
|
85
|
+
--slide-cover-lead-inline: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* 主题气质:不只换色,标题字体、字号与 chrome 的声音也跟主题走。
|
|
89
|
+
* 默认 light 保留杂志式衬线;Notion 走无衬线居中封面,Writer 走等宽标题。 */
|
|
90
|
+
body.theme-notion {
|
|
91
|
+
--slide-title-font: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
|
|
92
|
+
--slide-title-weight: 600;
|
|
93
|
+
--slide-title-tracking: -0.02em;
|
|
94
|
+
--slide-cover-title-size: 5.4em;
|
|
95
|
+
--slide-section-title-size: 4.4em;
|
|
96
|
+
--slide-kicker-size: clamp(10px, 0.64vw, 13px);
|
|
97
|
+
--slide-kicker-tracking: 0.16em;
|
|
98
|
+
--slide-kicker-transform: none;
|
|
99
|
+
--slide-chrome-transform: none;
|
|
100
|
+
--slide-chrome-opacity: 0.55;
|
|
101
|
+
--slide-cover-text-align: center;
|
|
102
|
+
--slide-cover-lead-inline: auto;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
body.theme-writer {
|
|
106
|
+
--slide-title-font: var(--slide-mono);
|
|
107
|
+
--slide-title-weight: 500;
|
|
108
|
+
--slide-title-tracking: 0;
|
|
109
|
+
--slide-cover-title-size: 5.2em;
|
|
110
|
+
--slide-section-title-size: 4.2em;
|
|
111
|
+
--slide-kicker-tracking: 0.18em;
|
|
112
|
+
--slide-kicker-transform: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
body.theme-elegant {
|
|
116
|
+
--slide-title-font: var(--slide-serif);
|
|
117
|
+
--slide-title-weight: 600;
|
|
118
|
+
--slide-cover-title-size: 7.2em;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
body.theme-sepia {
|
|
122
|
+
--slide-title-font: var(--slide-serif);
|
|
123
|
+
--slide-title-weight: 700;
|
|
124
|
+
--slide-cover-title-size: 6.4em;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
body.theme-bear {
|
|
128
|
+
--slide-title-font: var(--slide-serif);
|
|
129
|
+
--slide-title-weight: 800;
|
|
130
|
+
--slide-cover-title-size: 6.2em;
|
|
131
|
+
--slide-title-tracking: -0.02em;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
body.theme-dark,
|
|
135
|
+
body.theme-solarized-dark,
|
|
136
|
+
body.theme-nord,
|
|
137
|
+
body.theme-gruvbox,
|
|
138
|
+
body.theme-dracula,
|
|
139
|
+
body.theme-midnight {
|
|
140
|
+
--slide-title-weight: 600;
|
|
141
|
+
--slide-chrome-opacity: 0.82;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* ─── 页首安全区与指令行 ──────────────────────────────────────────────
|
|
145
|
+
* 放映一页一屏,页顶安全区写在 .cm-content 容器上(见下面全出血那条后面的
|
|
146
|
+
* 容器规则):行级落点太多(`---` 后的空行、指令行、kicker 源行、标题行都可能
|
|
147
|
+
* 当 page-start),还有标题 padding-top: 0 这类覆盖,kicker 会贴顶
|
|
148
|
+
* (2026-11-27 报的)。two-col 的容器间隔同日验证可行,放映统一走这条路。
|
|
149
|
+
* 导出是流式分纸,容器 padding 只会垫第一页,所以导出仍按行级规则走:
|
|
150
|
+
* 每页第一条线(cm-md-page-start)承担安全区,指令行压成零内容盒
|
|
151
|
+
* (visibility + 字号 0),padding 只留一次——多行指令块的其他行绝不能再吃。 */
|
|
152
|
+
body.presenting #editor .cm-md-slide-directive {
|
|
153
|
+
font-size: 0 !important;
|
|
154
|
+
line-height: 0 !important;
|
|
155
|
+
visibility: hidden;
|
|
156
|
+
margin: 0 !important;
|
|
157
|
+
padding: 0 !important;
|
|
158
|
+
border: none !important;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
body.slides-printing #editor .cm-md-slide-directive {
|
|
162
|
+
font-size: 0 !important;
|
|
163
|
+
line-height: 0 !important;
|
|
164
|
+
visibility: hidden;
|
|
165
|
+
margin: 0 !important;
|
|
166
|
+
padding: 0 !important;
|
|
167
|
+
border: none !important;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* 导出:只有整块指令的第一行(页首)承担安全区,后续字段行零高度。 */
|
|
171
|
+
body.slides-printing #editor .cm-md-slide-directive.cm-md-page-start {
|
|
172
|
+
padding-top: var(--slide-page-top-pad) !important;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* 结构兜底的 kicker:标题前那段文字在放映/导出里不占位,文字由标题行的
|
|
176
|
+
* ::before 显示,源行留在编辑器里照常可改。不能用 display:none:导出里
|
|
177
|
+
* 这一行可能就是 page-start,分页符依赖它。 */
|
|
178
|
+
body.presenting .cm-md-page-kicker,
|
|
179
|
+
body.slides-printing .cm-md-page-kicker {
|
|
180
|
+
font-size: 0 !important;
|
|
181
|
+
line-height: 0 !important;
|
|
182
|
+
visibility: hidden;
|
|
183
|
+
margin: 0 !important;
|
|
184
|
+
padding: 0 !important;
|
|
185
|
+
border: none !important;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* 导出:kicker 源行正好是页首时,它还得承担页顶安全区:文字藏掉,内距留下。 */
|
|
189
|
+
body.slides-printing .cm-md-page-kicker.cm-md-page-start {
|
|
190
|
+
padding-top: var(--slide-page-top-pad) !important;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* 导出:没写指令的页,安全区落在第一条内容行上。带 #editor 提权:页首行往往
|
|
194
|
+
* 是页标题(.cm-md-page-title / .cm-md-atxheading* 写了 padding-top: 0),
|
|
195
|
+
* 同权重会被压掉,默认页就贴顶了。 */
|
|
196
|
+
body.slides-printing #editor .cm-md-page-start {
|
|
197
|
+
padding-top: var(--slide-page-top-pad);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* ─── deck chrome ─────────────────────────────────────────────────── */
|
|
201
|
+
.slide-chrome,
|
|
202
|
+
.slide-foot,
|
|
203
|
+
.slide-ghost {
|
|
204
|
+
/* 等宽小字是 chrome 的声音(杂志风惯例);衬线留给标题与品牌名。 */
|
|
205
|
+
font-family: var(--slide-mono, ui-monospace, Consolas, monospace);
|
|
206
|
+
color: var(--text-color);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.slide-chrome {
|
|
210
|
+
position: fixed;
|
|
211
|
+
top: 0;
|
|
212
|
+
left: 0;
|
|
213
|
+
right: 0;
|
|
214
|
+
z-index: 40;
|
|
215
|
+
display: none;
|
|
216
|
+
align-items: center;
|
|
217
|
+
padding: var(--slide-chrome-pad-y) var(--slide-page-pad-x) 0;
|
|
218
|
+
font-size: 12px;
|
|
219
|
+
font-weight: 500;
|
|
220
|
+
letter-spacing: 0.18em;
|
|
221
|
+
text-transform: var(--slide-chrome-transform, uppercase);
|
|
222
|
+
opacity: var(--slide-chrome-opacity, 0.68);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
body.presenting .slide-chrome,
|
|
226
|
+
body.slides-printing .slide-chrome {
|
|
227
|
+
display: flex;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.slide-chrome-left,
|
|
231
|
+
.slide-chrome-right {
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
gap: 1.4em;
|
|
235
|
+
min-width: 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* 左组与右组之间拉一根 1px 细线,杂志 chrome 的标准做法。 */
|
|
239
|
+
.slide-chrome-left {
|
|
240
|
+
flex: 1;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.slide-chrome-left::after {
|
|
244
|
+
content: '';
|
|
245
|
+
flex: 1;
|
|
246
|
+
min-width: 3em;
|
|
247
|
+
height: 1px;
|
|
248
|
+
margin-left: 0.5em;
|
|
249
|
+
background: currentColor;
|
|
250
|
+
opacity: 0.35;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.slide-chrome-logo {
|
|
254
|
+
height: var(--slide-chrome-logo-h);
|
|
255
|
+
width: auto;
|
|
256
|
+
max-width: 180px;
|
|
257
|
+
object-fit: contain;
|
|
258
|
+
display: block;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.slide-foot {
|
|
262
|
+
position: fixed;
|
|
263
|
+
left: 0;
|
|
264
|
+
right: 0;
|
|
265
|
+
bottom: 0;
|
|
266
|
+
z-index: 40;
|
|
267
|
+
display: none;
|
|
268
|
+
align-items: baseline;
|
|
269
|
+
justify-content: space-between;
|
|
270
|
+
padding: 0 var(--slide-page-pad-x) var(--slide-foot-pad-y);
|
|
271
|
+
font-size: 11px;
|
|
272
|
+
letter-spacing: 0.16em;
|
|
273
|
+
text-transform: var(--slide-chrome-transform, uppercase);
|
|
274
|
+
opacity: 0.55;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
body.presenting .slide-foot,
|
|
278
|
+
body.slides-printing .slide-foot {
|
|
279
|
+
display: flex;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.slide-foot-brand {
|
|
283
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
284
|
+
font-size: 13px;
|
|
285
|
+
font-weight: 500;
|
|
286
|
+
letter-spacing: 0.08em;
|
|
287
|
+
text-transform: none;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* 幽灵页码:右下角超大衬线数字,透明度压到几乎看不见,翻页跟着换数。 */
|
|
291
|
+
.slide-ghost {
|
|
292
|
+
position: fixed;
|
|
293
|
+
right: 4vw;
|
|
294
|
+
bottom: 7vh;
|
|
295
|
+
z-index: 0;
|
|
296
|
+
display: none;
|
|
297
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
298
|
+
font-weight: 800;
|
|
299
|
+
font-size: 26vh;
|
|
300
|
+
line-height: 1;
|
|
301
|
+
opacity: 0.05;
|
|
302
|
+
pointer-events: none;
|
|
303
|
+
font-feature-settings: 'tnum';
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
body.presenting .slide-ghost {
|
|
307
|
+
display: block;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* 打印里每页各不相同的东西(页码、幽灵数字)没法随纸复刻,藏掉;
|
|
311
|
+
logo/标题/meta/品牌名是静态的,fixed 元素会被 Chromium 复刻到每张纸。 */
|
|
312
|
+
body.slides-printing .slide-ghost,
|
|
313
|
+
body.slides-printing .slide-foot-num {
|
|
314
|
+
display: none !important;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* chrome/foot/幽灵页码统一走透明度过渡,翻到收束页时一起淡出。 */
|
|
318
|
+
body.presenting .slide-chrome,
|
|
319
|
+
body.presenting .slide-foot,
|
|
320
|
+
body.presenting .slide-ghost {
|
|
321
|
+
transition: opacity 0.45s ease;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* 封面和章节页保留 chrome:logo、报告名和章节文案是模板封面的一部分,
|
|
325
|
+
* 只有收束页整页压淡时才把 chrome 一起淡出。 */
|
|
326
|
+
body.presenting:has(#editor[data-slide-layout='closing']) .slide-chrome,
|
|
327
|
+
body.presenting:has(#editor[data-slide-layout='closing']) .slide-foot {
|
|
328
|
+
opacity: 0;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
body.presenting:has(#editor[data-slide-layout='cover']) .slide-ghost,
|
|
332
|
+
body.presenting:has(#editor[data-slide-layout='section']) .slide-ghost,
|
|
333
|
+
body.presenting:has(#editor[data-slide-layout='closing']) .slide-ghost {
|
|
334
|
+
opacity: 0;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/* ─── 版式字体族与全出血 ────────────────────────────────────────────
|
|
338
|
+
* 衬线栈把中文衬线排在前面(宋体系):杂志感来自中文衬线的骨架,只在
|
|
339
|
+
* 拉丁字母上找 Georgia 是不够的。等宽栈同理,中文等宽缺字时退回系统字体。 */
|
|
340
|
+
/* 全出血:正文铺满纸面,只留 6vw 边距——幻灯片不是文档,不要阅读列宽。
|
|
341
|
+
* 放映与导出同一条:纸面 1920×1080 时 6vw 解出 115.2px。 */
|
|
342
|
+
body.presenting #editor .cm-content,
|
|
343
|
+
body.slides-printing #editor .cm-content {
|
|
344
|
+
width: 100% !important;
|
|
345
|
+
max-width: none !important;
|
|
346
|
+
margin: 0 !important;
|
|
347
|
+
padding: 0 var(--slide-page-pad-x) !important;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* 放映的页顶安全区写在容器上:放映一页一屏,.cm-content 就是整页纸面,
|
|
351
|
+
* 一条规则覆盖所有版式(agenda/kpi/steps/matrix/two-col/section/默认页),
|
|
352
|
+
* 不再依赖 page-start 的行级落点。two-col 的双栏顶齐也是这一条顺带保证的。
|
|
353
|
+
* 导出不走这条:流式分纸里容器 padding 只会垫第一页,导出按行级规则走。 */
|
|
354
|
+
body.presenting #editor .cm-content {
|
|
355
|
+
padding-top: var(--slide-page-top-pad) !important;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* 行也铺满版心。放映有 base.css 的 `.cm-content > * { max-width: 100% }`,
|
|
359
|
+
* 把 page-default 的 82%、page-lead 的 68% 一起顶掉;导出没有那一条,行会被
|
|
360
|
+
* 百分比压窄——figure 页的图再按 70% 缩一次,纸上的图比放映小一圈
|
|
361
|
+
* (2026-11-24 报的)。这里补上同一条,两边量出来才是同一个宽度。 */
|
|
362
|
+
body.slides-printing #editor .cm-content > * {
|
|
363
|
+
max-width: 100%;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/* 基准字号:PPT 的字号要跟画面走,不能跟主题的阅读字号走。
|
|
367
|
+
* 1080p 全屏 ≈ 26px 正文 → 内容标题 ≈ 109px、封面主标题 ≈ 177px;窄窗口退到 17px。
|
|
368
|
+
* 下面的字号阶梯全部是相对它的 em,一处调整整副牌等比缩放。
|
|
369
|
+
* 导出用同一个令牌:纸面 1920×1080 时 1.35vw 解出 25.92px。 */
|
|
370
|
+
body.presenting #editor .cm-content,
|
|
371
|
+
body.slides-printing #editor .cm-content {
|
|
372
|
+
font-size: var(--slide-body-size);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/* ─── 通用字号阶梯(全出血后的 PPT 惯例)────────────────────────────
|
|
376
|
+
* 标题用衬线、去文档式下划线。真正决定页标题大小的是下面的
|
|
377
|
+
* .cm-md-page-title:不管 Markdown 写成 h1 还是 h2,一页只认第一个标题。
|
|
378
|
+
* 与主题文档样式同权重时本文件在打包顺序里排最后。 */
|
|
379
|
+
body.presenting .cm-md-atxheading1,
|
|
380
|
+
body.slides-printing .cm-md-atxheading1 {
|
|
381
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
382
|
+
font-size: 3.2em;
|
|
383
|
+
font-weight: var(--slide-title-weight, 700);
|
|
384
|
+
line-height: 1.18;
|
|
385
|
+
letter-spacing: var(--slide-title-tracking, -0.01em);
|
|
386
|
+
border-bottom: none;
|
|
387
|
+
padding-top: 0;
|
|
388
|
+
margin-bottom: 0.45em;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
body.presenting .cm-md-atxheading2,
|
|
392
|
+
body.slides-printing .cm-md-atxheading2 {
|
|
393
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
394
|
+
font-size: 2.2em;
|
|
395
|
+
font-weight: var(--slide-subhead-weight, 600);
|
|
396
|
+
line-height: 1.3;
|
|
397
|
+
border-bottom: none;
|
|
398
|
+
padding-top: 0;
|
|
399
|
+
margin-bottom: 0.4em;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
body.presenting .cm-md-atxheading3,
|
|
403
|
+
body.slides-printing .cm-md-atxheading3 {
|
|
404
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
405
|
+
font-size: 1.5em;
|
|
406
|
+
font-weight: var(--slide-subhead-weight, 600);
|
|
407
|
+
line-height: 1.4;
|
|
408
|
+
border-bottom: none;
|
|
409
|
+
padding-top: 0;
|
|
410
|
+
margin-bottom: 0.35em;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
body.presenting .cm-md-atxheading4,
|
|
414
|
+
body.slides-printing .cm-md-atxheading4 {
|
|
415
|
+
font-size: 1.15em;
|
|
416
|
+
font-weight: var(--slide-subhead-weight, 600);
|
|
417
|
+
border-bottom: none;
|
|
418
|
+
padding-top: 0;
|
|
419
|
+
margin-bottom: 0.3em;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/* 页标题:一页的第一个标题,h1 与 h2 同权。 */
|
|
423
|
+
body.presenting .cm-md-page-title,
|
|
424
|
+
body.slides-printing .cm-md-page-title {
|
|
425
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
426
|
+
font-size: var(--slide-title-size, 4.2em);
|
|
427
|
+
font-weight: var(--slide-title-weight, 700);
|
|
428
|
+
line-height: var(--slide-title-line-height, 1.08);
|
|
429
|
+
letter-spacing: var(--slide-title-tracking, -0.01em);
|
|
430
|
+
border-bottom: none;
|
|
431
|
+
padding-top: 0;
|
|
432
|
+
margin: 0 0 0.35em;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* kicker:标题上方的等宽小字,文字来自行属性,画成标题行的一部分。 */
|
|
436
|
+
body.presenting .cm-md-page-title[data-slide-kicker]::before,
|
|
437
|
+
body.slides-printing .cm-md-page-title[data-slide-kicker]::before {
|
|
438
|
+
content: attr(data-slide-kicker);
|
|
439
|
+
display: block;
|
|
440
|
+
margin-bottom: 0.9em;
|
|
441
|
+
font-family: var(--slide-mono, ui-monospace, Consolas, monospace);
|
|
442
|
+
font-size: var(--slide-kicker-size, clamp(11px, 0.72vw, 15px));
|
|
443
|
+
font-weight: 500;
|
|
444
|
+
letter-spacing: var(--slide-kicker-tracking, 0.3em);
|
|
445
|
+
line-height: 1.4;
|
|
446
|
+
text-transform: var(--slide-kicker-transform, uppercase);
|
|
447
|
+
color: var(--text-muted);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* 导语:标题后的第一段,压淡放大,和正文拉开层次。 */
|
|
451
|
+
body.presenting .cm-md-page-lead,
|
|
452
|
+
body.slides-printing .cm-md-page-lead {
|
|
453
|
+
font-size: var(--slide-lead-size, 1.25em);
|
|
454
|
+
line-height: 1.55;
|
|
455
|
+
color: var(--text-secondary, var(--text-muted));
|
|
456
|
+
margin-top: 0;
|
|
457
|
+
margin-bottom: 1.4em;
|
|
458
|
+
max-width: 68%;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/* 默认页 = 文章版式:没写 slide 块的页自动走这里,标题收小、正文压紧,
|
|
462
|
+
* 行宽收一收,一页能装下更多段落。 */
|
|
463
|
+
body.presenting .cm-line.cm-md-page-default,
|
|
464
|
+
body.slides-printing .cm-line.cm-md-page-default {
|
|
465
|
+
font-size: 0.95em;
|
|
466
|
+
line-height: 1.8;
|
|
467
|
+
max-width: 82%;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
body.presenting .cm-md-page-default.cm-md-page-title,
|
|
471
|
+
body.slides-printing .cm-md-page-default.cm-md-page-title {
|
|
472
|
+
font-size: 3.4em;
|
|
473
|
+
line-height: 1.16;
|
|
474
|
+
letter-spacing: -0.015em;
|
|
475
|
+
max-width: 13em;
|
|
476
|
+
margin-bottom: 0.45em;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
body.presenting .cm-md-page-default.cm-md-page-lead,
|
|
480
|
+
body.slides-printing .cm-md-page-default.cm-md-page-lead {
|
|
481
|
+
font-size: 1.05em;
|
|
482
|
+
line-height: 1.7;
|
|
483
|
+
max-width: 82%;
|
|
484
|
+
margin-bottom: 1em;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* 行高放映与导出同值:不一致会让同一份稿子在屏幕上和纸上换行位置不同。 */
|
|
488
|
+
body.presenting #editor .cm-content,
|
|
489
|
+
body.slides-printing #editor .cm-content {
|
|
490
|
+
line-height: 1.7;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
body.presenting .cm-md-li,
|
|
494
|
+
body.slides-printing .cm-md-li {
|
|
495
|
+
margin-top: 0.45em;
|
|
496
|
+
margin-bottom: 0.45em;
|
|
497
|
+
padding-left: 0.3em;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
@keyframes slide-rise {
|
|
501
|
+
from {
|
|
502
|
+
opacity: 0;
|
|
503
|
+
transform: translateY(1em);
|
|
504
|
+
}
|
|
505
|
+
to {
|
|
506
|
+
opacity: 1;
|
|
507
|
+
transform: none;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/* 容器级版式(整页 flex 居中或分栏)里,指令行改成真正不占位(display:none):
|
|
512
|
+
* 放映的安全区写在 .cm-content 容器上(见全出血那条后面),flex 居中的页
|
|
513
|
+
* (cover/closing)内容整体居中,间隔自然比安全区大;two-col 分栏页从安全区
|
|
514
|
+
* 下方开始,两栏顶齐。section(2026-11-27 定)与 agenda/kpi 等内容页一样
|
|
515
|
+
* 顶部对齐,指令行走通用放映规则压成零盒,不再有 page-start 行级内距。 */
|
|
516
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-slide-directive,
|
|
517
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-md-slide-directive,
|
|
518
|
+
body.presenting #editor[data-slide-layout='two-col'] .cm-md-slide-directive {
|
|
519
|
+
display: none;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/* 导出是流式分纸、没有容器级的 flex 居中,封面/收束的整页居中由
|
|
523
|
+
* slides-export.ts 在页前撑空白完成(spacer),页首安全区在这里归零——否则
|
|
524
|
+
* 那截 padding 会叠在 spacer 之上,内容被推得偏下。双栏页不居中,保留安全区。
|
|
525
|
+
* 带 #editor:页首常常就是指令行,它同时命中上面那条「指令行承担安全区」的
|
|
526
|
+
* 规则,两条同为 !important、特异性相同时本文件靠后的这一条才压得住。 */
|
|
527
|
+
body.slides-printing #editor .cm-md-slide-cover.cm-md-page-start,
|
|
528
|
+
body.slides-printing #editor .cm-md-slide-closing.cm-md-page-start {
|
|
529
|
+
padding-top: 0 !important;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* ════ cover · 主视觉封面(dsh-ppt: cover.hero)════
|
|
533
|
+
*
|
|
534
|
+
* 约定:h1 主标题,h2 副标题,标题后的第一段当导语,kicker 写在页头块里。
|
|
535
|
+
* 杂志封面式左对齐,chrome(logo 与报告名)保留在页顶,不再整条淡出。 */
|
|
536
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-content {
|
|
537
|
+
display: flex;
|
|
538
|
+
flex-direction: column;
|
|
539
|
+
justify-content: center;
|
|
540
|
+
min-height: 92vh;
|
|
541
|
+
text-align: var(--slide-cover-text-align, left);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-page-title {
|
|
545
|
+
font-size: var(--slide-cover-title-size, 6.8em);
|
|
546
|
+
line-height: var(--slide-cover-title-line-height, 0.98);
|
|
547
|
+
letter-spacing: var(--slide-cover-title-tracking, -0.02em);
|
|
548
|
+
max-width: 14em;
|
|
549
|
+
animation: slide-rise 0.7s ease-out both;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-atxheading2,
|
|
553
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-atxheading3 {
|
|
554
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
555
|
+
font-size: 2.2em;
|
|
556
|
+
font-weight: 400;
|
|
557
|
+
line-height: 1.25;
|
|
558
|
+
color: var(--text-muted);
|
|
559
|
+
border-bottom: none;
|
|
560
|
+
margin-bottom: 0.5em;
|
|
561
|
+
animation: slide-rise 0.7s ease-out both;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-page-lead {
|
|
565
|
+
max-width: 60%;
|
|
566
|
+
margin-bottom: 1.2em;
|
|
567
|
+
margin-inline: var(--slide-cover-lead-inline, 0);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/* 导出:封面是普通块流(没有容器级的 flex 居中),但字号阶梯与放映同一份令牌,
|
|
571
|
+
不再按纸上高度另收一档——纸面与 1920×1080 的设计空间是一块地方。 */
|
|
572
|
+
body.slides-printing .cm-md-slide-cover.cm-md-page-title {
|
|
573
|
+
font-size: var(--slide-cover-title-size, 6.8em);
|
|
574
|
+
line-height: var(--slide-cover-title-line-height, 0.98);
|
|
575
|
+
letter-spacing: var(--slide-cover-title-tracking, -0.02em);
|
|
576
|
+
max-width: 14em;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
body.slides-printing .cm-md-slide-cover.cm-md-atxheading2,
|
|
580
|
+
body.slides-printing .cm-md-slide-cover.cm-md-atxheading3 {
|
|
581
|
+
font-weight: 400;
|
|
582
|
+
color: var(--text-muted);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
body.slides-printing .cm-md-slide-cover.cm-md-page-lead {
|
|
586
|
+
max-width: 60%;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/* ════ section · 章节陈述(dsh-ppt: section.statement)════
|
|
590
|
+
*
|
|
591
|
+
* 约定:一个 h1(或 h2)作章节判断,标题后一段一句说明。原来是整页 flex
|
|
592
|
+
* 垂直居中,2026-11-27 起与 agenda/kpi 等内容页一致改为顶部对齐:
|
|
593
|
+
* 页顶安全区由 page-start 统一承担,不再有自己的容器级布局。 */
|
|
594
|
+
body.presenting #editor[data-slide-layout='section'] .cm-md-page-title {
|
|
595
|
+
font-size: var(--slide-section-title-size, 5.2em);
|
|
596
|
+
line-height: 1.02;
|
|
597
|
+
max-width: 14em;
|
|
598
|
+
animation: slide-rise 0.6s ease-out both;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
body.presenting #editor[data-slide-layout='section'] .cm-md-page-lead {
|
|
602
|
+
max-width: 55%;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
body.slides-printing .cm-md-slide-section.cm-md-page-title {
|
|
606
|
+
font-size: var(--slide-section-title-size, 5.2em);
|
|
607
|
+
line-height: 1.02;
|
|
608
|
+
max-width: 14em;
|
|
609
|
+
padding-bottom: 0.3em;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/* ════ agenda · 结构列表(dsh-ppt: agenda.simple)════
|
|
613
|
+
*
|
|
614
|
+
* 约定:一个有序列表(1. 2. 3.),每项一句话。整页宽的条目行,顶部细线分隔,
|
|
615
|
+
* 序号用衬线强调色放大——目录页的经典画法。 */
|
|
616
|
+
body.presenting .cm-md-slide-agenda.cm-md-li,
|
|
617
|
+
body.slides-printing .cm-md-slide-agenda.cm-md-li {
|
|
618
|
+
font-size: 1.2em;
|
|
619
|
+
margin: 0;
|
|
620
|
+
padding-top: 1em;
|
|
621
|
+
padding-bottom: 1em;
|
|
622
|
+
border-top: 1px solid var(--border-color);
|
|
623
|
+
list-style: none;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
body.presenting .cm-md-slide-agenda .cm-md-listmark,
|
|
627
|
+
body.slides-printing .cm-md-slide-agenda .cm-md-listmark {
|
|
628
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
629
|
+
font-size: 1.5em;
|
|
630
|
+
font-weight: 700;
|
|
631
|
+
color: var(--pele-accent);
|
|
632
|
+
margin-right: 0.5em;
|
|
633
|
+
font-feature-settings: 'tnum';
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/* ════ kpi · 关键概览(dsh-ppt: overview.kpi)════
|
|
637
|
+
*
|
|
638
|
+
* 约定:一个列表,2-6 项,每项 `**数字** 说明`。参考模板的 stat-card:
|
|
639
|
+
* 一根细线定标,大数字用衬线等宽(tnum),说明压到次要色。 */
|
|
640
|
+
body.presenting .cm-md-slide-kpi.cm-md-li,
|
|
641
|
+
body.slides-printing .cm-md-slide-kpi.cm-md-li {
|
|
642
|
+
display: inline-block;
|
|
643
|
+
width: 31%;
|
|
644
|
+
margin: 0 1.2% 1.4em 0;
|
|
645
|
+
padding: 1em 0.9em 1.1em;
|
|
646
|
+
border-top: 1px solid currentColor;
|
|
647
|
+
border-color: color-mix(in srgb, currentColor 32%, transparent);
|
|
648
|
+
vertical-align: top;
|
|
649
|
+
text-align: left;
|
|
650
|
+
list-style: none;
|
|
651
|
+
font-size: 0.92em;
|
|
652
|
+
line-height: 1.55;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/* 带 #editor .cm-content 提权:主题常在 `#editor .cm-content .cm-md-listmark`
|
|
656
|
+
* 上写 display,单靠 body.presenting 的权重压不住(kpi/timeline/matrix/closing
|
|
657
|
+
* 四处同此,见 steps 处的说明)。 */
|
|
658
|
+
body.presenting #editor .cm-content .cm-md-slide-kpi .cm-md-listmark,
|
|
659
|
+
body.slides-printing #editor .cm-content .cm-md-slide-kpi .cm-md-listmark {
|
|
660
|
+
display: none;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
body.presenting .cm-md-slide-kpi .cm-md-strong,
|
|
664
|
+
body.slides-printing .cm-md-slide-kpi .cm-md-strong {
|
|
665
|
+
display: block;
|
|
666
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
667
|
+
font-size: var(--slide-kpi-number-size, 3.8em);
|
|
668
|
+
font-weight: 800;
|
|
669
|
+
line-height: 1.05;
|
|
670
|
+
letter-spacing: -0.02em;
|
|
671
|
+
color: var(--text-color);
|
|
672
|
+
font-feature-settings: 'tnum';
|
|
673
|
+
margin-bottom: 0.12em;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
body.presenting .cm-md-slide-kpi,
|
|
677
|
+
body.slides-printing .cm-md-slide-kpi {
|
|
678
|
+
color: var(--text-secondary);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/* ════ timeline · 历程时间轴(dsh-ppt: history.timeline)════
|
|
682
|
+
*
|
|
683
|
+
* 约定:一个列表,3-6 项,每项 `**阶段名** 说明`。左侧细轴线加圆点。 */
|
|
684
|
+
body.presenting .cm-md-slide-timeline.cm-md-li,
|
|
685
|
+
body.slides-printing .cm-md-slide-timeline.cm-md-li {
|
|
686
|
+
position: relative;
|
|
687
|
+
margin-left: 0.6em;
|
|
688
|
+
padding-left: 2.2em;
|
|
689
|
+
border-left: 1px solid var(--border-color);
|
|
690
|
+
padding-bottom: 1.4em;
|
|
691
|
+
list-style: none;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
body.presenting #editor .cm-content .cm-md-slide-timeline .cm-md-listmark,
|
|
695
|
+
body.slides-printing #editor .cm-content .cm-md-slide-timeline .cm-md-listmark {
|
|
696
|
+
display: none;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
body.presenting .cm-md-slide-timeline.cm-md-li::before,
|
|
700
|
+
body.slides-printing .cm-md-slide-timeline.cm-md-li::before {
|
|
701
|
+
content: '';
|
|
702
|
+
position: absolute;
|
|
703
|
+
left: -6px;
|
|
704
|
+
top: 0.4em;
|
|
705
|
+
width: 11px;
|
|
706
|
+
height: 11px;
|
|
707
|
+
border-radius: 50%;
|
|
708
|
+
background: var(--pele-accent);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
body.presenting .cm-md-slide-timeline,
|
|
712
|
+
body.slides-printing .cm-md-slide-timeline {
|
|
713
|
+
color: var(--text-secondary);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
body.presenting .cm-md-slide-timeline .cm-md-strong,
|
|
717
|
+
body.slides-printing .cm-md-slide-timeline .cm-md-strong {
|
|
718
|
+
display: block;
|
|
719
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
720
|
+
font-size: 1.2em;
|
|
721
|
+
color: var(--text-color);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/* ════ steps · 步骤流程(dsh-ppt: process.steps)════
|
|
725
|
+
*
|
|
726
|
+
* 约定:一个列表,3-5 项,每项 `**步骤名** 说明`。整行时间轴式步骤条:
|
|
727
|
+
* 左侧强调线,步骤名用描边胶囊,说明占满剩余宽度。不再用三列窄栏,
|
|
728
|
+
* 避免长句被挤成两三行,也避免浅色主题下圆号与文字对比度不足。 */
|
|
729
|
+
body.presenting .cm-md-slide-steps.cm-md-li,
|
|
730
|
+
body.slides-printing .cm-md-slide-steps.cm-md-li {
|
|
731
|
+
display: flex;
|
|
732
|
+
align-items: flex-start;
|
|
733
|
+
gap: 1em;
|
|
734
|
+
width: 100%;
|
|
735
|
+
margin: 0 0 1em;
|
|
736
|
+
padding: 0.75em 0 0.75em 1.1em;
|
|
737
|
+
border-left: 3px solid var(--pele-accent);
|
|
738
|
+
border-bottom: 1px solid var(--border-color);
|
|
739
|
+
list-style: none;
|
|
740
|
+
text-align: left;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/* 序号由主题的列表标记提供,steps 用步骤名胶囊代替,避免两个编号并排。
|
|
744
|
+
* 这里带 #editor .cm-content:主题常在 `#editor .cm-content .cm-md-listmark`
|
|
745
|
+
* 上写 display,单靠 body.presenting 的权重压不住。 */
|
|
746
|
+
body.presenting #editor .cm-content .cm-md-slide-steps .cm-md-listmark,
|
|
747
|
+
body.slides-printing #editor .cm-content .cm-md-slide-steps .cm-md-listmark {
|
|
748
|
+
display: none;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/* 步骤名做成描边胶囊:透明底 + 强调色描边 + 强调色文字,全圆外形。
|
|
752
|
+
* 细线代替色块是这套版式的设计语言;胶囊文字直接用强调色,
|
|
753
|
+
* 在深浅主题上都成立(强调色本身就对底色有足够对比)。
|
|
754
|
+
* 主题的 `#editor .cm-content .cm-md-strong` 可能给加粗另配色,
|
|
755
|
+
* 这里必须带 #editor .cm-content 才能把颜色收回强调色。 */
|
|
756
|
+
body.presenting #editor .cm-content .cm-md-slide-steps .cm-md-strong,
|
|
757
|
+
body.slides-printing #editor .cm-content .cm-md-slide-steps .cm-md-strong {
|
|
758
|
+
display: inline-flex;
|
|
759
|
+
align-items: center;
|
|
760
|
+
justify-content: center;
|
|
761
|
+
flex: 0 0 auto;
|
|
762
|
+
min-width: 2.4em;
|
|
763
|
+
padding: 0.22em 0.9em;
|
|
764
|
+
border: 1.5px solid var(--pele-accent);
|
|
765
|
+
border-radius: 999px;
|
|
766
|
+
background: transparent;
|
|
767
|
+
color: var(--pele-accent);
|
|
768
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
769
|
+
font-size: 0.95em;
|
|
770
|
+
line-height: 1.25;
|
|
771
|
+
white-space: nowrap;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/* ════ matrix · 主题矩阵(dsh-ppt: product.matrix)════
|
|
775
|
+
*
|
|
776
|
+
* 约定:一个列表,3-8 项,每项 `**主题名** 说明`。描边卡片网格。 */
|
|
777
|
+
body.presenting .cm-md-slide-matrix.cm-md-li,
|
|
778
|
+
body.slides-printing .cm-md-slide-matrix.cm-md-li {
|
|
779
|
+
display: inline-block;
|
|
780
|
+
width: 30%;
|
|
781
|
+
margin: 0 1.5% 1.5em 0;
|
|
782
|
+
padding: 1.1em 1.1em 1em;
|
|
783
|
+
border: 1px solid var(--border-color);
|
|
784
|
+
border-radius: var(--pele-radius, 8px);
|
|
785
|
+
vertical-align: top;
|
|
786
|
+
list-style: none;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
body.presenting #editor .cm-content .cm-md-slide-matrix .cm-md-listmark,
|
|
790
|
+
body.slides-printing #editor .cm-content .cm-md-slide-matrix .cm-md-listmark {
|
|
791
|
+
display: none;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
body.presenting .cm-md-slide-matrix .cm-md-strong,
|
|
795
|
+
body.slides-printing .cm-md-slide-matrix .cm-md-strong {
|
|
796
|
+
display: block;
|
|
797
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
798
|
+
font-size: 1.15em;
|
|
799
|
+
color: var(--pele-accent);
|
|
800
|
+
margin-bottom: 0.3em;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
body.presenting .cm-md-slide-matrix,
|
|
804
|
+
body.slides-printing .cm-md-slide-matrix {
|
|
805
|
+
color: var(--text-secondary);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/* ════ two-col · 双栏对比(dsh-ppt: comparison.two-column)════
|
|
809
|
+
*
|
|
810
|
+
* 约定:放映时整页分两栏(data-slide-layout 选容器),中缝一根细线;导出是
|
|
811
|
+
* 流式分纸,退化为行级 inline-block:页首行(通常是标题)保持 block 占全宽,
|
|
812
|
+
* 其余行两条一排——break-before: page 依赖 block 级的页首行,不能一起 inline。 */
|
|
813
|
+
body.presenting #editor[data-slide-layout='two-col'] .cm-content {
|
|
814
|
+
column-count: 2;
|
|
815
|
+
column-gap: 4em;
|
|
816
|
+
column-rule: 1px solid var(--border-color);
|
|
817
|
+
height: 88vh;
|
|
818
|
+
column-fill: auto;
|
|
819
|
+
/* 页顶安全区由通用的 .cm-content 容器 padding 承担:写在容器上两栏顶部
|
|
820
|
+
* 才落得齐平——写在第一行上只有左栏吃得到,右栏会从 0 开始(2026-11-27)。 */
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
body.slides-printing .cm-md-slide-two-col:not(.cm-md-page-start) {
|
|
824
|
+
display: inline-block;
|
|
825
|
+
width: 47.5%;
|
|
826
|
+
vertical-align: top;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/* ════ figure · 图表 / 图片独立页 ════
|
|
830
|
+
*
|
|
831
|
+
* 约定:标题与 kpi 页同一档(标准 4.2em、左对齐),图占画面约七成并居中,
|
|
832
|
+
* 不再铺满整屏;最高 66vh,避免压到页脚。 */
|
|
833
|
+
|
|
834
|
+
/* 放映与导出都是「看图」场景,图表的缩放控件(.pele-zoom)没有意义,
|
|
835
|
+
* 一律藏掉——普通文章打印(body.paper)在 print-layout.ts 已经这么做了。 */
|
|
836
|
+
body.presenting .pele-zoom,
|
|
837
|
+
body.slides-printing .pele-zoom {
|
|
838
|
+
display: none !important;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-page-lead {
|
|
842
|
+
margin-bottom: 0.6em;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-mermaid,
|
|
846
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-image {
|
|
847
|
+
width: 70%;
|
|
848
|
+
max-width: 70%;
|
|
849
|
+
padding: 0;
|
|
850
|
+
margin: 0 auto;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-mermaid svg,
|
|
854
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-image img {
|
|
855
|
+
width: 100%;
|
|
856
|
+
max-width: 100%;
|
|
857
|
+
max-height: var(--slide-figure-max-h);
|
|
858
|
+
height: auto;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/* 导出:标题/导语走标准页角色,图的高度上限与放映同一档(66vh)。纸面 1080 高,
|
|
862
|
+
vh 在纸面与在 1920×1080 的窗口里解出同一个数。
|
|
863
|
+
图是块级 widget,`cm-md-slide-figure` 由 slideshow 的 tagBlockWidgets 补在同一个
|
|
864
|
+
元素上,所以这里必须写紧凑选择器(.a.b):原来的后代写法选不中它,图会退回
|
|
865
|
+
固有尺寸,和放映的 70% 宽不是一个大小。 */
|
|
866
|
+
body.slides-printing .cm-md-slide-figure.cm-md-page-lead {
|
|
867
|
+
margin-bottom: 0.6em;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
body.slides-printing .cm-md-slide-figure.cm-md-mermaid,
|
|
871
|
+
body.slides-printing .cm-md-slide-figure .cm-md-mermaid,
|
|
872
|
+
body.slides-printing .cm-md-slide-figure.cm-md-image,
|
|
873
|
+
body.slides-printing .cm-md-slide-figure .cm-md-image {
|
|
874
|
+
width: 70%;
|
|
875
|
+
max-width: 70%;
|
|
876
|
+
padding: 0;
|
|
877
|
+
margin: 0 auto;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/* 高度上限要带 #editor:图那条通用规则是 (1,1,2),不带 id 的 figure 规则
|
|
881
|
+
压不过它,66vh 会被 72vh 顶掉。 */
|
|
882
|
+
body.slides-printing #editor .cm-md-slide-figure.cm-md-mermaid svg,
|
|
883
|
+
body.slides-printing #editor .cm-md-slide-figure .cm-md-mermaid svg,
|
|
884
|
+
body.slides-printing #editor .cm-md-slide-figure.cm-md-image img,
|
|
885
|
+
body.slides-printing #editor .cm-md-slide-figure .cm-md-image img {
|
|
886
|
+
width: 100%;
|
|
887
|
+
max-height: var(--slide-figure-max-h);
|
|
888
|
+
height: auto;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/* ════ quote · 引言页 ════
|
|
892
|
+
*
|
|
893
|
+
* 约定:一段引用(> …),引用后一行普通文字可作署名(右对齐)。
|
|
894
|
+
* 大引号加在紧跟指令行的第一个引用行上;多段引用只出一次引号。 */
|
|
895
|
+
body.presenting .cm-md-slide-quote .cm-md-blockquote,
|
|
896
|
+
body.slides-printing .cm-md-slide-quote .cm-md-blockquote {
|
|
897
|
+
border-left: none;
|
|
898
|
+
text-align: left;
|
|
899
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
900
|
+
font-size: var(--slide-quote-size, 2.4em);
|
|
901
|
+
font-style: italic;
|
|
902
|
+
line-height: 1.45;
|
|
903
|
+
max-width: 78%;
|
|
904
|
+
color: var(--text-secondary);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
body.presenting .cm-md-slide-directive + .cm-md-blockquote.cm-md-slide-quote::before,
|
|
908
|
+
body.slides-printing .cm-md-slide-directive + .cm-md-blockquote.cm-md-slide-quote::before {
|
|
909
|
+
content: '\201C';
|
|
910
|
+
display: block;
|
|
911
|
+
height: 0.55em;
|
|
912
|
+
font-size: 3.2em;
|
|
913
|
+
font-style: normal;
|
|
914
|
+
line-height: 0.6;
|
|
915
|
+
color: var(--pele-accent);
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/* ════ closing · 结论收束(dsh-ppt: closing.summary)════
|
|
919
|
+
*
|
|
920
|
+
* 约定:一句 h1/h2 收束判断,加一个行动清单。整体压淡,
|
|
921
|
+
* 清单项换 ▸ 前缀(原列表符号藏掉)。 */
|
|
922
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-content {
|
|
923
|
+
display: flex;
|
|
924
|
+
flex-direction: column;
|
|
925
|
+
justify-content: center;
|
|
926
|
+
min-height: 92vh;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-md-page-title {
|
|
930
|
+
font-size: var(--slide-closing-title-size, 4.2em);
|
|
931
|
+
line-height: 1.1;
|
|
932
|
+
max-width: 16em;
|
|
933
|
+
animation: slide-rise 0.6s ease-out both;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-content,
|
|
937
|
+
body.slides-printing .cm-md-slide-closing {
|
|
938
|
+
color: var(--text-muted);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
body.presenting .cm-md-slide-closing.cm-md-li,
|
|
942
|
+
body.slides-printing .cm-md-slide-closing.cm-md-li {
|
|
943
|
+
list-style: none;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
body.presenting #editor .cm-content .cm-md-slide-closing .cm-md-listmark,
|
|
947
|
+
body.slides-printing #editor .cm-content .cm-md-slide-closing .cm-md-listmark {
|
|
948
|
+
display: none;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
body.presenting .cm-md-slide-closing.cm-md-li::before,
|
|
952
|
+
body.slides-printing .cm-md-slide-closing.cm-md-li::before {
|
|
953
|
+
content: '\25B8 ';
|
|
954
|
+
color: var(--pele-accent);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
body.slides-printing .cm-md-slide-closing.cm-md-page-title {
|
|
958
|
+
font-size: var(--slide-closing-title-size, 4.2em);
|
|
959
|
+
line-height: 1.1;
|
|
960
|
+
max-width: 16em;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/* ════ 内容元素:列表 / 强调 / 代码 / 引用 / 表格 / 图片 ════
|
|
964
|
+
*
|
|
965
|
+
* 这些元素在幻灯片里是「顺带出现」的,画法要按 PPT 的读法走:符号收进强调色、
|
|
966
|
+
* 边框收掉、字号按元素性质缩放。版式自己的专用画法(kpi 的大数字、matrix 的
|
|
967
|
+
* 卡名、closing 的 ▸)选择器多一个 cm-md-slide-* 类,权重更高,不受这里影响。 */
|
|
968
|
+
|
|
969
|
+
/* 列表符号:强调色、稍收紧,与文字之间留一点气。 */
|
|
970
|
+
body.presenting .cm-md-listmark,
|
|
971
|
+
body.slides-printing .cm-md-listmark {
|
|
972
|
+
color: var(--pele-accent);
|
|
973
|
+
font-weight: 600;
|
|
974
|
+
padding-right: 0.15em;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/* 正文里的加粗与斜体都借强调色与衬线:演讲时观众一眼抓到关键词。 */
|
|
978
|
+
body.presenting .cm-md-strong,
|
|
979
|
+
body.slides-printing .cm-md-strong {
|
|
980
|
+
color: var(--pele-accent);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
body.presenting .cm-md-em,
|
|
984
|
+
body.slides-printing .cm-md-em {
|
|
985
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
/* 行内代码:缩到正文的 0.86,去掉文档式边框,用极淡的同色底。 */
|
|
989
|
+
body.presenting .cm-md-inlinecode,
|
|
990
|
+
body.slides-printing .cm-md-inlinecode {
|
|
991
|
+
font-size: 0.86em;
|
|
992
|
+
padding: 0.08em 0.34em;
|
|
993
|
+
border: none;
|
|
994
|
+
border-radius: 4px;
|
|
995
|
+
background: color-mix(in srgb, currentColor 9%, transparent);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
/* 代码块:字号再小一档,内距放宽,圆角收边;放映一律折行,横向滚动在
|
|
999
|
+
* 幻灯片上等于内容被切掉。
|
|
1000
|
+
* 纵向内距必须是 0:CM6 给代码块每一行都打 cm-md-codeblock,纵向 padding
|
|
1001
|
+
* 会逐行累加(行距撑成 2em、导出直接跨页),留白交给行高与首尾圆角。 */
|
|
1002
|
+
body.presenting .cm-md-codeblock,
|
|
1003
|
+
body.slides-printing .cm-md-codeblock {
|
|
1004
|
+
font-size: 0.82em;
|
|
1005
|
+
line-height: 1.55;
|
|
1006
|
+
padding: 0 1.1em;
|
|
1007
|
+
border-radius: var(--pele-radius, 8px);
|
|
1008
|
+
white-space: pre-wrap;
|
|
1009
|
+
overflow-wrap: anywhere;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/* 引用(非 quote 版式):一根强调色细线,字号略降,与被引正文拉开层次。 */
|
|
1013
|
+
body.presenting .cm-md-blockquote,
|
|
1014
|
+
body.slides-printing .cm-md-blockquote {
|
|
1015
|
+
border-left: 2px solid var(--pele-accent);
|
|
1016
|
+
padding-left: 1em;
|
|
1017
|
+
font-size: 1.02em;
|
|
1018
|
+
color: var(--text-secondary);
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
/* 表格:表头一根强调色粗线定标,行线压到最细,内距放宽——PPT 的表格
|
|
1022
|
+
* 读的是列,不是网格。 */
|
|
1023
|
+
body.presenting .cm-md-table-widget table,
|
|
1024
|
+
body.slides-printing .cm-md-table-widget table {
|
|
1025
|
+
font-size: 0.88em;
|
|
1026
|
+
border-collapse: collapse;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
body.presenting .cm-md-table-widget th,
|
|
1030
|
+
body.slides-printing .cm-md-table-widget th {
|
|
1031
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
1032
|
+
padding: 0.5em 0.7em;
|
|
1033
|
+
border-bottom: 2px solid var(--pele-accent);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
body.presenting .cm-md-table-widget td,
|
|
1037
|
+
body.slides-printing .cm-md-table-widget td {
|
|
1038
|
+
padding: 0.45em 0.7em;
|
|
1039
|
+
border-bottom: 1px solid var(--border-color);
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
/* 图片:一张图不该撑破一页。放映按视口高度收,导出按纸面高度收——纸面 1080 高,
|
|
1043
|
+
* 导出会把令牌定成纸面的那一档(见 slides-export.ts)。 */
|
|
1044
|
+
body.presenting #editor img,
|
|
1045
|
+
body.slides-printing #editor img {
|
|
1046
|
+
max-height: var(--slide-img-max-h);
|
|
1047
|
+
max-width: 100%;
|
|
1048
|
+
object-fit: contain;
|
|
1049
|
+
border-radius: var(--pele-radius, 8px);
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/* mermaid 等 SVG 图:放映时受 base.css 的 72vh 上限,导出没有窗口视口,用纸面
|
|
1053
|
+
* 1080 的 72vh 定死同一个比例,否则大图会撑破一页、再被整页 zoom 压小。
|
|
1054
|
+
* 不带 #editor:figure 版式那条(0,4,2)要压得过这一条(0,3,2)。 */
|
|
1055
|
+
body.slides-printing .cm-content svg {
|
|
1056
|
+
max-height: var(--slide-img-max-h);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/* 分页符残留:分隔线是分页边界,不是正文的一行,放映时不画。不带 #editor
|
|
1060
|
+
* 是刻意的——页内 slide-css 想把某条线当进度条用时,要压得过这一条。
|
|
1061
|
+
* 打印侧另有一条带 !important 的隐藏规则(slides-export.ts)。 */
|
|
1062
|
+
body.presenting .cm-md-hr {
|
|
1063
|
+
display: none;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/* ─── 导出防跨页(不改放映的排版)────────────────────────────────────
|
|
1067
|
+
* kpi/matrix 卡片、timeline 节点、steps 步骤行、two-col 单元在导出下都是
|
|
1068
|
+
* 流式排在纸上的,条目可能被拦腰切到两页上。这里只加 break-inside: avoid
|
|
1069
|
+
* ——宁可整条挪到下一页,不在半截切断。
|
|
1070
|
+
*
|
|
1071
|
+
* 排版本身(字号、行高、内距)与放映共用同一份规则:纸面 1920×1080 就是
|
|
1072
|
+
* 放映的设计空间,之前那套「导出再收一档」的密度校准(基准 24px、
|
|
1073
|
+
* 行高 1.62、代码块 0.72em、表格 0.75em)连同它的理由一起删掉了——
|
|
1074
|
+
* 它是为了把写死的 24px 塞进纸面,导出字号回到与放映一致后就不再需要
|
|
1075
|
+
* (2026-11-23)。真装不下的页由 slides-export.ts 整页等比压回一页。 */
|
|
1076
|
+
body.slides-printing .cm-md-slide-kpi.cm-md-li,
|
|
1077
|
+
body.slides-printing .cm-md-slide-matrix.cm-md-li,
|
|
1078
|
+
body.slides-printing .cm-md-slide-timeline.cm-md-li,
|
|
1079
|
+
body.slides-printing .cm-md-slide-steps.cm-md-li,
|
|
1080
|
+
body.slides-printing .cm-md-slide-two-col:not(.cm-md-page-start) {
|
|
1081
|
+
break-inside: avoid;
|
|
1082
|
+
}
|