@iasiv5/dsh-skills 1.0.0 → 1.0.2
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/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +4 -2
- package/skills/answer-me-with-html/SKILL.md +4 -2
- package/skills/answer-me-with-html/scripts/am.mjs +627 -192
- package/skills/guizang-ppt-skill/README.en.md +10 -8
- package/skills/guizang-ppt-skill/README.md +10 -8
- package/skills/guizang-ppt-skill/SKILL.md +20 -16
- package/skills/guizang-ppt-skill/assets/template-swiss.html +1068 -456
- package/skills/guizang-ppt-skill/assets/template.html +991 -225
- package/skills/guizang-ppt-skill/references/checklist.md +5 -4
- package/skills/guizang-ppt-skill/references/components.md +9 -5
- package/skills/guizang-ppt-skill/references/gz-components.md +289 -0
- package/skills/guizang-ppt-skill/references/layouts-swiss.md +17 -17
- package/skills/guizang-ppt-skill/references/layouts.md +1 -1
- package/skills/guizang-ppt-skill/references/themes-swiss.md +57 -86
- package/skills/guizang-ppt-skill/references/themes.md +65 -63
- package/skills/guizang-ppt-skill/scripts/gz-theme.mjs +434 -0
- package/skills/guizang-social-card-skill/HANDOFF.md +19 -1
- package/skills/guizang-social-card-skill/README.en.md +20 -7
- package/skills/guizang-social-card-skill/README.md +20 -7
- package/skills/guizang-social-card-skill/SKILL.md +7 -5
- package/skills/guizang-social-card-skill/assets/template-editorial-card.html +954 -126
- package/skills/guizang-social-card-skill/assets/template-swiss-card.html +588 -84
- package/skills/guizang-social-card-skill/package-lock.json +90 -1
- package/skills/guizang-social-card-skill/package.json +7 -4
- package/skills/guizang-social-card-skill/references/background-systems.md +7 -15
- package/skills/guizang-social-card-skill/references/components.md +16 -10
- package/skills/guizang-social-card-skill/references/gz-components.md +289 -0
- package/skills/guizang-social-card-skill/references/layout-recipes.md +1 -1
- package/skills/guizang-social-card-skill/references/production-workflow.md +10 -12
- package/skills/guizang-social-card-skill/references/style-system.md +1 -1
- package/skills/guizang-social-card-skill/references/theme-presets.md +59 -111
- package/skills/guizang-social-card-skill/scripts/gz-fonts.mjs +654 -0
- package/skills/guizang-social-card-skill/scripts/gz-theme.mjs +434 -0
- package/skills/guizang-social-card-skill/scripts/render.mjs +92 -0
- package/skills/guizang-social-card-skill/validate-social-deck.mjs +11 -6
|
@@ -1,42 +1,567 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html lang="zh-CN">
|
|
2
|
+
<html lang="zh-CN" data-family="magazine" data-medium="slide" data-theme="ink-classic">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>[必填] 替换为 PPT 标题 · Deck Title</title>
|
|
7
|
+
<!-- GZ:FONTS:START · 字体由 guizang-design 字体清单生成;需要把字体内置进 HTML 时用 gz-fonts.mjs embed(卡片 skill 的 render.mjs 会自动内置) -->
|
|
7
8
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
-
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400
|
|
10
|
+
<link rel="stylesheet" data-gz-fonts="playfair-display noto-serif-sc source-serif-4 noto-sans-sc ibm-plex-mono" href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Noto+Serif+SC:wght@200..900&family=Source+Serif+4:ital,wght@0,200..900;1,200..900&family=Noto+Sans+SC:wght@100..900&family=IBM+Plex+Mono:wght@400;500;600&display=swap">
|
|
11
|
+
<!-- GZ:FONTS:END -->
|
|
10
12
|
<style>
|
|
11
|
-
:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
/* GZ:TOKENS:START · guizang-design v0.1.0 生成,不要手改;改设计请改 guizang-design 后运行 scripts/sync-skill.mjs */
|
|
14
|
+
:root{
|
|
15
|
+
--font-display:'Playfair Display','Noto Serif SC','Source Han Serif SC','Songti SC',serif;
|
|
16
|
+
--font-serif:'Source Serif 4','Noto Serif SC','Source Han Serif SC','Songti SC','STSong',Georgia,serif;
|
|
17
|
+
--font-serif-zh:'Noto Serif SC','Source Han Serif SC','Songti SC','STSong',serif;
|
|
18
|
+
--font-sans:'Noto Sans SC','PingFang SC','Hiragino Sans GB','Microsoft YaHei',system-ui,sans-serif;
|
|
19
|
+
--font-mono:'IBM Plex Mono','Noto Sans SC',ui-monospace,'SF Mono',Menlo,monospace;
|
|
20
|
+
--sp-1:2px;
|
|
21
|
+
--sp-2:4px;
|
|
22
|
+
--sp-3:8px;
|
|
23
|
+
--sp-4:12px;
|
|
24
|
+
--sp-5:16px;
|
|
25
|
+
--sp-6:24px;
|
|
26
|
+
--sp-7:32px;
|
|
27
|
+
--sp-8:40px;
|
|
28
|
+
--sp-9:48px;
|
|
29
|
+
--sp-10:64px;
|
|
30
|
+
--sp-11:80px;
|
|
31
|
+
--sp-12:96px;
|
|
32
|
+
--sp-13:160px;
|
|
33
|
+
--radius-none:0px;
|
|
34
|
+
--radius-xs:3px;
|
|
35
|
+
--radius-sm:6px;
|
|
36
|
+
--radius-md:14px;
|
|
37
|
+
--radius-pill:999px;
|
|
38
|
+
--ease-standard:cubic-bezier(.2,0,.38,.9);
|
|
39
|
+
--ease-expressive:cubic-bezier(.4,.14,.3,1);
|
|
40
|
+
--ease-entrance:cubic-bezier(0,0,.3,1);
|
|
41
|
+
--ease-entrance-standard:cubic-bezier(0,0,.38,.9);
|
|
42
|
+
--ease-editorial:cubic-bezier(.22,1,.36,1);
|
|
43
|
+
--ease-page:cubic-bezier(.77,0,.175,1);
|
|
44
|
+
--dur-fast-1:70ms;
|
|
45
|
+
--dur-fast-2:110ms;
|
|
46
|
+
--dur-moderate-1:150ms;
|
|
47
|
+
--dur-moderate-2:240ms;
|
|
48
|
+
--dur-slow-1:400ms;
|
|
49
|
+
--dur-slow-2:700ms;
|
|
50
|
+
--dur-page:900ms;
|
|
51
|
+
--stagger-tight:70ms;
|
|
52
|
+
--stagger-base:100ms;
|
|
53
|
+
--stagger-loose:160ms;
|
|
54
|
+
--move-sm:8px;
|
|
55
|
+
--move-md:16px;
|
|
56
|
+
--move-lg:24px;
|
|
57
|
+
--paper:#f1efea;
|
|
58
|
+
--paper-2:#e8e5de;
|
|
59
|
+
--ink:#0a0a0b;
|
|
60
|
+
--muted:#68625a;
|
|
61
|
+
--accent:#111111;
|
|
62
|
+
--accent-soft:#d8d2c6;
|
|
63
|
+
--accent-on:#f1efea;
|
|
64
|
+
--accent-ink:#111111;
|
|
65
|
+
--accent-display:#111111;
|
|
66
|
+
--accent-ink-inverse:#b2b2b2;
|
|
67
|
+
--text-primary:#0a0a0b;
|
|
68
|
+
--text-body:#2c2b2c;
|
|
69
|
+
--text-secondary:#404040;
|
|
70
|
+
--text-helper:#68625a;
|
|
71
|
+
--line-strong:#7e7d7b;
|
|
72
|
+
--line:#b7b5b2;
|
|
73
|
+
--line-subtle:#d1cfcb;
|
|
74
|
+
--ink-rgb:10,10,11;
|
|
75
|
+
--paper-rgb:241,239,234;
|
|
76
|
+
--accent-rgb:17,17,17;
|
|
77
|
+
--accent-on-rgb:241,239,234;
|
|
78
|
+
--accent-on-text:#f1efea;
|
|
79
|
+
--accent-on-text-rgb:241,239,234;
|
|
80
|
+
color-scheme:light;
|
|
81
|
+
}
|
|
82
|
+
[data-theme="ink-classic"]{
|
|
83
|
+
--paper:#f1efea;
|
|
84
|
+
--paper-2:#e8e5de;
|
|
85
|
+
--ink:#0a0a0b;
|
|
86
|
+
--muted:#68625a;
|
|
87
|
+
--accent:#111111;
|
|
88
|
+
--accent-soft:#d8d2c6;
|
|
89
|
+
--accent-on:#f1efea;
|
|
90
|
+
--accent-ink:#111111;
|
|
91
|
+
--accent-display:#111111;
|
|
92
|
+
--accent-ink-inverse:#b2b2b2;
|
|
93
|
+
--text-primary:#0a0a0b;
|
|
94
|
+
--text-body:#2c2b2c;
|
|
95
|
+
--text-secondary:#404040;
|
|
96
|
+
--text-helper:#68625a;
|
|
97
|
+
--line-strong:#7e7d7b;
|
|
98
|
+
--line:#b7b5b2;
|
|
99
|
+
--line-subtle:#d1cfcb;
|
|
100
|
+
--ink-rgb:10,10,11;
|
|
101
|
+
--paper-rgb:241,239,234;
|
|
102
|
+
--accent-rgb:17,17,17;
|
|
103
|
+
--accent-on-rgb:241,239,234;
|
|
104
|
+
--accent-on-text:#f1efea;
|
|
105
|
+
--accent-on-text-rgb:241,239,234;
|
|
106
|
+
color-scheme:light;
|
|
107
|
+
}
|
|
108
|
+
[data-theme="indigo-porcelain"]{
|
|
109
|
+
--paper:#f1f3f5;
|
|
110
|
+
--paper-2:#e4e8ec;
|
|
111
|
+
--ink:#0a1f3d;
|
|
112
|
+
--muted:#5f6d78;
|
|
113
|
+
--accent:#315d93;
|
|
114
|
+
--accent-soft:#d7e1ec;
|
|
115
|
+
--accent-on:#f1f3f5;
|
|
116
|
+
--accent-ink:#315d93;
|
|
117
|
+
--accent-display:#315d93;
|
|
118
|
+
--accent-ink-inverse:#89b9f5;
|
|
119
|
+
--text-primary:#0a1f3d;
|
|
120
|
+
--text-body:#2e415c;
|
|
121
|
+
--text-secondary:#43546d;
|
|
122
|
+
--text-helper:#5f6d78;
|
|
123
|
+
--line-strong:#808d9e;
|
|
124
|
+
--line:#b8c0ca;
|
|
125
|
+
--line-subtle:#d2d7dd;
|
|
126
|
+
--ink-rgb:10,31,61;
|
|
127
|
+
--paper-rgb:241,243,245;
|
|
128
|
+
--accent-rgb:49,93,147;
|
|
129
|
+
--accent-on-rgb:241,243,245;
|
|
130
|
+
--accent-on-text:#f1f3f5;
|
|
131
|
+
--accent-on-text-rgb:241,243,245;
|
|
132
|
+
color-scheme:light;
|
|
133
|
+
}
|
|
134
|
+
[data-theme="forest-ink"]{
|
|
135
|
+
--paper:#f5f1e8;
|
|
136
|
+
--paper-2:#ece7da;
|
|
137
|
+
--ink:#1a2e1f;
|
|
138
|
+
--muted:#5d665d;
|
|
139
|
+
--accent:#2e6b4f;
|
|
140
|
+
--accent-soft:#d4dfd2;
|
|
141
|
+
--accent-on:#f5f1e8;
|
|
142
|
+
--accent-ink:#2e6b4f;
|
|
143
|
+
--accent-display:#2e6b4f;
|
|
144
|
+
--accent-ink-inverse:#88c6a6;
|
|
145
|
+
--text-primary:#1a2e1f;
|
|
146
|
+
--text-body:#3d4d3e;
|
|
147
|
+
--text-secondary:#515f51;
|
|
148
|
+
--text-helper:#5d665d;
|
|
149
|
+
--line-strong:#8b9386;
|
|
150
|
+
--line:#c0c2b7;
|
|
151
|
+
--line-subtle:#d8d7cd;
|
|
152
|
+
--ink-rgb:26,46,31;
|
|
153
|
+
--paper-rgb:245,241,232;
|
|
154
|
+
--accent-rgb:46,107,79;
|
|
155
|
+
--accent-on-rgb:245,241,232;
|
|
156
|
+
--accent-on-text:#f5f1e8;
|
|
157
|
+
--accent-on-text-rgb:245,241,232;
|
|
158
|
+
color-scheme:light;
|
|
159
|
+
}
|
|
160
|
+
[data-theme="kraft-paper"]{
|
|
161
|
+
--paper:#eedfc7;
|
|
162
|
+
--paper-2:#e0d0b6;
|
|
163
|
+
--ink:#2a1e13;
|
|
164
|
+
--muted:#755f49;
|
|
165
|
+
--accent:#9b5a2e;
|
|
166
|
+
--accent-soft:#d5b58f;
|
|
167
|
+
--accent-on:#eedfc7;
|
|
168
|
+
--accent-ink:#804212;
|
|
169
|
+
--accent-display:#9b5a2e;
|
|
170
|
+
--accent-ink-inverse:#eda679;
|
|
171
|
+
--text-primary:#2a1e13;
|
|
172
|
+
--text-body:#493c2f;
|
|
173
|
+
--text-secondary:#5b4e3f;
|
|
174
|
+
--text-helper:#755f49;
|
|
175
|
+
--line-strong:#8f816f;
|
|
176
|
+
--line:#bfb09b;
|
|
177
|
+
--line-subtle:#d4c5af;
|
|
178
|
+
--ink-rgb:42,30,19;
|
|
179
|
+
--paper-rgb:238,223,199;
|
|
180
|
+
--accent-rgb:155,90,46;
|
|
181
|
+
--accent-on-rgb:238,223,199;
|
|
182
|
+
--accent-on-text:#ffffff;
|
|
183
|
+
--accent-on-text-rgb:255,255,255;
|
|
184
|
+
color-scheme:light;
|
|
185
|
+
}
|
|
186
|
+
[data-theme="dune"]{
|
|
187
|
+
--paper:#f0e6d2;
|
|
188
|
+
--paper-2:#e3d7bf;
|
|
189
|
+
--ink:#1f1a14;
|
|
190
|
+
--muted:#6f6557;
|
|
191
|
+
--accent:#8f7650;
|
|
192
|
+
--accent-soft:#d4c2a4;
|
|
193
|
+
--accent-on:#f0e6d2;
|
|
194
|
+
--accent-ink:#705833;
|
|
195
|
+
--accent-display:#8f7650;
|
|
196
|
+
--accent-ink-inverse:#cbb088;
|
|
197
|
+
--text-primary:#1f1a14;
|
|
198
|
+
--text-body:#3f3931;
|
|
199
|
+
--text-secondary:#524c42;
|
|
200
|
+
--text-helper:#6f6557;
|
|
201
|
+
--line-strong:#8a8275;
|
|
202
|
+
--line:#bdb4a3;
|
|
203
|
+
--line-subtle:#d4cab8;
|
|
204
|
+
--ink-rgb:31,26,20;
|
|
205
|
+
--paper-rgb:240,230,210;
|
|
206
|
+
--accent-rgb:143,118,80;
|
|
207
|
+
--accent-on-rgb:240,230,210;
|
|
208
|
+
--accent-on-text:#ffffff;
|
|
209
|
+
--accent-on-text-rgb:255,255,255;
|
|
210
|
+
color-scheme:light;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
:root{
|
|
214
|
+
--fs-display:min(11vw,19.556vh);
|
|
215
|
+
--fw-display:700;
|
|
216
|
+
--lh-display:0.92;
|
|
217
|
+
--ls-display:-.025em;
|
|
218
|
+
--ff-display:var(--font-display);
|
|
219
|
+
--fst-display:normal;
|
|
220
|
+
--tt-display:none;
|
|
221
|
+
--fs-display-zh:min(10vw,17.778vh);
|
|
222
|
+
--fw-display-zh:900;
|
|
223
|
+
--lh-display-zh:0.96;
|
|
224
|
+
--ls-display-zh:-.02em;
|
|
225
|
+
--ff-display-zh:var(--font-serif-zh);
|
|
226
|
+
--fst-display-zh:normal;
|
|
227
|
+
--tt-display-zh:none;
|
|
228
|
+
--fs-title:min(6.2vw,11.022vh);
|
|
229
|
+
--fw-title:700;
|
|
230
|
+
--lh-title:1.08;
|
|
231
|
+
--ls-title:-.025em;
|
|
232
|
+
--ff-title:var(--font-display);
|
|
233
|
+
--fst-title:normal;
|
|
234
|
+
--tt-title:none;
|
|
235
|
+
--fs-title-zh:min(6.2vw,11.022vh);
|
|
236
|
+
--fw-title-zh:700;
|
|
237
|
+
--lh-title-zh:1.08;
|
|
238
|
+
--ls-title-zh:-.01em;
|
|
239
|
+
--ff-title-zh:var(--font-serif-zh);
|
|
240
|
+
--fst-title-zh:normal;
|
|
241
|
+
--tt-title-zh:none;
|
|
242
|
+
--fs-heading:min(2.3vw,4.089vh);
|
|
243
|
+
--fw-heading:600;
|
|
244
|
+
--lh-heading:1.3;
|
|
245
|
+
--ls-heading:0;
|
|
246
|
+
--ff-heading:var(--font-serif-zh);
|
|
247
|
+
--fst-heading:normal;
|
|
248
|
+
--tt-heading:none;
|
|
249
|
+
--fs-subhead:min(3.1vw,5.511vh);
|
|
250
|
+
--fw-subhead:500;
|
|
251
|
+
--lh-subhead:1.25;
|
|
252
|
+
--ls-subhead:0;
|
|
253
|
+
--ff-subhead:var(--font-serif-zh);
|
|
254
|
+
--fst-subhead:normal;
|
|
255
|
+
--tt-subhead:none;
|
|
256
|
+
--fs-lead:max(min(20px,2.778vh),min(1.75vw,3.111vh));
|
|
257
|
+
--fw-lead:400;
|
|
258
|
+
--lh-lead:1.5;
|
|
259
|
+
--ls-lead:0;
|
|
260
|
+
--ff-lead:var(--font-serif-zh);
|
|
261
|
+
--fst-lead:normal;
|
|
262
|
+
--tt-lead:none;
|
|
263
|
+
--fs-body:max(min(18px,2.5vh),min(1.22vw,2.169vh));
|
|
264
|
+
--fw-body:400;
|
|
265
|
+
--lh-body:1.75;
|
|
266
|
+
--ls-body:.01em;
|
|
267
|
+
--ff-body:var(--font-sans);
|
|
268
|
+
--fst-body:normal;
|
|
269
|
+
--tt-body:none;
|
|
270
|
+
--fs-small:max(min(16px,2.222vh),min(1.05vw,1.867vh));
|
|
271
|
+
--fw-small:400;
|
|
272
|
+
--lh-small:1.5;
|
|
273
|
+
--ls-small:0;
|
|
274
|
+
--ff-small:var(--font-sans);
|
|
275
|
+
--fst-small:normal;
|
|
276
|
+
--tt-small:none;
|
|
277
|
+
--fs-caption:max(min(14px,1.944vh),min(.8vw,1.422vh));
|
|
278
|
+
--fw-caption:400;
|
|
279
|
+
--lh-caption:1.4;
|
|
280
|
+
--ls-caption:.2em;
|
|
281
|
+
--ff-caption:var(--font-mono);
|
|
282
|
+
--fst-caption:normal;
|
|
283
|
+
--tt-caption:uppercase;
|
|
284
|
+
--fs-label:max(min(14px,1.944vh),min(.88vw,1.564vh));
|
|
285
|
+
--fw-label:500;
|
|
286
|
+
--lh-label:1.3;
|
|
287
|
+
--ls-label:.16em;
|
|
288
|
+
--ff-label:var(--font-mono);
|
|
289
|
+
--fst-label:normal;
|
|
290
|
+
--tt-label:uppercase;
|
|
291
|
+
--fs-meta:max(min(14px,1.944vh),min(.78vw,1.387vh));
|
|
292
|
+
--fw-meta:400;
|
|
293
|
+
--lh-meta:1.3;
|
|
294
|
+
--ls-meta:.2em;
|
|
295
|
+
--ff-meta:var(--font-mono);
|
|
296
|
+
--fst-meta:normal;
|
|
297
|
+
--tt-meta:uppercase;
|
|
298
|
+
--fs-quote:min(5.8vw,10.311vh);
|
|
299
|
+
--fw-quote:700;
|
|
300
|
+
--lh-quote:1.2;
|
|
301
|
+
--ls-quote:-.01em;
|
|
302
|
+
--ff-quote:var(--font-serif-zh);
|
|
303
|
+
--fst-quote:normal;
|
|
304
|
+
--tt-quote:none;
|
|
305
|
+
--fs-num-xl:min(10vw,17.778vh);
|
|
306
|
+
--fw-num-xl:800;
|
|
307
|
+
--lh-num-xl:0.85;
|
|
308
|
+
--ls-num-xl:-.03em;
|
|
309
|
+
--ff-num-xl:var(--font-display);
|
|
310
|
+
--fst-num-xl:normal;
|
|
311
|
+
--tt-num-xl:none;
|
|
312
|
+
--fs-num-l:min(8vw,14.222vh);
|
|
313
|
+
--fw-num-l:800;
|
|
314
|
+
--lh-num-l:0.88;
|
|
315
|
+
--ls-num-l:-.03em;
|
|
316
|
+
--ff-num-l:var(--font-display);
|
|
317
|
+
--fst-num-l:normal;
|
|
318
|
+
--tt-num-l:none;
|
|
319
|
+
--fs-num-m:min(5.5vw,9.778vh);
|
|
320
|
+
--fw-num-m:700;
|
|
321
|
+
--lh-num-m:0.88;
|
|
322
|
+
--ls-num-m:-.02em;
|
|
323
|
+
--ff-num-m:var(--font-display);
|
|
324
|
+
--fst-num-m:normal;
|
|
325
|
+
--tt-num-m:none;
|
|
326
|
+
--canvas-padding:6vh 6vw 10vh 6vw;
|
|
327
|
+
--canvas-safe-bottom:8vh;
|
|
328
|
+
--sp-1:0.1042vw;
|
|
329
|
+
--sp-2:0.2083vw;
|
|
330
|
+
--sp-3:0.4167vw;
|
|
331
|
+
--sp-4:0.625vw;
|
|
332
|
+
--sp-5:0.8333vw;
|
|
333
|
+
--sp-6:1.25vw;
|
|
334
|
+
--sp-7:1.6667vw;
|
|
335
|
+
--sp-8:2.0833vw;
|
|
336
|
+
--sp-9:2.5vw;
|
|
337
|
+
--sp-10:3.3333vw;
|
|
338
|
+
--sp-11:4.1667vw;
|
|
339
|
+
--sp-12:5vw;
|
|
340
|
+
--sp-13:8.3333vw;
|
|
341
|
+
}
|
|
342
|
+
.gz-t-display{font-family:var(--ff-display);font-size:var(--fs-display);font-weight:var(--fw-display);line-height:var(--lh-display);letter-spacing:var(--ls-display);font-style:var(--fst-display);text-transform:var(--tt-display)}
|
|
343
|
+
.gz-t-display-zh{font-family:var(--ff-display-zh);font-size:var(--fs-display-zh);font-weight:var(--fw-display-zh);line-height:var(--lh-display-zh);letter-spacing:var(--ls-display-zh);font-style:var(--fst-display-zh);text-transform:var(--tt-display-zh)}
|
|
344
|
+
.gz-t-title{font-family:var(--ff-title);font-size:var(--fs-title);font-weight:var(--fw-title);line-height:var(--lh-title);letter-spacing:var(--ls-title);font-style:var(--fst-title);text-transform:var(--tt-title)}
|
|
345
|
+
.gz-t-title-zh{font-family:var(--ff-title-zh);font-size:var(--fs-title-zh);font-weight:var(--fw-title-zh);line-height:var(--lh-title-zh);letter-spacing:var(--ls-title-zh);font-style:var(--fst-title-zh);text-transform:var(--tt-title-zh)}
|
|
346
|
+
.gz-t-heading{font-family:var(--ff-heading);font-size:var(--fs-heading);font-weight:var(--fw-heading);line-height:var(--lh-heading);letter-spacing:var(--ls-heading);font-style:var(--fst-heading);text-transform:var(--tt-heading)}
|
|
347
|
+
.gz-t-subhead{font-family:var(--ff-subhead);font-size:var(--fs-subhead);font-weight:var(--fw-subhead);line-height:var(--lh-subhead);letter-spacing:var(--ls-subhead);font-style:var(--fst-subhead);text-transform:var(--tt-subhead)}
|
|
348
|
+
.gz-t-lead{font-family:var(--ff-lead);font-size:var(--fs-lead);font-weight:var(--fw-lead);line-height:var(--lh-lead);letter-spacing:var(--ls-lead);font-style:var(--fst-lead);text-transform:var(--tt-lead)}
|
|
349
|
+
.gz-t-body{font-family:var(--ff-body);font-size:var(--fs-body);font-weight:var(--fw-body);line-height:var(--lh-body);letter-spacing:var(--ls-body);font-style:var(--fst-body);text-transform:var(--tt-body)}
|
|
350
|
+
.gz-t-small{font-family:var(--ff-small);font-size:var(--fs-small);font-weight:var(--fw-small);line-height:var(--lh-small);letter-spacing:var(--ls-small);font-style:var(--fst-small);text-transform:var(--tt-small)}
|
|
351
|
+
.gz-t-caption{font-family:var(--ff-caption);font-size:var(--fs-caption);font-weight:var(--fw-caption);line-height:var(--lh-caption);letter-spacing:var(--ls-caption);font-style:var(--fst-caption);text-transform:var(--tt-caption)}
|
|
352
|
+
.gz-t-label{font-family:var(--ff-label);font-size:var(--fs-label);font-weight:var(--fw-label);line-height:var(--lh-label);letter-spacing:var(--ls-label);font-style:var(--fst-label);text-transform:var(--tt-label)}
|
|
353
|
+
.gz-t-meta{font-family:var(--ff-meta);font-size:var(--fs-meta);font-weight:var(--fw-meta);line-height:var(--lh-meta);letter-spacing:var(--ls-meta);font-style:var(--fst-meta);text-transform:var(--tt-meta)}
|
|
354
|
+
.gz-t-quote{font-family:var(--ff-quote);font-size:var(--fs-quote);font-weight:var(--fw-quote);line-height:var(--lh-quote);letter-spacing:var(--ls-quote);font-style:var(--fst-quote);text-transform:var(--tt-quote)}
|
|
355
|
+
.gz-t-num-xl{font-family:var(--ff-num-xl);font-size:var(--fs-num-xl);font-weight:var(--fw-num-xl);line-height:var(--lh-num-xl);letter-spacing:var(--ls-num-xl);font-style:var(--fst-num-xl);text-transform:var(--tt-num-xl)}
|
|
356
|
+
.gz-t-num-l{font-family:var(--ff-num-l);font-size:var(--fs-num-l);font-weight:var(--fw-num-l);line-height:var(--lh-num-l);letter-spacing:var(--ls-num-l);font-style:var(--fst-num-l);text-transform:var(--tt-num-l)}
|
|
357
|
+
.gz-t-num-m{font-family:var(--ff-num-m);font-size:var(--fs-num-m);font-weight:var(--fw-num-m);line-height:var(--lh-num-m);letter-spacing:var(--ls-num-m);font-style:var(--fst-num-m);text-transform:var(--tt-num-m)}
|
|
358
|
+
|
|
359
|
+
:lang(zh){line-break:strict;text-spacing-trim:normal;text-autospace:normal;overflow-wrap:break-word}
|
|
360
|
+
:lang(zh) .gz-prose em:not(:lang(en)){font-style:normal;text-emphasis:filled dot;text-emphasis-position:under right}
|
|
361
|
+
.gz-tnum{font-variant-numeric:tabular-nums}
|
|
362
|
+
|
|
363
|
+
/* 歸藏设计系统 · 共享组件
|
|
364
|
+
*
|
|
365
|
+
* 一份结构,三种介质:根节点 <html data-family="magazine|swiss" data-medium="slide|card|page">。
|
|
366
|
+
* 这里只管布局、颜色和间距;字号、字重、行高一律由 gz-t-<角色> 类提供,
|
|
367
|
+
* 所以同一个组件放进 PPT、卡片、网页会自动换成各自的字号。
|
|
368
|
+
* 颜色只用语义 token(--text-* / --line-* / --accent*),换主题不需要改组件。
|
|
369
|
+
*/
|
|
370
|
+
|
|
371
|
+
/* ---------- 家族差异 ---------- */
|
|
372
|
+
/* 单张卡片 / 单页换主题([data-theme])或反色([data-surface])时,线条变量要在那一层重新计算,否则沿用根节点的颜色 */
|
|
373
|
+
[data-family="magazine"], [data-family="magazine"] [data-theme], [data-family="magazine"] [data-surface] { --img-pos: center top; --rule: 1px solid var(--line-strong); --rule-strong: 1px solid var(--line-strong) }
|
|
374
|
+
[data-family="swiss"], [data-family="swiss"] [data-theme], [data-family="swiss"] [data-surface] { --img-pos: center center; --rule: 1px solid var(--line); --rule-strong: 2px solid var(--ink) }
|
|
375
|
+
|
|
376
|
+
/* ---------- 表面:反色块里文字角色跟着换 ---------- */
|
|
377
|
+
[data-surface="ink"] {
|
|
378
|
+
background: var(--ink); color: var(--paper);
|
|
379
|
+
--text-primary: var(--paper); --text-body: rgba(var(--paper-rgb), .86); --text-secondary: rgba(var(--paper-rgb), .72);
|
|
380
|
+
--text-helper: rgba(var(--paper-rgb), .62); --line: rgba(var(--paper-rgb), .22); --line-strong: rgba(var(--paper-rgb), .45);
|
|
381
|
+
--accent-ink: var(--accent-ink-inverse); --accent-display: var(--accent-ink-inverse); --rule-strong: 2px solid var(--paper);
|
|
382
|
+
}
|
|
383
|
+
[data-family="magazine"] [data-surface="ink"], [data-family="magazine"][data-surface="ink"] { --rule-strong: 1px solid rgba(var(--paper-rgb), .45) }
|
|
384
|
+
[data-surface="accent"] {
|
|
385
|
+
background: var(--accent); color: var(--accent-on);
|
|
386
|
+
--text-primary: var(--accent-on); --text-body: rgba(var(--accent-on-rgb), .88); --text-secondary: rgba(var(--accent-on-rgb), .78);
|
|
387
|
+
--text-helper: rgba(var(--accent-on-rgb), .7); --line: rgba(var(--accent-on-rgb), .3); --line-strong: rgba(var(--accent-on-rgb), .55);
|
|
388
|
+
--accent-ink: var(--accent-on); --accent-display: var(--accent-on); --rule-strong: 2px solid var(--accent-on);
|
|
389
|
+
}
|
|
390
|
+
[data-surface="paper-2"] { background: var(--paper-2) }
|
|
391
|
+
|
|
392
|
+
/* 强调色文字:小字用 accent-ink,大字 / 大数字用 accent-display(浅色强调色在纸上会自动加深;反色块里自动切换) */
|
|
393
|
+
.gz-c-accent { color: var(--accent-ink) }
|
|
394
|
+
.gz-c-accent-display { color: var(--accent-display) }
|
|
395
|
+
|
|
396
|
+
/* ---------- 页眉页脚 chrome ---------- */
|
|
397
|
+
.gz-chrome { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-6); color: var(--text-helper); border-top: var(--rule); padding-top: var(--sp-4) }
|
|
398
|
+
.gz-chrome[data-pos="top"] { border-top: 0; border-bottom: var(--rule); padding: 0 0 var(--sp-4) }
|
|
399
|
+
.gz-chrome__group { display: flex; gap: var(--sp-5); min-width: 0 }
|
|
400
|
+
.gz-chrome__accent { color: var(--accent-ink) }
|
|
401
|
+
|
|
402
|
+
/* ---------- 封面 cover ---------- */
|
|
403
|
+
.gz-cover { display: flex; flex-direction: column; gap: var(--sp-6); color: var(--text-primary) }
|
|
404
|
+
.gz-cover__kicker { color: var(--text-helper) }
|
|
405
|
+
[data-family="swiss"] .gz-cover__kicker { color: var(--accent-ink) }
|
|
406
|
+
.gz-cover__body { width: 100%; container-type: inline-size }
|
|
407
|
+
/* 标题按最长一行的字数自动收字号:--chars 由 components/render.mjs 算好写进 style;手写时填最长一行的字数(中文 1、西文约 0.56)。上限仍是 token 定的展示字号 */
|
|
408
|
+
.gz-cover__title { margin: 0; font-size: min(var(--fs-display-zh), calc(100cqi / var(--chars, 1) * .94)) }
|
|
409
|
+
.gz-cover__rule { width: 96px; height: 0; border-top: 2px solid var(--accent) }
|
|
410
|
+
[data-family="swiss"] .gz-cover__rule { border-top-width: 3px }
|
|
411
|
+
.gz-cover__sub { margin: 0; color: var(--text-body); max-width: 32em }
|
|
412
|
+
.gz-cover__meta { margin-top: auto }
|
|
413
|
+
/* 幻灯片、卡片:封面撑满画布,标题压在下半部 */
|
|
414
|
+
[data-medium="slide"] .gz-cover, [data-medium="card"] .gz-cover { height: 100% }
|
|
415
|
+
[data-medium="slide"] .gz-cover__body, [data-medium="card"] .gz-cover__body { margin-top: auto; display: flex; flex-direction: column; gap: var(--sp-7) }
|
|
416
|
+
[data-medium="slide"] .gz-cover__meta, [data-medium="card"] .gz-cover__meta { margin-top: var(--sp-10) }
|
|
417
|
+
/* 网页:杂志风居中,瑞士风左对齐 */
|
|
418
|
+
[data-medium="page"] .gz-cover { padding: var(--sp-11) 0 var(--sp-9); border-bottom: var(--rule) }
|
|
419
|
+
[data-medium="page"] .gz-cover__body { display: flex; flex-direction: column; gap: var(--sp-6) }
|
|
420
|
+
[data-medium="page"][data-family="magazine"] .gz-cover { align-items: center; text-align: center }
|
|
421
|
+
[data-medium="page"][data-family="magazine"] .gz-cover__body { align-items: center }
|
|
422
|
+
[data-medium="page"] .gz-cover__meta { margin-top: var(--sp-6); border-top: 0; padding-top: 0; justify-content: center }
|
|
423
|
+
[data-medium="page"][data-family="swiss"] .gz-cover__meta { justify-content: flex-start }
|
|
424
|
+
|
|
425
|
+
/* ---------- 大数字 stat ---------- */
|
|
426
|
+
.gz-stats { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--sp-9) var(--sp-7) }
|
|
427
|
+
.gz-stats[data-count="1"] { --cols: 1 } .gz-stats[data-count="2"] { --cols: 2 } .gz-stats[data-count="4"] { --cols: 4 }
|
|
428
|
+
[data-medium="card"] .gz-stats { --cols: 2 }
|
|
429
|
+
[data-medium="card"] .gz-stats[data-count="1"], [data-medium="card"] .gz-stats[data-count="3"] { --cols: 1 }
|
|
430
|
+
.gz-stat { display: flex; flex-direction: column; gap: var(--sp-4); border-top: var(--rule-strong); padding-top: var(--sp-5); min-width: 0 }
|
|
431
|
+
.gz-stat__label { color: var(--text-helper) }
|
|
432
|
+
.gz-stat__value { display: flex; align-items: baseline; gap: .06em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap }
|
|
433
|
+
.gz-stat__unit { font-size: .4em; font-weight: 500; letter-spacing: 0; color: var(--text-secondary) }
|
|
434
|
+
.gz-stat.is-accent .gz-stat__num { color: var(--accent-ink) }
|
|
435
|
+
.gz-stat__note { margin: 0; color: var(--text-secondary); max-width: 24em }
|
|
436
|
+
[data-medium="card"] .gz-stats[data-count="3"] .gz-stat { display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: var(--sp-7) }
|
|
437
|
+
[data-medium="card"] .gz-stats[data-count="3"] .gz-stat__label { grid-column: 1 / -1 }
|
|
438
|
+
[data-medium="card"] .gz-stats[data-count="3"] .gz-stat__note { padding-bottom: .6em }
|
|
439
|
+
|
|
440
|
+
/* ---------- 引言 quote ---------- */
|
|
441
|
+
.gz-quote { margin: 0; display: flex; flex-direction: column; gap: var(--sp-7) }
|
|
442
|
+
.gz-quote__text { margin: 0; color: var(--text-primary); text-wrap: balance }
|
|
443
|
+
.gz-quote__text p { margin: 0; text-wrap: balance }
|
|
444
|
+
[data-family="magazine"] .gz-quote__text::before { content: "\201C"; display: block; font-family: var(--font-display); font-style: normal; color: var(--accent); font-size: 1.8em; line-height: 1; height: .55em }
|
|
445
|
+
[data-family="swiss"] .gz-quote { border-top: var(--rule-strong); padding-top: var(--sp-7) }
|
|
446
|
+
.gz-quote__source { color: var(--text-helper) }
|
|
447
|
+
[data-medium="page"][data-family="magazine"] .gz-quote { align-items: center; text-align: center; padding: var(--sp-9) 0 }
|
|
448
|
+
|
|
449
|
+
/* ---------- 流程 process:幻灯片 / 网页横排,卡片竖排 ---------- */
|
|
450
|
+
.gz-process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: var(--sp-7) }
|
|
451
|
+
.gz-process__step { display: flex; flex-direction: column; gap: var(--sp-4); border-top: var(--rule-strong); padding-top: var(--sp-5); min-width: 0 }
|
|
452
|
+
.gz-process__nb { color: var(--accent-ink) }
|
|
453
|
+
.gz-process__title { margin: 0 }
|
|
454
|
+
.gz-process__desc { margin: 0; color: var(--text-secondary) }
|
|
455
|
+
[data-medium="card"] .gz-process { grid-template-columns: 1fr; gap: 0; border-bottom: var(--rule) }
|
|
456
|
+
[data-medium="card"] .gz-process__step { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: var(--sp-6); row-gap: var(--sp-3); padding: var(--sp-7) 0 }
|
|
457
|
+
[data-medium="card"] .gz-process__step + .gz-process__step { border-top: var(--rule) }
|
|
458
|
+
[data-medium="card"] .gz-process__nb { grid-row: span 2 }
|
|
459
|
+
[data-medium="page"] .gz-process { --n: 2; row-gap: var(--sp-8) }
|
|
460
|
+
|
|
461
|
+
/* ---------- 对比 compare:左右分栏,卡片上下叠 ---------- */
|
|
462
|
+
.gz-compare { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); gap: 0 var(--sp-9) }
|
|
463
|
+
.gz-compare__rule { background: var(--line-strong) }
|
|
464
|
+
.gz-compare__side { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0 }
|
|
465
|
+
.gz-compare__tag { color: var(--text-helper) }
|
|
466
|
+
.gz-compare__side[data-side="after"] .gz-compare__tag { color: var(--accent-ink) }
|
|
467
|
+
.gz-compare__title { margin: 0 }
|
|
468
|
+
.gz-compare__side[data-side="before"] .gz-compare__title { color: var(--text-secondary) }
|
|
469
|
+
.gz-compare__desc { margin: 0; color: var(--text-secondary) }
|
|
470
|
+
.gz-compare__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); color: var(--text-body) }
|
|
471
|
+
.gz-compare__list li { padding-left: 1.2em; position: relative }
|
|
472
|
+
.gz-compare__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: .5em; border-top: 1px solid currentColor }
|
|
473
|
+
[data-family="swiss"] .gz-compare__side[data-side="after"][data-surface] { padding: var(--sp-8) }
|
|
474
|
+
[data-medium="card"] .gz-compare { grid-template-columns: 1fr; gap: var(--sp-8) 0 }
|
|
475
|
+
[data-medium="card"] .gz-compare__rule { height: 1px }
|
|
476
|
+
|
|
477
|
+
/* ---------- 图框 figure:照片 cover 裁切,截图 contain 放在底台上 ---------- */
|
|
478
|
+
.gz-figure { margin: 0; display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0 }
|
|
479
|
+
.gz-figure__well { position: relative; aspect-ratio: var(--ratio, 16 / 10); overflow: hidden; background: var(--paper-2) }
|
|
480
|
+
.gz-figure__well > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--img-pos) }
|
|
481
|
+
.gz-figure[data-ratio="16x9"] { --ratio: 16 / 9 } .gz-figure[data-ratio="16x10"] { --ratio: 16 / 10 } .gz-figure[data-ratio="4x3"] { --ratio: 4 / 3 }
|
|
482
|
+
.gz-figure[data-ratio="3x2"] { --ratio: 3 / 2 } .gz-figure[data-ratio="1x1"] { --ratio: 1 } .gz-figure[data-ratio="3x4"] { --ratio: 3 / 4 } .gz-figure[data-ratio="21x9"] { --ratio: 21 / 9 }
|
|
483
|
+
.gz-figure[data-kind="screenshot"] .gz-figure__well { display: flex; align-items: center; justify-content: center; padding: var(--inset, var(--sp-8)) }
|
|
484
|
+
.gz-figure[data-kind="screenshot"] .gz-figure__well > img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px var(--line) }
|
|
485
|
+
[data-family="magazine"] .gz-figure[data-kind="screenshot"] .gz-figure__well > img { box-shadow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(var(--ink-rgb), .45) }
|
|
486
|
+
[data-family="swiss"] .gz-figure[data-kind="screenshot"] .gz-figure__well { background: var(--grey-1); border-top: 3px solid var(--accent) }
|
|
487
|
+
[data-family="swiss"] .gz-figure[data-kind="screenshot"] .gz-figure__well > img { border-radius: 0 }
|
|
488
|
+
.gz-figure__cap { color: var(--text-helper); display: flex; gap: var(--sp-4) }
|
|
489
|
+
.gz-figure__idx { color: var(--accent-ink); flex: none }
|
|
490
|
+
|
|
491
|
+
/* ---------- 图片网格 gallery ---------- */
|
|
492
|
+
.gz-gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--sp-7) var(--sp-6) }
|
|
493
|
+
[data-medium="card"] .gz-gallery { --cols: 2 }
|
|
494
|
+
[data-medium="card"] .gz-gallery[data-count="3"] > :first-child { grid-column: 1 / -1; --ratio: 16 / 9 }
|
|
495
|
+
|
|
496
|
+
/* ---------- 条目清单 ledger ---------- */
|
|
497
|
+
.gz-ledger { list-style: none; margin: 0; padding: 0; border-top: var(--rule-strong) }
|
|
498
|
+
.gz-ledger__row { display: grid; grid-template-columns: var(--nb-w, 3.2em) minmax(0, 1fr) auto; column-gap: var(--sp-6); align-items: baseline; padding: var(--sp-6) 0; border-bottom: var(--rule) }
|
|
499
|
+
.gz-ledger__nb { color: var(--accent-ink) }
|
|
500
|
+
.gz-ledger__title { margin: 0 }
|
|
501
|
+
.gz-ledger__note { margin: var(--sp-2) 0 0; color: var(--text-secondary) }
|
|
502
|
+
.gz-ledger__value { color: var(--text-helper); text-align: right; white-space: nowrap }
|
|
503
|
+
[data-medium="card"] .gz-ledger__row { --nb-w: 72px; padding: var(--sp-7) 0 }
|
|
504
|
+
|
|
505
|
+
/* 歸藏设计系统 · 纹理与特效图层(纯 CSS,颜色全部来自 token)
|
|
506
|
+
* 来源:PPT 瑞士风 .dots / .dot-mat / .ring-mat / .cross-mat / .hatch,卡片杂志风 .grain / .paper-wash。
|
|
507
|
+
*/
|
|
508
|
+
|
|
509
|
+
/* 特效画布:铺满父容器、在内容下面、不挡点击。父容器需要 position: relative */
|
|
510
|
+
.gz-effect { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 0 }
|
|
511
|
+
.gz-layer-content { position: relative; z-index: 1 }
|
|
512
|
+
|
|
513
|
+
/* 点阵:前景色画点,跟随所在表面的文字色 */
|
|
514
|
+
.gz-dots { background-image: radial-gradient(currentColor 1px, transparent 1.2px); background-size: 12px 12px; opacity: .18 }
|
|
515
|
+
.gz-dots-fine { background-image: radial-gradient(currentColor .8px, transparent 1px); background-size: 8px 8px; opacity: .14 }
|
|
516
|
+
.gz-dots-bold { background-image: radial-gradient(currentColor 1.4px, transparent 1.6px); background-size: 18px 18px; opacity: .22 }
|
|
517
|
+
|
|
518
|
+
.gz-dot-mat { --mat: 14px; background-image: radial-gradient(currentColor 1.4px, transparent 1.6px); background-size: var(--mat) var(--mat); opacity: .5 }
|
|
519
|
+
.gz-dot-mat.is-lg { --mat: 22px } .gz-dot-mat.is-xl { --mat: 34px }
|
|
520
|
+
.gz-dot-mat.is-dense{ --mat: 9px; opacity: .62 }
|
|
521
|
+
.gz-ring-mat { --mat: 18px; background-image: radial-gradient(circle, transparent 2px, currentColor 2px, currentColor 2.7px, transparent 2.9px); background-size: var(--mat) var(--mat); opacity: .55 }
|
|
522
|
+
.gz-ring-mat.is-lg { --mat: 28px }
|
|
523
|
+
.gz-cross-mat { --mat: 22px; background: currentColor; opacity: .42;
|
|
524
|
+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M8 8l6 6M14 8l-6 6' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") 0 0 / var(--mat) var(--mat);
|
|
525
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M8 8l6 6M14 8l-6 6' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") 0 0 / var(--mat) var(--mat) }
|
|
526
|
+
.gz-cross-mat.is-lg { --mat: 32px }
|
|
527
|
+
.gz-hatch { background-image: repeating-linear-gradient(135deg, currentColor 0 1px, transparent 1px 8px); opacity: .55 }
|
|
528
|
+
|
|
529
|
+
/* 纸张颗粒与墨色晕染:杂志风卡片的「氛围层」,叠在特效画布上、内容下 */
|
|
530
|
+
.gz-grain { position: absolute; inset: 0; pointer-events: none; z-index: 0; mix-blend-mode: multiply; opacity: .35;
|
|
531
|
+
background-image: radial-gradient(rgba(0,0,0,.045) 1px, transparent 1px); background-size: 3px 3px }
|
|
532
|
+
[data-scheme="dark"] .gz-grain, .gz-grain.is-dark { mix-blend-mode: screen; opacity: .26; background-image: radial-gradient(rgba(255,244,214,.10) 1px, transparent 1px) }
|
|
533
|
+
.gz-paper-wash { position: absolute; inset: 0; pointer-events: none; z-index: 0;
|
|
534
|
+
background: linear-gradient(180deg, rgba(var(--ink-rgb), .02), rgba(var(--ink-rgb), .05) 60%, rgba(var(--ink-rgb), .08)) }
|
|
535
|
+
.gz-ink-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 0;
|
|
536
|
+
background: radial-gradient(circle at 18% 12%, rgba(var(--ink-rgb), .10), transparent 34%), radial-gradient(circle at 82% 80%, rgba(var(--accent-rgb), .10), transparent 38%) }
|
|
537
|
+
|
|
538
|
+
/* PPT 杂志风:WebGL 背景上的纸 / 墨蒙版,保证文字可读(原 .slide.light/.dark::before) */
|
|
539
|
+
.gz-veil { position: absolute; inset: 0; pointer-events: none; z-index: 0; backdrop-filter: blur(3px); background: rgba(var(--paper-rgb), .78) }
|
|
540
|
+
.gz-veil.is-ink{ background: rgba(var(--ink-rgb), .78) }
|
|
541
|
+
.gz-veil.is-hero { backdrop-filter: none; background: rgba(var(--paper-rgb), .16) }
|
|
542
|
+
.gz-veil.is-hero.is-ink { background: rgba(var(--ink-rgb), .12) }
|
|
543
|
+
|
|
544
|
+
@media (prefers-reduced-motion: reduce) { .gz-effect { animation: none } }
|
|
545
|
+
|
|
546
|
+
/* 旧变量名别名(迁移期保留) */
|
|
547
|
+
:root{--mono:var(--font-mono);--serif-en:var(--font-display);--serif-body-en:var(--font-serif);--serif-zh:var(--font-serif-zh);--sans-zh:var(--font-sans);--paper-tint:var(--paper-2);--ink-tint:var(--text-body);--nav-safe-bottom:var(--canvas-safe-bottom)}
|
|
548
|
+
/* 模板自己的反色块 → 设计系统反色表面 */
|
|
549
|
+
.slide.dark{--text-primary: var(--paper);--text-body: rgba(var(--paper-rgb), .86);--text-secondary: rgba(var(--paper-rgb), .72);--text-helper: rgba(var(--paper-rgb), .62);--line: rgba(var(--paper-rgb), .22);--line-strong: rgba(var(--paper-rgb), .45);--accent-ink: var(--accent-ink-inverse);--accent-display: var(--accent-ink-inverse);--rule-strong: 2px solid var(--paper)}
|
|
550
|
+
/* GZ:TOKENS:END */
|
|
30
551
|
*{box-sizing:border-box;margin:0;padding:0}
|
|
31
552
|
html,body{width:100%;height:100%;overflow:hidden;background:var(--ink);color:var(--paper);font-family:var(--sans-zh);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
|
|
32
553
|
|
|
554
|
+
/* ============ 底部分页安全区(与瑞士风同名同值)============ */
|
|
555
|
+
.nav-safe-bottom{padding-bottom:var(--nav-safe-bottom)}
|
|
556
|
+
.nav-safe-bottom-tight{padding-bottom:calc(var(--nav-safe-bottom) * .65)}
|
|
557
|
+
|
|
33
558
|
/* ============ WebGL 双背景 ============ */
|
|
34
559
|
canvas.bg{position:fixed;inset:0;width:100vw;height:100vh;z-index:0;display:block;transition:opacity 1.2s ease}
|
|
35
560
|
canvas#bg-light{opacity:0}
|
|
36
561
|
canvas#bg-dark{opacity:1}
|
|
37
562
|
body.light-bg canvas#bg-light{opacity:1}
|
|
38
563
|
body.light-bg canvas#bg-dark{opacity:0}
|
|
39
|
-
|
|
564
|
+
/* 低功耗:背景停在一帧静态画面(gz-effects 只画一次),不隐藏,否则透明页会露出底色 */
|
|
40
565
|
|
|
41
566
|
/* ============ Deck 容器 + 翻页 ============ */
|
|
42
567
|
/* width: NSLIDES * 100vw,会在 JS 里动态矫正 */
|
|
@@ -44,6 +569,9 @@
|
|
|
44
569
|
.slide{width:100vw;height:100vh;flex:0 0 100vw;position:relative;padding:6vh 6vw 10vh 6vw;display:flex;flex-direction:column;overflow:hidden}
|
|
45
570
|
.slide.light{color:var(--ink);background:var(--paper)}
|
|
46
571
|
.slide.dark{color:var(--paper);background:var(--ink)}
|
|
572
|
+
/* 播放中的页面透明,让 WebGL 背景透过 ::before 遮罩显示(普通页 .78 + 模糊,hero 页 .12/.16);
|
|
573
|
+
总览、演讲者缩略图里的克隆页不在 #deck 下,保持不透明底色 */
|
|
574
|
+
#deck > .slide.light,#deck > .slide.dark{background:transparent}
|
|
47
575
|
|
|
48
576
|
/* 默认页:遮罩较厚,保证文字可读 */
|
|
49
577
|
.slide::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;transition:background .7s ease}
|
|
@@ -59,13 +587,13 @@
|
|
|
59
587
|
|
|
60
588
|
/* ============ Magazine chrome:顶部 meta + 底部 foot ============
|
|
61
589
|
(v1 布局 + v2 字号在此合并为唯一定义,不要在别处二次定义) */
|
|
62
|
-
.chrome{display:flex;justify-content:space-between;align-items:flex-start;font-family:var(--mono);font-size:max(
|
|
590
|
+
.chrome{display:flex;justify-content:space-between;align-items:flex-start;font-family:var(--mono);font-size:max(min(14px,1.944vh),.78vw);letter-spacing:.2em;text-transform:uppercase;opacity:.62}
|
|
63
591
|
.chrome .left,.chrome .right{display:flex;gap:2.4em;align-items:center}
|
|
64
592
|
.chrome .sep{width:40px;height:1px;background:currentColor;opacity:.4}
|
|
65
|
-
.foot{margin-top:auto;display:flex;justify-content:space-between;align-items:flex-end;font-family:var(--mono);font-size:max(
|
|
66
|
-
.foot .title{font-family:var(--serif-zh);font-weight:400;letter-spacing:.05em;text-transform:none;opacity:.75;font-size:
|
|
593
|
+
.foot{margin-top:auto;display:flex;justify-content:space-between;align-items:flex-end;font-family:var(--mono);font-size:max(min(14px,1.944vh),.78vw);letter-spacing:.18em;text-transform:uppercase;opacity:.5}
|
|
594
|
+
.foot .title{font-family:var(--serif-zh);font-weight:400;letter-spacing:.05em;text-transform:none;opacity:.75;font-size:min(14px,1.944vh)}
|
|
67
595
|
|
|
68
|
-
.tag{display:inline-block;font-family:var(--mono);font-size:
|
|
596
|
+
.tag{display:inline-block;font-family:var(--mono);font-size:min(14px,1.944vh);letter-spacing:.24em;text-transform:uppercase;padding:6px 14px;border:1px solid currentColor;opacity:.85}
|
|
69
597
|
.rule{width:100%;height:1px;background:currentColor;opacity:.25;margin:3vh 0}
|
|
70
598
|
.rule.v{width:1px;height:100%;margin:0}
|
|
71
599
|
|
|
@@ -74,31 +602,31 @@
|
|
|
74
602
|
· 非衬线(Noto Sans SC):正文描述、body、补充说明
|
|
75
603
|
· 等宽(IBM Plex Mono):kicker、meta 小标签、foot 右侧
|
|
76
604
|
*/
|
|
77
|
-
.kicker{font-family:var(--mono);font-size:
|
|
78
|
-
.display{font-family:var(--serif-en);font-weight:700;font-size:11vw;line-height:.92;letter-spacing:-.025em}
|
|
79
|
-
.display-zh{font-family:var(--serif-zh);font-weight:700;font-size:7.8vw;line-height:1.04;letter-spacing:-.005em}
|
|
80
|
-
.h1-zh{font-family:var(--serif-zh);font-weight:700;font-size:4.6vw;line-height:1.12;letter-spacing:-.005em}
|
|
81
|
-
.h2-zh{font-family:var(--serif-zh);font-weight:600;font-size:3.2vw;line-height:1.2;letter-spacing:0}
|
|
82
|
-
.h3-zh{font-family:var(--serif-zh);font-weight:500;font-size:1.9vw;line-height:1.35}
|
|
83
|
-
.body-zh{font-family:var(--sans-zh);font-weight:400;font-size:max(15px,1.22vw);line-height:1.75;opacity:.82;letter-spacing:.01em}
|
|
84
|
-
.body-serif{font-family:var(--serif-zh);font-weight:400;font-size:max(15px,1.3vw);line-height:1.65;opacity:.88}
|
|
85
|
-
.lead{font-family:var(--serif-zh);font-weight:400;font-size:1.75vw;line-height:1.5;opacity:.86}
|
|
86
|
-
.meta{font-family:var(--mono);font-size:max(
|
|
87
|
-
.big-num{font-family:var(--serif-en);font-weight:800;font-size:10vw;line-height:.85;letter-spacing:-.03em;font-feature-settings:"tnum"}
|
|
88
|
-
.mid-num{font-family:var(--serif-en);font-weight:700;font-size:5.5vw;line-height:.88;letter-spacing:-.02em;font-feature-settings:"tnum"}
|
|
89
|
-
.ghost{font-family:var(--serif-en);font-weight:900;font-size:34vw;line-height:.8;opacity:.06;letter-spacing:-.04em;position:absolute;font-feature-settings:"tnum"}
|
|
605
|
+
.kicker{font-family:var(--mono);font-size:min(14px,1.944vh);letter-spacing:.3em;text-transform:uppercase;opacity:.6;margin-bottom:2.6vh}
|
|
606
|
+
.display{font-family:var(--serif-en);font-weight:700;font-size:min(11vw,19.56vh);line-height:.92;letter-spacing:-.025em}
|
|
607
|
+
.display-zh{font-family:var(--serif-zh);font-weight:700;font-size:min(7.8vw,13.87vh);line-height:1.04;letter-spacing:-.005em}
|
|
608
|
+
.h1-zh{font-family:var(--serif-zh);font-weight:700;font-size:min(4.6vw,8.178vh);line-height:1.12;letter-spacing:-.005em}
|
|
609
|
+
.h2-zh{font-family:var(--serif-zh);font-weight:600;font-size:min(3.2vw,5.689vh);line-height:1.2;letter-spacing:0}
|
|
610
|
+
.h3-zh{font-family:var(--serif-zh);font-weight:500;font-size:min(1.9vw,3.378vh);line-height:1.35}
|
|
611
|
+
.body-zh{font-family:var(--sans-zh);font-weight:400;font-size:max(min(15px,2.083vh),min(1.22vw,2.169vh));line-height:1.75;opacity:.82;letter-spacing:.01em}
|
|
612
|
+
.body-serif{font-family:var(--serif-zh);font-weight:400;font-size:max(min(15px,2.083vh),min(1.3vw,2.311vh));line-height:1.65;opacity:.88}
|
|
613
|
+
.lead{font-family:var(--serif-zh);font-weight:400;font-size:min(1.75vw,3.111vh);line-height:1.5;opacity:.86}
|
|
614
|
+
.meta{font-family:var(--mono);font-size:max(min(14px,1.944vh),.88vw);letter-spacing:.16em;text-transform:uppercase;opacity:.6}
|
|
615
|
+
.big-num{font-family:var(--serif-en);font-weight:800;font-size:min(10vw,17.78vh);line-height:.85;letter-spacing:-.03em;font-feature-settings:"tnum"}
|
|
616
|
+
.mid-num{font-family:var(--serif-en);font-weight:700;font-size:min(5.5vw,9.778vh);line-height:.88;letter-spacing:-.02em;font-feature-settings:"tnum"}
|
|
617
|
+
.ghost{font-family:var(--serif-en);font-weight:900;font-size:min(34vw,60.44vh);line-height:.8;opacity:.06;letter-spacing:-.04em;position:absolute;font-feature-settings:"tnum"}
|
|
90
618
|
em{font-style:italic;font-family:var(--serif-en)}
|
|
91
619
|
.en{font-family:var(--serif-en);font-style:italic;font-weight:500}
|
|
92
620
|
|
|
93
621
|
/* ============ 布局工具 ============ */
|
|
94
622
|
.col{display:flex;flex-direction:column;gap:2.4vh}
|
|
95
|
-
.row{display:flex;align-items:center;gap:3vw}
|
|
96
|
-
.grid-6{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);gap:4vw 6vw;flex:1;align-content:center;padding:2vh 0}
|
|
623
|
+
.row{display:flex;align-items:center;gap:min(3vw,5.333vh) 3vw}
|
|
624
|
+
.grid-6{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);gap:min(4vw,7.111vh) 6vw;flex:1;align-content:center;padding:2vh 0}
|
|
97
625
|
.grid-9{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:3vh 4vw;flex:1;align-content:center}
|
|
98
626
|
.grid-4{display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);gap:4vh 6vw;flex:1;align-content:center}
|
|
99
|
-
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:4vw;flex:1;align-content:center}
|
|
100
|
-
.split{display:grid;grid-template-columns:1fr 1fr;gap:4vw;flex:1;align-items:center}
|
|
101
|
-
.split-55{display:grid;grid-template-columns:55fr 45fr;gap:5vw;flex:1;align-items:stretch}
|
|
627
|
+
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:min(4vw,7.111vh) 4vw;flex:1;align-content:center}
|
|
628
|
+
.split{display:grid;grid-template-columns:1fr 1fr;gap:min(4vw,7.111vh) 4vw;flex:1;align-items:center}
|
|
629
|
+
.split-55{display:grid;grid-template-columns:55fr 45fr;gap:min(5vw,8.889vh) 5vw;flex:1;align-items:stretch}
|
|
102
630
|
.fill{flex:1}
|
|
103
631
|
.center{align-items:center;justify-content:center;text-align:center}
|
|
104
632
|
.bottom-left{position:absolute;left:6vw;bottom:9vh;max-width:50vw}
|
|
@@ -107,40 +635,40 @@
|
|
|
107
635
|
|
|
108
636
|
/* ============ Stat(数字矩阵) ============ */
|
|
109
637
|
.stat{display:flex;flex-direction:column;gap:1vh;align-items:flex-start}
|
|
110
|
-
.stat .n{font-family:var(--serif-en);font-weight:800;font-size:8vw;line-height:.88;letter-spacing:-.03em;font-feature-settings:"tnum"}
|
|
111
|
-
.stat .l{font-family:var(--sans-zh);font-size:max(
|
|
112
|
-
.stat .m{font-family:var(--mono);font-size:
|
|
638
|
+
.stat .n{font-family:var(--serif-en);font-weight:800;font-size:min(8vw,14.22vh);line-height:.88;letter-spacing:-.03em;font-feature-settings:"tnum"}
|
|
639
|
+
.stat .l{font-family:var(--sans-zh);font-size:max(min(16px,2.222vh),min(1.05vw,1.867vh));opacity:.7;margin-top:1vh;font-weight:400;line-height:1.5}
|
|
640
|
+
.stat .m{font-family:var(--mono);font-size:min(14px,1.944vh);letter-spacing:.22em;text-transform:uppercase;opacity:.5;margin-bottom:.2vh}
|
|
113
641
|
|
|
114
642
|
/* ============ Callout(引用框) ============ */
|
|
115
|
-
.callout{padding:3vh 2.4vw;border-left:3px solid currentColor;position:relative;font-family:var(--serif-zh);font-size:max(15px,1.2vw);line-height:1.55;opacity:.92}
|
|
643
|
+
.callout{padding:3vh 2.4vw;border-left:3px solid currentColor;position:relative;font-family:var(--serif-zh);font-size:max(min(15px,2.083vh),min(1.2vw,2.133vh));line-height:1.55;opacity:.92}
|
|
116
644
|
.slide.light .callout{background:rgba(var(--ink-rgb),.05)}
|
|
117
645
|
.slide.dark .callout{background:rgba(var(--paper-rgb),.06)}
|
|
118
|
-
.callout .cite{display:block;margin-top:1.6vh;font-family:var(--mono);font-size:
|
|
119
|
-
.callout .q-big{font-family:var(--serif-zh);font-weight:600;font-size:max(17px,1.6vw);line-height:1.42}
|
|
646
|
+
.callout .cite{display:block;margin-top:1.6vh;font-family:var(--mono);font-size:min(14px,1.944vh);letter-spacing:.2em;text-transform:uppercase;opacity:.6}
|
|
647
|
+
.callout .q-big{font-family:var(--serif-zh);font-weight:600;font-size:max(min(17px,2.361vh),min(1.6vw,2.844vh));line-height:1.42}
|
|
120
648
|
|
|
121
649
|
/* ============ Platform(平台卡) ============ */
|
|
122
650
|
.plat{display:flex;flex-direction:column;justify-content:flex-end;padding:2vh 0;border-top:1px solid currentColor;border-color:rgba(127,127,127,.35)}
|
|
123
|
-
.plat .name{font-family:var(--serif-zh);font-weight:700;font-size:1.8vw;margin-bottom:.6vh}
|
|
124
|
-
.plat .nb{font-family:var(--serif-en);font-weight:700;font-size:3.2vw;letter-spacing:-.02em;line-height:1;font-feature-settings:"tnum"}
|
|
125
|
-
.plat .sub{font-family:var(--mono);font-size:
|
|
126
|
-
.plat .fill{font-family:var(--sans-zh);font-weight:300;font-size:2.4vw;opacity:.28;letter-spacing:-.01em;line-height:1}
|
|
651
|
+
.plat .name{font-family:var(--serif-zh);font-weight:700;font-size:min(1.8vw,3.2vh);margin-bottom:.6vh}
|
|
652
|
+
.plat .nb{font-family:var(--serif-en);font-weight:700;font-size:min(3.2vw,5.689vh);letter-spacing:-.02em;line-height:1;font-feature-settings:"tnum"}
|
|
653
|
+
.plat .sub{font-family:var(--mono);font-size:min(14px,1.944vh);letter-spacing:.18em;text-transform:uppercase;opacity:.55;margin-top:.6vh}
|
|
654
|
+
.plat .fill{font-family:var(--sans-zh);font-weight:300;font-size:min(2.4vw,4.267vh);opacity:.28;letter-spacing:-.01em;line-height:1}
|
|
127
655
|
|
|
128
656
|
/* ============ Rowline(表格行) ============ */
|
|
129
|
-
.rowline{display:grid;grid-template-columns:1fr 2fr 1fr;gap:2vw;padding:2.2vh 0;border-top:1px solid currentColor;align-items:center;border-color:rgba(127,127,127,.25)}
|
|
657
|
+
.rowline{display:grid;grid-template-columns:1fr 2fr 1fr;gap:min(2vw,3.556vh) 2vw;padding:2.2vh 0;border-top:1px solid currentColor;align-items:center;border-color:rgba(127,127,127,.25)}
|
|
130
658
|
.rowline:last-child{border-bottom:1px solid currentColor;border-color:rgba(127,127,127,.25)}
|
|
131
|
-
.rowline .k{font-family:var(--serif-zh);font-weight:700;font-size:1.7vw}
|
|
132
|
-
.rowline .v{font-family:var(--sans-zh);font-weight:400;font-size:max(14px,1.2vw);opacity:.85;line-height:1.55}
|
|
133
|
-
.rowline .m{font-family:var(--mono);font-size:
|
|
659
|
+
.rowline .k{font-family:var(--serif-zh);font-weight:700;font-size:min(1.7vw,3.022vh)}
|
|
660
|
+
.rowline .v{font-family:var(--sans-zh);font-weight:400;font-size:max(min(14px,1.944vh),min(1.2vw,2.133vh));opacity:.85;line-height:1.55}
|
|
661
|
+
.rowline .m{font-family:var(--mono);font-size:min(14px,1.944vh);letter-spacing:.2em;text-transform:uppercase;opacity:.6;justify-self:end}
|
|
134
662
|
|
|
135
663
|
/* ============ Pillar(支柱卡片) ============ */
|
|
136
664
|
.pillar{display:flex;flex-direction:column;gap:1.8vh}
|
|
137
|
-
.pillar .ic{font-family:var(--serif-en);font-style:italic;font-size:2.6vw;opacity:.45;font-weight:400}
|
|
665
|
+
.pillar .ic{font-family:var(--serif-en);font-style:italic;font-size:min(2.6vw,4.622vh);opacity:.45;font-weight:400}
|
|
138
666
|
.pillar .ic svg{width:2.8vw;height:2.8vw;stroke-width:1.2;opacity:.7}
|
|
139
|
-
.pillar .t{font-family:var(--serif-zh);font-weight:700;font-size:2.4vw;line-height:1.1}
|
|
140
|
-
.pillar .d{font-family:var(--sans-zh);font-weight:400;font-size:max(14px,1.1vw);opacity:.76;line-height:1.6}
|
|
667
|
+
.pillar .t{font-family:var(--serif-zh);font-weight:700;font-size:min(2.4vw,4.267vh);line-height:1.1}
|
|
668
|
+
.pillar .d{font-family:var(--sans-zh);font-weight:400;font-size:max(min(14px,1.944vh),min(1.1vw,1.956vh));opacity:.76;line-height:1.6}
|
|
141
669
|
|
|
142
670
|
/* ============ Signature / Highlight ============ */
|
|
143
|
-
.sign{font-family:var(--serif-en);font-style:italic;font-weight:500;font-size:2vw;opacity:.7}
|
|
671
|
+
.sign{font-family:var(--serif-en);font-style:italic;font-weight:500;font-size:min(2vw,3.556vh);opacity:.7}
|
|
144
672
|
.hi{position:relative;display:inline}
|
|
145
673
|
.slide.dark .hi::after{content:"";position:absolute;left:-.1em;right:-.1em;bottom:-.05em;height:.28em;background:rgba(var(--paper-rgb),.15);z-index:-1}
|
|
146
674
|
.slide.light .hi::after{content:"";position:absolute;left:-.1em;right:-.1em;bottom:-.05em;height:.28em;background:rgba(var(--ink-rgb),.08);z-index:-1}
|
|
@@ -153,9 +681,9 @@
|
|
|
153
681
|
.ico-sm{width:1.1vw;height:1.1vw;stroke-width:1.4;display:inline-block;vertical-align:-.15em;opacity:.7}
|
|
154
682
|
|
|
155
683
|
/* ============ 图片占位(虚线框,提示设计师位置) ============ */
|
|
156
|
-
.img-slot{border:1.5px dashed rgba(127,127,127,.4);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1vh;padding:2vh 2vw;font-family:var(--mono);font-size:
|
|
684
|
+
.img-slot{border:1.5px dashed rgba(127,127,127,.4);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1vh;padding:2vh 2vw;font-family:var(--mono);font-size:min(14px,1.944vh);letter-spacing:.28em;text-transform:uppercase;opacity:.55;position:relative;aspect-ratio:16/9;width:100%;max-height:56vh;margin-inline:auto;box-sizing:border-box}
|
|
157
685
|
.img-slot::before{content:"";position:absolute;inset:8px;border:1px solid currentColor;opacity:.2}
|
|
158
|
-
.img-slot .plus{font-size:2vw;font-weight:300;opacity:.5;letter-spacing:0}
|
|
686
|
+
.img-slot .plus{font-size:min(2vw,3.556vh);font-weight:300;opacity:.5;letter-spacing:0}
|
|
159
687
|
.img-slot .label{position:relative;z-index:2;text-align:center}
|
|
160
688
|
.img-slot.r-4x3{aspect-ratio:4/3}
|
|
161
689
|
.img-slot.r-3x2{aspect-ratio:3/2}
|
|
@@ -180,9 +708,9 @@
|
|
|
180
708
|
.frame-img.h-22{height:22vh}
|
|
181
709
|
.frame-img.h-26{height:26vh}
|
|
182
710
|
.frame-img.h-28{height:28vh}
|
|
183
|
-
.frame-cap{display:flex;justify-content:space-between;align-items:baseline;gap:1vw;margin-top:.8vh;font-family:var(--mono);font-size:
|
|
184
|
-
.frame-cap .pf{font-family:var(--serif-zh);font-weight:600;font-size:max(
|
|
185
|
-
.frame-cap .nb{font-family:var(--serif-en);font-style:italic;font-size:max(15px,1.2vw);letter-spacing:.02em;text-transform:none;opacity:.88}
|
|
711
|
+
.frame-cap{display:flex;justify-content:space-between;align-items:baseline;gap:min(1vw,1.778vh) 1vw;margin-top:.8vh;font-family:var(--mono);font-size:min(14px,1.944vh);letter-spacing:.22em;text-transform:uppercase;opacity:.72}
|
|
712
|
+
.frame-cap .pf{font-family:var(--serif-zh);font-weight:600;font-size:max(min(14px,1.944vh),min(1vw,1.778vh));letter-spacing:.04em;text-transform:none;opacity:.94}
|
|
713
|
+
.frame-cap .nb{font-family:var(--serif-en);font-style:italic;font-size:max(min(15px,2.083vh),min(1.2vw,2.133vh));letter-spacing:.02em;text-transform:none;opacity:.88}
|
|
186
714
|
.frame-cap .idx{font-family:var(--mono);opacity:.5}
|
|
187
715
|
figure.tile{display:flex;flex-direction:column;margin:0;min-width:0}
|
|
188
716
|
figure.tile > .frame-img{flex:0 0 auto}
|
|
@@ -242,7 +770,7 @@
|
|
|
242
770
|
#overview{z-index:110!important}
|
|
243
771
|
@media(max-width:1200px){.ppt-presenter-main{grid-template-columns:minmax(0,1.55fr) minmax(280px,.72fr)}}
|
|
244
772
|
@media(max-width:1100px){.ppt-presenter-bottom{grid-template-columns:minmax(292px,1fr) auto minmax(86px,.6fr);gap:12px}.ppt-time-stat{min-width:82px;padding:0 11px}.ppt-time-value{font-size:20px}.ppt-controls .ppt-ui-btn,.ppt-session-actions .ppt-ui-btn{min-width:60px;padding:8px 9px}}
|
|
245
|
-
@media(max-width:900px){.ppt-presenter-top{padding:12px 16px;flex-wrap:wrap}.ppt-presenter-top .ppt-presenter-meta{gap:6px}.ppt-presenter-top .ppt-ui-btn{padding:8px 9px}.ppt-presenter-main,#ppt-presenter[data-layout="slides"] .ppt-presenter-main,#ppt-presenter[data-layout="notes"] .ppt-presenter-main{grid-template-columns:minmax(0,1.45fr) minmax(250px,.72fr);gap:12px;padding:12px 16px}.ppt-preview-stack{gap:12px;grid-template-rows:minmax(0,1fr) clamp(104px,20vh,150px)}.ppt-saved{display:none}.ppt-presenter-bottom{grid-template-columns:minmax(270px,1fr) auto 74px;gap:8px;padding:9px 16px}.ppt-time-stat{min-width:0;padding:0 9px}.ppt-time-value{font-size:18px}.ppt-time-hint{max-width:78px;overflow:hidden;text-overflow:ellipsis}.ppt-controls,.ppt-session-actions{gap:5px}.ppt-controls .ppt-ui-btn,.ppt-session-actions .ppt-ui-btn{min-width:52px;padding:7px 8px;font-size:12px}.ppt-page-state strong{font-size:14px}.ppt-dialog-grid{grid-template-columns:1fr}.ppt-segmented.screen{grid-template-columns:repeat(2,1fr)}}
|
|
773
|
+
@media(max-width:900px){.ppt-presenter-top{padding:12px 16px;flex-wrap:wrap}.ppt-presenter-top .ppt-presenter-meta{gap:6px}.ppt-presenter-top .ppt-ui-btn{padding:8px 9px}.ppt-presenter-main,#ppt-presenter[data-layout="slides"] .ppt-presenter-main,#ppt-presenter[data-layout="notes"] .ppt-presenter-main{grid-template-columns:minmax(0,1.45fr) minmax(250px,.72fr);gap:12px;padding:12px 16px}.ppt-preview-stack{gap:12px;grid-template-rows:minmax(0,1fr) clamp(104px,20vh,150px)}.ppt-saved{display:none}.ppt-presenter-bottom{grid-template-columns:minmax(270px,1fr) auto 74px;gap:8px;padding:9px 16px}.ppt-time-stat{min-width:0;padding:0 9px}.ppt-time-value{font-size:min(18px,2.5vh)}.ppt-time-hint{max-width:78px;overflow:hidden;text-overflow:ellipsis}.ppt-controls,.ppt-session-actions{gap:5px}.ppt-controls .ppt-ui-btn,.ppt-session-actions .ppt-ui-btn{min-width:52px;padding:7px 8px;font-size:min(12px,1.667vh)}.ppt-page-state strong{font-size:min(14px,1.944vh)}.ppt-dialog-grid{grid-template-columns:1fr}.ppt-segmented.screen{grid-template-columns:repeat(2,1fr)}}
|
|
246
774
|
@media(max-height:700px){.ppt-presenter-top{padding-top:10px;padding-bottom:10px}.ppt-presenter-main{padding-top:10px;padding-bottom:10px}.ppt-preview-stack{grid-template-rows:minmax(0,1fr) clamp(88px,16vh,118px);gap:10px}.ppt-stage-label{padding:7px 10px}.ppt-notes-head{padding:12px 14px}.ppt-purpose-block{margin-top:10px;padding:8px 10px}.ppt-notes-draft-head{margin-top:10px;padding-top:9px}.ppt-presenter-bottom{padding-top:8px;padding-bottom:8px}.ppt-control-stack{gap:5px}.ppt-session-actions{padding-top:5px}}
|
|
247
775
|
/* ============ /演讲者模式 ============ */
|
|
248
776
|
|
|
@@ -265,21 +793,21 @@
|
|
|
265
793
|
.h-hero{
|
|
266
794
|
font-family:var(--serif-zh);
|
|
267
795
|
font-weight:900;
|
|
268
|
-
font-size:10vw;
|
|
796
|
+
font-size:min(10vw,17.78vh);
|
|
269
797
|
line-height:.96;
|
|
270
798
|
letter-spacing:-.02em;
|
|
271
799
|
}
|
|
272
800
|
.h-xl{
|
|
273
801
|
font-family:var(--serif-zh);
|
|
274
802
|
font-weight:700;
|
|
275
|
-
font-size:6.2vw;
|
|
803
|
+
font-size:min(6.2vw,11.02vh);
|
|
276
804
|
line-height:1.08;
|
|
277
805
|
letter-spacing:-.01em;
|
|
278
806
|
}
|
|
279
807
|
.h-sub{
|
|
280
808
|
font-family:var(--serif-zh);
|
|
281
809
|
font-weight:500;
|
|
282
|
-
font-size:3.1vw;
|
|
810
|
+
font-size:min(3.1vw,5.511vh);
|
|
283
811
|
line-height:1.25;
|
|
284
812
|
letter-spacing:0;
|
|
285
813
|
opacity:.7;
|
|
@@ -287,7 +815,7 @@
|
|
|
287
815
|
.h-md{
|
|
288
816
|
font-family:var(--serif-zh);
|
|
289
817
|
font-weight:600;
|
|
290
|
-
font-size:2.3vw;
|
|
818
|
+
font-size:min(2.3vw,4.089vh);
|
|
291
819
|
line-height:1.3;
|
|
292
820
|
}
|
|
293
821
|
/* 英文标题专用(Playfair 衬线) */
|
|
@@ -302,7 +830,7 @@
|
|
|
302
830
|
align-items:baseline;
|
|
303
831
|
flex-wrap:wrap;
|
|
304
832
|
font-family:var(--mono);
|
|
305
|
-
font-size:max(
|
|
833
|
+
font-size:max(min(14px,1.944vh),.92vw);
|
|
306
834
|
letter-spacing:.16em;
|
|
307
835
|
text-transform:uppercase;
|
|
308
836
|
opacity:.6;
|
|
@@ -320,7 +848,7 @@
|
|
|
320
848
|
}
|
|
321
849
|
.stat-card .stat-label{
|
|
322
850
|
font-family:var(--mono);
|
|
323
|
-
font-size:max(
|
|
851
|
+
font-size:max(min(14px,1.944vh),.78vw);
|
|
324
852
|
letter-spacing:.24em;
|
|
325
853
|
text-transform:uppercase;
|
|
326
854
|
opacity:.55;
|
|
@@ -328,7 +856,7 @@
|
|
|
328
856
|
.stat-card .stat-nb{
|
|
329
857
|
font-family:var(--serif-en);
|
|
330
858
|
font-weight:800;
|
|
331
|
-
font-size:5.8vw;
|
|
859
|
+
font-size:min(5.8vw,10.31vh);
|
|
332
860
|
line-height:.9;
|
|
333
861
|
letter-spacing:-.03em;
|
|
334
862
|
font-feature-settings:"tnum";
|
|
@@ -345,15 +873,15 @@
|
|
|
345
873
|
.stat-card .stat-note{
|
|
346
874
|
font-family:var(--sans-zh);
|
|
347
875
|
font-weight:400;
|
|
348
|
-
font-size:max(
|
|
876
|
+
font-size:max(min(16px,2.222vh),min(1.05vw,1.867vh));
|
|
349
877
|
line-height:1.5;
|
|
350
878
|
opacity:.72;
|
|
351
879
|
margin-top:.6vh;
|
|
352
880
|
}
|
|
353
881
|
/* 当 stat-card 用于 grid-4(2x2),数字适度放大;若页面有标题+引文在上方,可内联 style 覆盖为更小值 */
|
|
354
|
-
.grid-4 .stat-card .stat-nb{font-size:5vw}
|
|
882
|
+
.grid-4 .stat-card .stat-nb{font-size:min(5vw,8.889vh)}
|
|
355
883
|
/* 当只有 3 个,字也可以稍大 */
|
|
356
|
-
.grid-3 .stat-card .stat-nb{font-size:6.8vw}
|
|
884
|
+
.grid-3 .stat-card .stat-nb{font-size:min(6.8vw,12.09vh)}
|
|
357
885
|
|
|
358
886
|
/* ---------- pipeline(流水线) ---------- */
|
|
359
887
|
.pipeline-section{
|
|
@@ -368,7 +896,7 @@
|
|
|
368
896
|
}
|
|
369
897
|
.pipeline-label{
|
|
370
898
|
font-family:var(--mono);
|
|
371
|
-
font-size:max(
|
|
899
|
+
font-size:max(min(14px,1.944vh),.85vw);
|
|
372
900
|
letter-spacing:.24em;
|
|
373
901
|
text-transform:uppercase;
|
|
374
902
|
opacity:.62;
|
|
@@ -377,7 +905,7 @@
|
|
|
377
905
|
.pipeline{
|
|
378
906
|
display:grid;
|
|
379
907
|
grid-template-columns:repeat(5,1fr);
|
|
380
|
-
gap:1.2vw;
|
|
908
|
+
gap:min(1.2vw,2.133vh) 1.2vw;
|
|
381
909
|
}
|
|
382
910
|
.pipeline[data-cols="3"]{grid-template-columns:repeat(3,1fr)}
|
|
383
911
|
.pipeline[data-cols="4"]{grid-template-columns:repeat(4,1fr)}
|
|
@@ -394,29 +922,29 @@
|
|
|
394
922
|
font-family:var(--serif-en);
|
|
395
923
|
font-style:italic;
|
|
396
924
|
font-weight:500;
|
|
397
|
-
font-size:1.15vw;
|
|
925
|
+
font-size:min(1.15vw,2.044vh);
|
|
398
926
|
opacity:.45;
|
|
399
927
|
}
|
|
400
928
|
.step-title{
|
|
401
929
|
font-family:var(--sans-zh);
|
|
402
930
|
font-weight:700;
|
|
403
|
-
font-size:1.55vw;
|
|
931
|
+
font-size:min(1.55vw,2.756vh);
|
|
404
932
|
letter-spacing:.01em;
|
|
405
933
|
line-height:1.2;
|
|
406
934
|
}
|
|
407
935
|
.step-desc{
|
|
408
936
|
font-family:var(--sans-zh);
|
|
409
937
|
font-weight:400;
|
|
410
|
-
font-size:max(
|
|
938
|
+
font-size:max(min(16px,2.222vh),.95vw);
|
|
411
939
|
line-height:1.45;
|
|
412
940
|
opacity:.72;
|
|
413
941
|
}
|
|
414
942
|
|
|
415
943
|
/* ---------- 网格(layouts.md 所用) ---------- */
|
|
416
944
|
/* 这些类独立挂到任何容器上都能生效,不依赖 .frame 复合选择器 */
|
|
417
|
-
.grid-2-7-5{display:grid;grid-template-columns:7fr 5fr;gap:3vw 4vh;align-items:start}
|
|
418
|
-
.grid-2-6-6{display:grid;grid-template-columns:1fr 1fr;gap:3vw 4vh;align-items:start}
|
|
419
|
-
.grid-2-8-4{display:grid;grid-template-columns:8fr 4fr;gap:3vw 4vh;align-items:start}
|
|
945
|
+
.grid-2-7-5{display:grid;grid-template-columns:7fr 5fr;gap:min(3vw,5.333vh) 4vh;align-items:start}
|
|
946
|
+
.grid-2-6-6{display:grid;grid-template-columns:1fr 1fr;gap:min(3vw,5.333vh) 4vh;align-items:start}
|
|
947
|
+
.grid-2-8-4{display:grid;grid-template-columns:8fr 4fr;gap:min(3vw,5.333vh) 4vh;align-items:start}
|
|
420
948
|
.grid-3-3{
|
|
421
949
|
display:grid;
|
|
422
950
|
grid-template-columns:repeat(3,1fr);
|
|
@@ -436,7 +964,7 @@
|
|
|
436
964
|
flex:0 0 auto;
|
|
437
965
|
padding:.7vh .9em .9vh;
|
|
438
966
|
font-family:var(--mono);
|
|
439
|
-
font-size:max(
|
|
967
|
+
font-size:max(min(14px,1.944vh),.8vw);
|
|
440
968
|
letter-spacing:.22em;
|
|
441
969
|
text-transform:uppercase;
|
|
442
970
|
opacity:.6;
|
|
@@ -446,7 +974,7 @@
|
|
|
446
974
|
display:block;
|
|
447
975
|
margin-top:1.6vh;
|
|
448
976
|
font-family:var(--mono);
|
|
449
|
-
font-size:
|
|
977
|
+
font-size:min(14px,1.944vh);
|
|
450
978
|
letter-spacing:.2em;
|
|
451
979
|
text-transform:uppercase;
|
|
452
980
|
opacity:.6;
|
|
@@ -480,11 +1008,11 @@
|
|
|
480
1008
|
|
|
481
1009
|
/* ---------- 响应式降级 ---------- */
|
|
482
1010
|
@media (max-width:900px){
|
|
483
|
-
.display{font-size:16vw}
|
|
484
|
-
.display-zh{font-size:12vw}
|
|
485
|
-
.h1-zh{font-size:7vw}
|
|
486
|
-
.h-hero{font-size:14vw}
|
|
487
|
-
.h-xl{font-size:9vw}
|
|
1011
|
+
.display{font-size:min(16vw,28.44vh)}
|
|
1012
|
+
.display-zh{font-size:min(12vw,21.33vh)}
|
|
1013
|
+
.h1-zh{font-size:min(7vw,12.44vh)}
|
|
1014
|
+
.h-hero{font-size:min(14vw,24.89vh)}
|
|
1015
|
+
.h-xl{font-size:min(9vw,16vh)}
|
|
488
1016
|
.pipeline{grid-template-columns:repeat(2,1fr)}
|
|
489
1017
|
.grid-2-7-5,.grid-2-6-6,.grid-2-8-4{grid-template-columns:1fr}
|
|
490
1018
|
}
|
|
@@ -517,8 +1045,8 @@
|
|
|
517
1045
|
})();
|
|
518
1046
|
</script>
|
|
519
1047
|
|
|
520
|
-
<canvas id="bg-dark" class="bg"></canvas>
|
|
521
|
-
<canvas id="bg-light" class="bg"></canvas>
|
|
1048
|
+
<canvas id="bg-dark" class="bg" data-gz-effect="dispersion"></canvas>
|
|
1049
|
+
<canvas id="bg-light" class="bg" data-gz-effect="vortex"></canvas>
|
|
522
1050
|
<div id="hint" role="toolbar" aria-label="快捷控制">
|
|
523
1051
|
<span>← → 翻页</span><span class="ppt-sep">·</span>
|
|
524
1052
|
<button id="ppt-low-power-btn" type="button"><span class="ppt-key">B</span><span class="ppt-low-power-label">静态</span></button><span class="ppt-sep">·</span>
|
|
@@ -530,7 +1058,7 @@
|
|
|
530
1058
|
|
|
531
1059
|
<!-- ============================================================
|
|
532
1060
|
SLIDES 插入区 · 在此处填充所有 <section class="slide ..."> 页面
|
|
533
|
-
每页模板参考 references/
|
|
1061
|
+
每页模板参考 references/layouts.md
|
|
534
1062
|
页面组件参考 references/components.md
|
|
535
1063
|
============================================================ -->
|
|
536
1064
|
|
|
@@ -556,133 +1084,370 @@ window.__SPEAKER_NOTES__ = SPEAKER_NOTES;
|
|
|
556
1084
|
</script>
|
|
557
1085
|
|
|
558
1086
|
<script>
|
|
559
|
-
/*
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
return
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
function
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
1087
|
+
/* GZ:EFFECTS:START · guizang-design 特效运行时,不要手改;运行 scripts/sync-skill.mjs 更新 */
|
|
1088
|
+
/* 歸藏设计系统 · 特效运行时(无依赖,可直接内联进单文件 HTML)
|
|
1089
|
+
*
|
|
1090
|
+
* 用法:<canvas class="gz-effect" data-gz-effect="vortex" data-strength=".3" data-frozen="12.5"></canvas>
|
|
1091
|
+
* 页面加载后自动挂载;也可以 GZEffects.mount(canvas, { effect, strength, frozen, colors })。
|
|
1092
|
+
*
|
|
1093
|
+
* 特效:
|
|
1094
|
+
* dispersion 全息色散(PPT 杂志风深色页)
|
|
1095
|
+
* vortex 银色涡流(PPT 杂志风浅色页)
|
|
1096
|
+
* grid 漂移网格 + 点阵(PPT 瑞士风)
|
|
1097
|
+
* inkflow 墨流等高线(图文卡片杂志风,带透明度,叠在纸色上)
|
|
1098
|
+
* ascii ASCII 呼吸场(瑞士风封面 / 封底的强调色块)
|
|
1099
|
+
*
|
|
1100
|
+
* 统一行为:
|
|
1101
|
+
* - 一个 requestAnimationFrame 循环驱动全部特效,不在视口里的不画
|
|
1102
|
+
* - 动效开关:localStorage gz-motion、系统「减少动态效果」、<html data-motion="off">;
|
|
1103
|
+
* 关闭时停在一帧静态画面,不留空白。兼容旧事件 ppt-low-power-change / swiss-low-power-change
|
|
1104
|
+
* - data-frozen 把时间定格:卡片出 PNG 时每次渲染结果一致。GZEffects.ready 在首帧画完后 resolve
|
|
1105
|
+
* - 颜色从 canvas 所在位置的 token 读(--ink-rgb / --paper-rgb / --accent-rgb / --accent-on-rgb),
|
|
1106
|
+
* 放进反色块或切换 data-theme 时自动跟随
|
|
1107
|
+
*
|
|
1108
|
+
* 性能(弱机器也要流畅):
|
|
1109
|
+
* - 渲染分辨率按特效分档(data-scale 可覆盖):背景压在遮罩和模糊下,色散 / 涡流用 0.5 倍 CSS 像素,
|
|
1110
|
+
* Retina 屏上像素量只有全分辨率的 1/16;网格有细线用 1 倍;定格出图时用全分辨率
|
|
1111
|
+
* - WebGL 特效限 30fps(data-fps 可覆盖),ASCII 24fps;不在视口、透明度为 0 的画布不画
|
|
1112
|
+
* - 申请低功耗 GPU;持续掉到 25fps 以下时自动降分辨率,降到底仍卡就切成静态画面
|
|
1113
|
+
*/
|
|
1114
|
+
(function () {
|
|
1115
|
+
'use strict'
|
|
1116
|
+
if (window.GZEffects) return
|
|
1117
|
+
|
|
1118
|
+
var VS = 'attribute vec2 p;void main(){gl_Position=vec4(p,0.,1.);}'
|
|
1119
|
+
var HEAD = 'precision highp float;uniform vec2 R;uniform float T;uniform vec2 M;uniform vec3 INK;uniform vec3 PAPER;uniform vec3 ACC;uniform float S;uniform float DARK;'
|
|
1120
|
+
var NOISE =
|
|
1121
|
+
'float hash(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}' +
|
|
1122
|
+
'float noise(vec2 p){vec2 i=floor(p),f=fract(p);vec2 u=f*f*(3.-2.*f);' +
|
|
1123
|
+
'return mix(mix(hash(i),hash(i+vec2(1,0)),u.x),mix(hash(i+vec2(0,1)),hash(i+vec2(1,1)),u.x),u.y);}'
|
|
1124
|
+
|
|
1125
|
+
// 各特效的默认渲染倍率(相对 CSS 像素):柔和的背景低分辨率看不出差别,细线和文字需要更高
|
|
1126
|
+
var SCALE = { dispersion: 0.5, vortex: 0.5, inkflow: 0.75, grid: 1, ascii: 1 }
|
|
1127
|
+
var FPS = { dispersion: 30, vortex: 30, inkflow: 30, grid: 30 }
|
|
1128
|
+
|
|
1129
|
+
var SHADERS = {
|
|
1130
|
+
// 原 PPT template.html FS_DARK,颜色是设计时定死的钛金暗色(themes.md 注明不跟主题)
|
|
1131
|
+
dispersion: HEAD +
|
|
1132
|
+
'vec3 pal(float t,vec3 a,vec3 b,vec3 c,vec3 d){return a+b*cos(6.28318*(c*t+d));}' +
|
|
1133
|
+
'void main(){vec2 uv=gl_FragCoord.xy/R;vec2 p=uv*2.-1.;p.x*=R.x/R.y;vec2 m=M*2.-1.;m.x*=R.x/R.y;' +
|
|
1134
|
+
'float md=length(p-m);p+=sin(md*15.-T*4.)*exp(-md*3.)*.08;vec2 p0=p;' +
|
|
1135
|
+
'for(float i=1.;i<4.;i++){p.x+=.1/i*sin(i*3.*p.y+T*.4)+.05;p.y+=.1/i*cos(i*2.*p.x+T*.3)-.05;}' +
|
|
1136
|
+
'float r=length(p);float ang=atan(p.y,p.x);' +
|
|
1137
|
+
'vec3 col=pal(r*1.5+p0.x*.5+T*.1,vec3(.12,.12,.13),vec3(.03,.04,.05),vec3(1.),vec3(.1,.2,.4));' +
|
|
1138
|
+
'float disp=sin(r*25.-T*1.5+ang*2.)*.5+.5;col+=vec3(disp*.015,disp*.01,disp*.02);' +
|
|
1139
|
+
'col+=pow(sin(p.x*4.+p.y*3.+T)*.5+.5,8.)*.08;col=mix(vec3(.05,.05,.06),col,.85);gl_FragColor=vec4(col,1.);}',
|
|
1140
|
+
|
|
1141
|
+
// 原 FS_LIGHT。colors:"theme" 时用主题纸色替换银白,深浅关系不变
|
|
1142
|
+
vortex: HEAD + NOISE +
|
|
1143
|
+
'float fbm(vec2 p){float v=0.,a=.5;mat2 m=mat2(.8,.6,-.6,.8);for(int i=0;i<5;i++){v+=a*noise(p);p=m*p*2.02;a*=.5;}return v;}' +
|
|
1144
|
+
'uniform float THEME;' +
|
|
1145
|
+
'void main(){vec2 uv=gl_FragCoord.xy/R;vec2 p=uv;p.x*=R.x/R.y;vec2 m=M;m.x*=R.x/R.y;vec2 md=p-m;float dl=length(md);' +
|
|
1146
|
+
'p+=normalize(md+vec2(.0001))*exp(-dl*5.)*.03;' +
|
|
1147
|
+
'vec2 q=vec2(fbm(p*1.8+T*.07),fbm(p*1.8+vec2(5.2,1.3)+T*.06));' +
|
|
1148
|
+
'vec2 r=vec2(fbm(p*2.+q*1.3+vec2(1.7,9.2)+T*.05),fbm(p*2.+q*1.3+vec2(8.3,2.8)+T*.04));' +
|
|
1149
|
+
'float f=fbm(p*2.2+r*1.5);' +
|
|
1150
|
+
'vec3 hi=mix(vec3(.955,.945,.925),PAPER,THEME);vec3 lo=mix(vec3(.86,.85,.84),mix(PAPER,INK,.1),THEME);' +
|
|
1151
|
+
'vec3 col=mix(lo,hi,f);float ph=r.x*2.2+T*.35;' +
|
|
1152
|
+
'col+=vec3(.78,.62,.92)*sin(ph)*.055;col+=vec3(.55,.72,.95)*sin(ph*.8+2.)*.05;col+=smoothstep(.48,.92,f)*.06;' +
|
|
1153
|
+
'gl_FragColor=vec4(col,1.);}',
|
|
1154
|
+
|
|
1155
|
+
// 原 PPT template-swiss.html 网格背景
|
|
1156
|
+
grid: HEAD +
|
|
1157
|
+
'float gl(vec2 uv,float s,float t){vec2 g=abs(fract(uv/s)-.5);float d=min(g.x,g.y);return 1.-smoothstep(t-.005,t+.005,d);}' +
|
|
1158
|
+
'void main(){vec2 uv=gl_FragCoord.xy/R;float a=R.x/R.y;vec2 p=uv;p.x*=a;vec2 gp=p+vec2(T*.008,T*.005);' +
|
|
1159
|
+
'float g=gl(gp,.12,.012)+gl(gp,.024,.04)*.2;vec2 m=M;m.x*=a;float mi=exp(-length(p-m)*4.)*.5;' +
|
|
1160
|
+
'vec2 dg=fract(gp*50.)-.5;float dm=1.-smoothstep(.05,.14,length(dg));' +
|
|
1161
|
+
'dm*=smoothstep(-.3,.6,sin(gp.x*1.4+T*.15)*cos(gp.y*1.6-T*.12))*.6;' +
|
|
1162
|
+
'vec3 line=mix(vec3(.08),vec3(.92),DARK);vec3 bg=PAPER;' +
|
|
1163
|
+
'vec3 col=mix(bg,line,g*(.45+mi)*.55);col=mix(col,line,dm*.35);col=mix(col,ACC,mi*.18);gl_FragColor=vec4(col,1.);}',
|
|
1164
|
+
|
|
1165
|
+
// 原卡片 magazine-bg-webgl.js:输出带透明度,叠在纸色上
|
|
1166
|
+
inkflow: HEAD + NOISE +
|
|
1167
|
+
'float fbm(vec2 p){float v=0.,a=.5;mat2 m=mat2(1.6,1.2,-1.2,1.6);for(int i=0;i<5;i++){v+=a*noise(p);p=m*p*1.18;a*=.52;}return v;}' +
|
|
1168
|
+
'void main(){vec2 p=(gl_FragCoord.xy-.5*R)/min(R.x,R.y);float t=T*.045;' +
|
|
1169
|
+
'float n=fbm(p*2.2+vec2(t,-t*.7));float n2=fbm(p*5.4-vec2(t*1.7,t));' +
|
|
1170
|
+
'float contour=smoothstep(.015,0.,abs(fract((n+n2*.35)*7.)-.5));float wash=smoothstep(.22,.88,n);' +
|
|
1171
|
+
'float vig=1.-smoothstep(.28,.92,length(p));vec3 col=mix(PAPER,INK,wash*.42+contour*.18);' +
|
|
1172
|
+
'col=mix(col,ACC,(.18+.25*n2)*contour);float al=S*(.18+wash*.42+contour*.3)*(.55+.45*vig);' +
|
|
1173
|
+
'gl_FragColor=vec4(col*al,al);}',
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
// ---------- 动效开关 ----------
|
|
1177
|
+
var KEY = 'gz-motion'
|
|
1178
|
+
function storedMotion() { try { return localStorage.getItem(KEY) } catch (e) { return null } }
|
|
1179
|
+
function computeMotion() {
|
|
1180
|
+
if (document.documentElement.getAttribute('data-motion') === 'off') return false
|
|
1181
|
+
var s = storedMotion()
|
|
1182
|
+
if (s === 'off') return false
|
|
1183
|
+
if (s === 'on') return true
|
|
1184
|
+
return !(window.matchMedia && matchMedia('(prefers-reduced-motion: reduce)').matches)
|
|
1185
|
+
}
|
|
1186
|
+
var motion = computeMotion()
|
|
1187
|
+
|
|
1188
|
+
// ---------- 颜色 ----------
|
|
1189
|
+
function rgbVar(cs, name, fb) {
|
|
1190
|
+
var v = cs.getPropertyValue(name).trim()
|
|
1191
|
+
if (!v) return fb
|
|
1192
|
+
var n = v.split(',').map(Number)
|
|
1193
|
+
return n.length === 3 && n.every(isFinite) ? n.map(function (x) { return x / 255 }) : fb
|
|
1194
|
+
}
|
|
1195
|
+
function readColors(el) {
|
|
1196
|
+
var cs = getComputedStyle(el)
|
|
1197
|
+
var paper = rgbVar(cs, '--paper-rgb', [0.97, 0.97, 0.96])
|
|
1198
|
+
return {
|
|
1199
|
+
ink: rgbVar(cs, '--ink-rgb', [0.04, 0.04, 0.04]),
|
|
1200
|
+
paper: paper,
|
|
1201
|
+
accent: rgbVar(cs, '--accent-rgb', [0, 0.18, 0.65]),
|
|
1202
|
+
accentOn: rgbVar(cs, '--accent-on-rgb', [1, 1, 1]),
|
|
1203
|
+
dark: 0.2126 * paper[0] + 0.7152 * paper[1] + 0.0722 * paper[2] < 0.5 ? 1 : 0,
|
|
1204
|
+
mono: (cs.getPropertyValue('--font-mono') || 'ui-monospace,monospace').trim(),
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
var mouse = [0.5, 0.5]
|
|
1209
|
+
addEventListener('mousemove', function (e) { mouse = [e.clientX / innerWidth, 1 - e.clientY / innerHeight] }, { passive: true })
|
|
1210
|
+
|
|
1211
|
+
// ---------- WebGL 特效 ----------
|
|
1212
|
+
function glEffect(canvas, o) {
|
|
1213
|
+
var gl = canvas.getContext('webgl', { alpha: o.effect === 'inkflow', premultipliedAlpha: true, antialias: false, powerPreference: 'low-power', preserveDrawingBuffer: o.frozen != null })
|
|
1214
|
+
if (!gl) return null
|
|
1215
|
+
function sh(t, s) {
|
|
1216
|
+
var x = gl.createShader(t); gl.shaderSource(x, s); gl.compileShader(x)
|
|
1217
|
+
if (!gl.getShaderParameter(x, gl.COMPILE_STATUS)) throw new Error('gz-effects ' + o.effect + ': ' + gl.getShaderInfoLog(x))
|
|
1218
|
+
return x
|
|
1219
|
+
}
|
|
1220
|
+
var prog = gl.createProgram()
|
|
1221
|
+
gl.attachShader(prog, sh(gl.VERTEX_SHADER, VS))
|
|
1222
|
+
gl.attachShader(prog, sh(gl.FRAGMENT_SHADER, SHADERS[o.effect]))
|
|
1223
|
+
gl.linkProgram(prog); gl.useProgram(prog)
|
|
1224
|
+
gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer())
|
|
1225
|
+
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]), gl.STATIC_DRAW)
|
|
1226
|
+
var loc = gl.getAttribLocation(prog, 'p'); gl.enableVertexAttribArray(loc); gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0)
|
|
1227
|
+
var U = {}
|
|
1228
|
+
;['R', 'T', 'M', 'INK', 'PAPER', 'ACC', 'S', 'DARK', 'THEME'].forEach(function (n) { U[n] = gl.getUniformLocation(prog, n) })
|
|
1229
|
+
return function (t, c) {
|
|
1230
|
+
gl.viewport(0, 0, canvas.width, canvas.height)
|
|
1231
|
+
gl.clearColor(0, 0, 0, 0); gl.clear(gl.COLOR_BUFFER_BIT)
|
|
1232
|
+
gl.uniform2f(U.R, canvas.width, canvas.height); gl.uniform1f(U.T, t); gl.uniform2f(U.M, mouse[0], mouse[1])
|
|
1233
|
+
gl.uniform3fv(U.INK, c.ink); gl.uniform3fv(U.PAPER, c.paper); gl.uniform3fv(U.ACC, c.accent)
|
|
1234
|
+
gl.uniform1f(U.S, o.strength); gl.uniform1f(U.DARK, o.dark != null ? +o.dark : c.dark)
|
|
1235
|
+
if (U.THEME) gl.uniform1f(U.THEME, o.colors === 'theme' ? 1 : 0)
|
|
1236
|
+
gl.drawArrays(gl.TRIANGLES, 0, 6)
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
// ---------- ASCII 呼吸场(Canvas 2D) ----------
|
|
1241
|
+
var PALETTE = ' ...:::---+++***◦◦••▢▣'
|
|
1242
|
+
function asciiEffect(canvas) {
|
|
1243
|
+
var ctx = canvas.getContext('2d')
|
|
1244
|
+
var cell = 16, atlas = null, atlasKey = ''
|
|
1245
|
+
// 字形图集:每个字符只排一次版,之后每帧按格子 drawImage,比逐格 fillText 快一个数量级
|
|
1246
|
+
function buildAtlas(font, rgb, dpr) {
|
|
1247
|
+
var key = font + rgb + dpr
|
|
1248
|
+
if (key === atlasKey) return
|
|
1249
|
+
atlas = document.createElement('canvas')
|
|
1250
|
+
atlas.width = Math.ceil(PALETTE.length * cell * dpr); atlas.height = Math.ceil(cell * dpr)
|
|
1251
|
+
var a = atlas.getContext('2d')
|
|
1252
|
+
a.setTransform(dpr, 0, 0, dpr, 0, 0)
|
|
1253
|
+
a.font = font; a.textBaseline = 'top'; a.fillStyle = 'rgb(' + rgb + ')'
|
|
1254
|
+
for (var i = 0; i < PALETTE.length; i++) if (PALETTE[i] !== ' ') a.fillText(PALETTE[i], i * cell, 0)
|
|
1255
|
+
atlasKey = key
|
|
1256
|
+
}
|
|
1257
|
+
var draw = function (t, c, w, h, dpr) {
|
|
1258
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0)
|
|
1259
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height)
|
|
1260
|
+
var rgb = c.accentOn.map(function (x) { return Math.round(x * 255) }).join(',')
|
|
1261
|
+
buildAtlas('500 13px ' + c.mono, rgb, dpr)
|
|
1262
|
+
// 字色取 accent-on:IKB / 橙上是白字,黄 / 绿上是墨色字(修复原来只画白字的问题)
|
|
1263
|
+
var blend = c.accentOn[0] + c.accentOn[1] + c.accentOn[2] > 1.5 ? 'screen' : 'multiply'
|
|
1264
|
+
if (canvas.style.mixBlendMode !== blend) canvas.style.mixBlendMode = blend
|
|
1265
|
+
var cols = Math.ceil(w / cell), rows = Math.ceil(h / cell), tt = t * 0.55, sz = cell * dpr
|
|
1266
|
+
for (var r = 0; r < rows; r++) for (var k = 0; k < cols; k++) {
|
|
1267
|
+
var n = (Math.sin(k * 0.18 + tt) + Math.sin(r * 0.24 - tt * 0.7) + Math.sin((k + r) * 0.12 + tt * 0.45) +
|
|
1268
|
+
Math.sin(Math.hypot(k - cols * 0.5, r - rows * 0.5) * 0.16 - tt * 0.55)) / 4
|
|
1269
|
+
var v = (n + 1) / 2
|
|
1270
|
+
if (v < 0.22) continue
|
|
1271
|
+
var idx = Math.min(PALETTE.length - 1, Math.floor(v * PALETTE.length))
|
|
1272
|
+
if (PALETTE[idx] === ' ') continue
|
|
1273
|
+
ctx.globalAlpha = 0.08 + (v - 0.22) * 0.55
|
|
1274
|
+
ctx.drawImage(atlas, idx * sz, 0, sz, sz, k * sz, r * sz, sz, sz)
|
|
1275
|
+
}
|
|
1276
|
+
ctx.globalAlpha = 1
|
|
1277
|
+
}
|
|
1278
|
+
// 呼吸场变化很慢,24 帧和 60 帧肉眼无差别;逐字绘制在 CPU 上开销大,限帧省电
|
|
1279
|
+
draw.interval = 1000 / 24
|
|
1280
|
+
return draw
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
// WebGL 不可用时:几层径向渐变,模拟墨色晕染(不画椭圆,遵守卡片「不用椭圆」规则)。深色背景特效用墨色打底
|
|
1284
|
+
function fallback2d(canvas, o) {
|
|
1285
|
+
var ctx = canvas.getContext('2d')
|
|
1286
|
+
return function (t, c, w, h, dpr) {
|
|
1287
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0)
|
|
1288
|
+
ctx.fillStyle = 'rgb(' + (o.effect === 'dispersion' ? c.ink : c.paper).map(function (x) { return Math.round(x * 255) }).join(',') + ')'
|
|
1289
|
+
ctx.fillRect(0, 0, w, h)
|
|
1290
|
+
for (var i = 0; i < 5; i++) {
|
|
1291
|
+
var x = w * (0.14 + ((i * 0.19 + 0.17) % 0.72)), y = h * (0.1 + ((i * 0.29 + 0.23) % 0.78)), r = Math.max(w, h) * (0.22 + i * 0.045)
|
|
1292
|
+
var g = ctx.createRadialGradient(x, y, 0, x, y, r)
|
|
1293
|
+
var col = (i % 2 ? c.accent : c.ink).map(function (v) { return Math.round(v * 255) }).join(',')
|
|
1294
|
+
g.addColorStop(0, 'rgba(' + col + ',' + (i % 2 ? 0.1 : 0.12) + ')'); g.addColorStop(1, 'rgba(' + col + ',0)')
|
|
1295
|
+
ctx.fillStyle = g; ctx.fillRect(0, 0, w, h)
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
// ---------- 挂载与循环 ----------
|
|
1301
|
+
// 自动降级的状态(见 governor):各级渲染倍率与当前级别
|
|
1302
|
+
var ADAPT = [1, 0.7, 0.5]
|
|
1303
|
+
var perf = { start: 0, frames: 0, level: 0, settleUntil: 0 }
|
|
1304
|
+
var items = []
|
|
1305
|
+
var STATIC_T = 12.5 // 动效关闭时的静态帧时刻
|
|
1306
|
+
var readyResolve
|
|
1307
|
+
var ready = new Promise(function (r) { readyResolve = r })
|
|
1308
|
+
var pendingFirst = 0
|
|
1309
|
+
|
|
1310
|
+
function size(it) {
|
|
1311
|
+
var rect = it.canvas.getBoundingClientRect()
|
|
1312
|
+
var device = Math.min(window.devicePixelRatio || 1, 2)
|
|
1313
|
+
// 定格出图用全分辨率;实时播放按特效倍率 × 自适应降级系数
|
|
1314
|
+
var dpr = it.o.frozen != null || it.o.scale == null ? device : Math.max(0.2, it.o.scale * it.adapt)
|
|
1315
|
+
var w = Math.max(1, Math.round(rect.width)), h = Math.max(1, Math.round(rect.height))
|
|
1316
|
+
if (it.w !== w || it.h !== h || it.dpr !== dpr) {
|
|
1317
|
+
it.w = w; it.h = h; it.dpr = dpr
|
|
1318
|
+
it.canvas.width = Math.round(w * dpr); it.canvas.height = Math.round(h * dpr)
|
|
1319
|
+
it.dirty = true
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
function drawOne(it, now) {
|
|
1324
|
+
size(it)
|
|
1325
|
+
if (!it.colors || it.colorsStale) { it.colors = readColors(it.canvas); it.colorsStale = false }
|
|
1326
|
+
var t = it.o.frozen != null ? it.o.frozen : motion ? (now - it.t0) / 1000 : STATIC_T
|
|
1327
|
+
it.draw(t, it.colors, it.w, it.h, it.dpr)
|
|
1328
|
+
it.dirty = false
|
|
1329
|
+
if (!it.drawn) { it.drawn = true; if (--pendingFirst === 0) readyResolve() }
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
function mount(canvas, opts) {
|
|
1333
|
+
if (typeof canvas === 'string') canvas = document.querySelector(canvas)
|
|
1334
|
+
if (!canvas || canvas.__gz) return canvas && canvas.__gz
|
|
1335
|
+
var d = canvas.dataset
|
|
1336
|
+
var o = Object.assign({
|
|
1337
|
+
effect: d.gzEffect || 'vortex',
|
|
1338
|
+
strength: d.strength != null ? +d.strength : 0.34,
|
|
1339
|
+
frozen: d.frozen != null ? +d.frozen : null,
|
|
1340
|
+
colors: d.colors || 'fixed',
|
|
1341
|
+
dark: d.dark != null ? d.dark === 'true' || d.dark === '1' : null,
|
|
1342
|
+
}, opts || {})
|
|
1343
|
+
var eff = o.effect
|
|
1344
|
+
if (o.scale == null) o.scale = d.scale != null ? +d.scale : SCALE[eff]
|
|
1345
|
+
var fps = d.fps != null ? +d.fps : FPS[eff]
|
|
1346
|
+
var draw = eff === 'ascii' ? asciiEffect(canvas) : SHADERS[eff] ? glEffect(canvas, o) : null
|
|
1347
|
+
if (!draw && eff !== 'ascii') draw = fallback2d(canvas, o)
|
|
1348
|
+
var it = { canvas: canvas, o: o, draw: draw, t0: performance.now(), visible: true, last: 0, adapt: 1,
|
|
1349
|
+
interval: (draw && draw.interval) || (fps ? 1000 / fps : 0) }
|
|
1350
|
+
canvas.__gz = it
|
|
1351
|
+
items.push(it)
|
|
1352
|
+
pendingFirst++
|
|
1353
|
+
if ('IntersectionObserver' in window) {
|
|
1354
|
+
// 只贴着视口边缘(面积为 0)不算可见:幻灯片左右相邻页正好贴边,isIntersecting 会误报为 true
|
|
1355
|
+
new IntersectionObserver(function (es) { es.forEach(function (e) { it.visible = e.isIntersecting && e.intersectionRatio > 0 }) }, { threshold: [0, 0.01] }).observe(canvas)
|
|
1356
|
+
}
|
|
1357
|
+
// 刚挂载时字体加载、着色器编译都会卡一下,先观察 1.5 秒再开始判断是否降级
|
|
1358
|
+
perf.settleUntil = Math.max(perf.settleUntil, performance.now() + 1500)
|
|
1359
|
+
drawOne(it, performance.now())
|
|
1360
|
+
schedule()
|
|
1361
|
+
return it
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
// 透明度为 0 的画布(杂志风深浅两张背景交叉淡入时,看不见的那张)不画
|
|
1365
|
+
function shown(c) {
|
|
1366
|
+
if (c.checkVisibility) return c.checkVisibility({ opacityProperty: true, visibilityProperty: true })
|
|
1367
|
+
return getComputedStyle(c).opacity !== '0'
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
// 自动降级:每 2 秒看一次页面帧率,持续低于 25 就降渲染倍率;降到底仍卡,切成静态画面
|
|
1371
|
+
function governor(now, animating) {
|
|
1372
|
+
if (!animating || document.hidden) { perf.start = 0; return }
|
|
1373
|
+
if (now < perf.settleUntil) return
|
|
1374
|
+
if (!perf.start) { perf.start = now; perf.frames = 0; return }
|
|
1375
|
+
perf.frames++
|
|
1376
|
+
var span = now - perf.start
|
|
1377
|
+
if (span < 2000) return
|
|
1378
|
+
var fps = (perf.frames * 1000) / span
|
|
1379
|
+
perf.start = 0
|
|
1380
|
+
if (fps >= 25) return
|
|
1381
|
+
perf.level++
|
|
1382
|
+
if (perf.level < ADAPT.length) {
|
|
1383
|
+
items.forEach(function (it) { it.adapt = ADAPT[perf.level]; it.dirty = true })
|
|
1384
|
+
perf.settleUntil = now + 1000
|
|
1385
|
+
} else {
|
|
1386
|
+
if (window.console) console.info('[gz-effects] 帧率持续偏低(' + fps.toFixed(0) + 'fps),背景已切换为静态画面')
|
|
1387
|
+
setMotion(false, false)
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
var raf = 0
|
|
1392
|
+
function schedule() { if (!raf) raf = requestAnimationFrame(loop) }
|
|
1393
|
+
function loop(now) {
|
|
1394
|
+
raf = 0
|
|
1395
|
+
var again = false
|
|
1396
|
+
for (var i = 0; i < items.length; i++) {
|
|
1397
|
+
var it = items[i]
|
|
1398
|
+
var live = motion && it.o.frozen == null
|
|
1399
|
+
var due = now - it.last >= it.interval
|
|
1400
|
+
if ((live && it.visible && due && shown(it.canvas)) || it.dirty || it.colorsStale) { drawOne(it, now); it.last = now }
|
|
1401
|
+
if (live) again = true
|
|
1402
|
+
}
|
|
1403
|
+
governor(now, again)
|
|
1404
|
+
if (again) schedule()
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
function setMotion(on, persist) {
|
|
1408
|
+
motion = !!on
|
|
1409
|
+
if (persist !== false) try { localStorage.setItem(KEY, on ? 'on' : 'off') } catch (e) {}
|
|
1410
|
+
items.forEach(function (it) { it.dirty = true; if (on) it.t0 = performance.now() - STATIC_T * 1000 })
|
|
1411
|
+
schedule()
|
|
1412
|
+
dispatchEvent(new CustomEvent('gz-motion-change', { detail: { on: motion } }))
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
// 旧模板的低功耗事件:迁移期间继续认
|
|
1416
|
+
;['ppt-low-power-change', 'swiss-low-power-change'].forEach(function (n) {
|
|
1417
|
+
addEventListener(n, function (e) { if (e.detail && 'on' in e.detail) setMotion(!e.detail.on, false) })
|
|
1418
|
+
})
|
|
1419
|
+
if (window.matchMedia) {
|
|
1420
|
+
var mq = matchMedia('(prefers-reduced-motion: reduce)')
|
|
1421
|
+
mq.addEventListener && mq.addEventListener('change', function () { if (!storedMotion()) setMotion(computeMotion(), false) })
|
|
1422
|
+
}
|
|
1423
|
+
// 主题、反色块切换:标记颜色过期,下一帧重读
|
|
1424
|
+
new MutationObserver(function () {
|
|
1425
|
+
if (computeMotion() !== motion && document.documentElement.getAttribute('data-motion') === 'off') setMotion(false, false)
|
|
1426
|
+
items.forEach(function (it) { it.colorsStale = true }); schedule()
|
|
1427
|
+
}).observe(document.documentElement, { attributes: true, subtree: true, attributeFilter: ['data-theme', 'data-surface', 'data-motion', 'class'] })
|
|
1428
|
+
addEventListener('resize', function () { items.forEach(function (it) { it.dirty = true }); perf.settleUntil = performance.now() + 1000; schedule() }, { passive: true })
|
|
1429
|
+
|
|
1430
|
+
function autoMount() {
|
|
1431
|
+
var list = document.querySelectorAll('canvas[data-gz-effect]')
|
|
1432
|
+
for (var i = 0; i < list.length; i++) mount(list[i])
|
|
1433
|
+
if (!list.length) readyResolve()
|
|
1434
|
+
}
|
|
1435
|
+
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', autoMount)
|
|
1436
|
+
else autoMount()
|
|
1437
|
+
|
|
1438
|
+
window.GZEffects = {
|
|
1439
|
+
mount: mount, ready: ready, setMotion: setMotion,
|
|
1440
|
+
get motion() { return motion },
|
|
1441
|
+
effects: Object.keys(SHADERS).concat('ascii'),
|
|
1442
|
+
}
|
|
1443
|
+
})()
|
|
1444
|
+
/* GZ:EFFECTS:END */
|
|
1445
|
+
</script>
|
|
1446
|
+
<script>
|
|
1447
|
+
/* =============== 背景特效(gz-effects) ===============
|
|
1448
|
+
深色页 #bg-dark 全息色散、浅色页 #bg-light 银色涡流,body.light-bg 切换时由 CSS 交叉淡入。
|
|
1449
|
+
低功耗开关沿用 window.__lowPowerMode 与 ppt-low-power-change 事件,运行时会自动跟随。 */
|
|
1450
|
+
GZEffects.setMotion(!window.__lowPowerMode, false);
|
|
686
1451
|
|
|
687
1452
|
// =============== 导航(翻页 / 圆点 / 键盘 / 滚轮 / 触屏) ===============
|
|
688
1453
|
const deck=document.getElementById('deck');
|
|
@@ -706,9 +1471,10 @@ function go(n,opts={}){
|
|
|
706
1471
|
window.__currentSlideIndex = idx;
|
|
707
1472
|
deck.style.transform=`translateX(${-idx*100}vw)`;
|
|
708
1473
|
nav.querySelectorAll('.dot').forEach((d,i)=>d.classList.toggle('active',i===idx));
|
|
709
|
-
/*
|
|
1474
|
+
/* 深浅页:读 section 上的 class(light/dark);section 的 data-theme 只认 light/dark——
|
|
1475
|
+
<html data-theme> 是配色主题(ink-classic 等),两者不能混 */
|
|
710
1476
|
const el=slides[idx];
|
|
711
|
-
const th=el.dataset.theme
|
|
1477
|
+
const th=(el.dataset.theme==='light'||el.dataset.theme==='dark') ? el.dataset.theme : (el.classList.contains('light')?'light':'dark');
|
|
712
1478
|
document.body.classList.toggle('light-bg',th==='light');
|
|
713
1479
|
/* 动效:翻页过渡中段触发当前页的入场动画(由 motion-boot 注册) */
|
|
714
1480
|
if(window.__playSlide) setTimeout(()=>window.__playSlide(idx), 450);
|