@liustack/pagepress 0.7.0 → 0.8.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/README.md CHANGED
@@ -37,7 +37,7 @@ pagepress -i page.html -o output.pdf
37
37
 
38
38
  ## Templates
39
39
 
40
- - `default` - Apple style
40
+ - `default` - Clean minimalist style
41
41
  - `github` - GitHub style
42
42
  - `magazine` - magazine layout
43
43
 
@@ -52,7 +52,7 @@ pagepress -i page.html -o output.pdf
52
52
 
53
53
  ## AI Agent Skill
54
54
 
55
- - [web-to-pdf/SKILL.md](skills/web-to-pdf/SKILL.md)
55
+ - [pagepress/SKILL.md](skills/pagepress/SKILL.md)
56
56
 
57
57
  ## License
58
58
 
package/README.zh-CN.md CHANGED
@@ -35,7 +35,7 @@ pagepress -i page.html -o output.pdf
35
35
 
36
36
  ## 模板
37
37
 
38
- - `default` - Apple 风格
38
+ - `default` - 简洁风格
39
39
  - `github` - GitHub 风格
40
40
  - `magazine` - 杂志排版
41
41
 
@@ -50,7 +50,7 @@ pagepress -i page.html -o output.pdf
50
50
 
51
51
  ## AI Agent Skill
52
52
 
53
- - [web-to-pdf/SKILL.md](skills/web-to-pdf/SKILL.md)
53
+ - [pagepress/SKILL.md](skills/pagepress/SKILL.md)
54
54
 
55
55
  ## License
56
56
 
package/dist/main.js CHANGED
@@ -11,7 +11,7 @@ import hljs from "highlight.js";
11
11
  const pdfTemplates = {
12
12
  default: {
13
13
  name: "default",
14
- description: "Apple-inspired clean design",
14
+ description: "Clean minimalist design",
15
15
  file: "default.html"
16
16
  },
17
17
  github: {
@@ -91,9 +91,9 @@ function normalizeTimeout(value) {
91
91
  function findTemplatesDir() {
92
92
  const candidates = [
93
93
  // When running from project root (dev/installed)
94
- path.resolve(process.cwd(), "src/pdf/templates"),
94
+ path.resolve(process.cwd(), "src/templates"),
95
95
  // Relative to dist/main.js
96
- path.resolve(__dirname$1, "..", "src", "pdf", "templates"),
96
+ path.resolve(__dirname$1, "..", "src", "templates"),
97
97
  // Relative to source file location
98
98
  path.resolve(__dirname$1, "templates")
99
99
  ];
@@ -317,7 +317,7 @@ async function render(options) {
317
317
  }
318
318
  }
319
319
  const program = new Command();
320
- program.name("pagepress").description("Render local Markdown and HTML files to PDF").version("0.7.0").requiredOption("-i, --input <path>", "Input Markdown or HTML file path").requiredOption("-o, --output <path>", "Output PDF file path").option("-t, --template <name>", "PDF template (default, github, magazine)", "default").option("--wait-until <state>", "Navigation waitUntil (load, domcontentloaded, networkidle)", "networkidle").option("--timeout <ms>", "Navigation timeout in milliseconds", "30000").option("--safe", "Disable external network requests and JavaScript execution").action(async (options) => {
320
+ program.name("pagepress").description("Render local Markdown and HTML files to PDF").version("0.8.0").requiredOption("-i, --input <path>", "Input Markdown or HTML file path").requiredOption("-o, --output <path>", "Output PDF file path").option("-t, --template <name>", "PDF template (default, github, magazine)", "default").option("--wait-until <state>", "Navigation waitUntil (load, domcontentloaded, networkidle)", "networkidle").option("--timeout <ms>", "Navigation timeout in milliseconds", "30000").option("--safe", "Disable external network requests and JavaScript execution").action(async (options) => {
321
321
  try {
322
322
  const timeout = Number.parseInt(options.timeout, 10);
323
323
  if (!Number.isFinite(timeout) || timeout < 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liustack/pagepress",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "CLI tool to render local Markdown and HTML files into PDF",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "files": [
10
10
  "dist",
11
- "src/pdf/templates"
11
+ "src/templates"
12
12
  ],
13
13
  "keywords": [
14
14
  "pdf",
@@ -46,14 +46,19 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/node": "^22.19.7",
49
+ "@vitest/coverage-v8": "^4.0.18",
49
50
  "typescript": "^5.9.3",
50
51
  "vite": "^6.4.1",
51
- "vite-plugin-node": "^5.0.1"
52
+ "vite-plugin-node": "^5.0.1",
53
+ "vitest": "^4.0.18"
52
54
  },
53
55
  "scripts": {
54
56
  "dev": "vite build --watch",
55
57
  "build": "vite build",
56
58
  "typecheck": "tsc --noEmit",
59
+ "test": "vitest run",
60
+ "test:watch": "vitest",
61
+ "test:coverage": "vitest run --coverage",
57
62
  "docs:list": "node scripts/docs-list.js"
58
63
  }
59
64
  }
@@ -0,0 +1,253 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>{{title}}</title>
8
+ <style>
9
+ /**
10
+ * Default Theme — Clean minimalist design
11
+ */
12
+
13
+ :root {
14
+ --text-primary: #1d1d1f;
15
+ --text-secondary: #6e6e73;
16
+ --text-tertiary: #86868b;
17
+ --bg-primary: #ffffff;
18
+ --border-color: #d2d2d7;
19
+ --border-light: #e5e5ea;
20
+ --accent: #0071e3;
21
+ --code-bg: #f5f5f7;
22
+ --code-block-bg: #f6f8fa;
23
+ }
24
+
25
+ * {
26
+ box-sizing: border-box;
27
+ margin: 0;
28
+ padding: 0;
29
+ }
30
+
31
+ body {
32
+ font-family: system-ui, -apple-system, BlinkMacSystemFont,
33
+ "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
34
+ font-size: 16px;
35
+ line-height: 1.75;
36
+ color: var(--text-primary);
37
+ background: var(--bg-primary);
38
+ -webkit-font-smoothing: antialiased;
39
+ -moz-osx-font-smoothing: grayscale;
40
+ -webkit-print-color-adjust: exact;
41
+ print-color-adjust: exact;
42
+ }
43
+
44
+ .container {
45
+ max-width: 900px;
46
+ margin: 0 auto;
47
+ padding: 64px 56px 120px;
48
+ }
49
+
50
+ /* Heading System */
51
+ h1, h2, h3, h4, h5, h6 {
52
+ font-weight: 600;
53
+ line-height: 1.25;
54
+ margin-top: 1.5em;
55
+ margin-bottom: 0.5em;
56
+ }
57
+
58
+ h1 {
59
+ font-size: 32px;
60
+ line-height: 1.15;
61
+ margin-top: 0;
62
+ margin-bottom: 20px;
63
+ }
64
+
65
+ h2 {
66
+ font-size: 24px;
67
+ margin-top: 40px;
68
+ }
69
+
70
+ h3 {
71
+ font-size: 18px;
72
+ }
73
+
74
+ h4 {
75
+ font-size: 16px;
76
+ color: var(--text-secondary);
77
+ }
78
+
79
+ /* Paragraph */
80
+ p {
81
+ margin-bottom: 1.25em;
82
+ }
83
+
84
+ strong {
85
+ font-weight: 600;
86
+ }
87
+
88
+ a {
89
+ color: var(--accent);
90
+ text-decoration: none;
91
+ }
92
+
93
+ a:hover {
94
+ text-decoration: underline;
95
+ }
96
+
97
+ /* Blockquote */
98
+ blockquote {
99
+ margin: 1.5em 0;
100
+ padding: 0 0 0 1em;
101
+ border-left: 3px solid var(--border-color);
102
+ color: var(--text-secondary);
103
+ font-style: italic;
104
+ }
105
+
106
+ blockquote p:last-child {
107
+ margin-bottom: 0;
108
+ }
109
+
110
+ /* Code */
111
+ code {
112
+ font-family: ui-monospace, Menlo, Consolas, monospace;
113
+ font-size: 0.875em;
114
+ padding: 0.15em 0.4em;
115
+ background: var(--code-bg);
116
+ border-radius: 4px;
117
+ color: var(--text-primary);
118
+ }
119
+
120
+ pre {
121
+ margin: 1.5em 0;
122
+ padding: 20px 24px;
123
+ background: var(--code-block-bg);
124
+ border: 1px solid var(--border-light);
125
+ border-radius: 8px;
126
+ overflow-x: auto;
127
+ font-family: ui-monospace, Menlo, Consolas, monospace;
128
+ font-size: 13px;
129
+ line-height: 1.6;
130
+ color: var(--text-primary);
131
+ }
132
+
133
+ pre code {
134
+ display: block;
135
+ padding: 0;
136
+ background: transparent;
137
+ color: inherit;
138
+ border-radius: 0;
139
+ font-size: inherit;
140
+ font-family: inherit;
141
+ }
142
+
143
+ /* Syntax highlighting — light theme */
144
+ pre .hljs { color: #24292e; }
145
+ pre .hljs-comment, pre .hljs-quote { color: #6a737d; font-style: italic; }
146
+ pre .hljs-keyword, pre .hljs-selector-tag, pre .hljs-literal, pre .hljs-type { color: #d73a49; font-weight: 600; }
147
+ pre .hljs-string, pre .hljs-attr, pre .hljs-symbol, pre .hljs-bullet, pre .hljs-addition { color: #032f62; }
148
+ pre .hljs-number { color: #005cc5; }
149
+ pre .hljs-title, pre .hljs-section { color: #6f42c1; }
150
+ pre .hljs-built_in, pre .hljs-name { color: #005cc5; }
151
+ pre .hljs-variable, pre .hljs-template-variable { color: #e36209; }
152
+ pre .hljs-meta { color: #6f42c1; }
153
+
154
+ /* codehilite compatibility */
155
+ pre .c, pre .ch, pre .cm, pre .c1, pre .cs { color: #6a737d; font-style: italic; }
156
+ pre .k, pre .kc, pre .kd, pre .kn, pre .kp, pre .kr, pre .kt { color: #d73a49; font-weight: 600; }
157
+ pre .s, pre .s1, pre .s2, pre .sa, pre .sb, pre .sc, pre .sd, pre .se, pre .sh, pre .si, pre .sr, pre .ss, pre .sx { color: #032f62; }
158
+ pre .nf, pre .fm { color: #6f42c1; }
159
+ pre .mi, pre .mf, pre .mh, pre .mo, pre .mb, pre .il { color: #005cc5; }
160
+ pre .bp { color: #005cc5; }
161
+
162
+ /* Table */
163
+ table {
164
+ width: 100%;
165
+ margin: 1.5em 0;
166
+ border-collapse: collapse;
167
+ font-size: 15px;
168
+ }
169
+
170
+ th, td {
171
+ padding: 10px 14px;
172
+ text-align: left;
173
+ border-bottom: 1px solid var(--border-light);
174
+ }
175
+
176
+ th {
177
+ font-weight: 600;
178
+ color: var(--text-primary);
179
+ border-bottom-color: var(--border-color);
180
+ }
181
+
182
+ tr:last-child td {
183
+ border-bottom: none;
184
+ }
185
+
186
+ /* Lists */
187
+ ul, ol {
188
+ margin: 1em 0;
189
+ padding-left: 1.5em;
190
+ }
191
+
192
+ li {
193
+ margin: 0.4em 0;
194
+ line-height: 1.75;
195
+ }
196
+
197
+ li::marker {
198
+ color: var(--text-secondary);
199
+ }
200
+
201
+ /* Images */
202
+ img {
203
+ max-width: 100%;
204
+ height: auto;
205
+ display: block;
206
+ margin: 1.5em auto;
207
+ border-radius: 8px;
208
+ }
209
+
210
+ /* Divider */
211
+ hr {
212
+ border: none;
213
+ height: 1px;
214
+ background: var(--border-color);
215
+ margin: 2em 0;
216
+ }
217
+
218
+ /* Print */
219
+ @page {
220
+ size: A4;
221
+ margin: 24mm 20mm;
222
+ }
223
+
224
+ @media print {
225
+ .container {
226
+ padding: 0;
227
+ max-width: none;
228
+ }
229
+
230
+ h1 { font-size: 24px; }
231
+ h2 { font-size: 18px; }
232
+
233
+ pre {
234
+ background: var(--code-block-bg) !important;
235
+ color: var(--text-primary) !important;
236
+ border: 1px solid var(--border-light);
237
+ -webkit-print-color-adjust: exact;
238
+ print-color-adjust: exact;
239
+ }
240
+
241
+ pre code { color: inherit !important; }
242
+ }
243
+ </style>
244
+ {{styles}}
245
+ </head>
246
+
247
+ <body>
248
+ <article class="container">
249
+ {{body}}
250
+ </article>
251
+ </body>
252
+
253
+ </html>
@@ -1,555 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>{{title}}</title>
8
- <style>
9
- /**
10
- * Default Theme — Apple-inspired Design
11
- * Clean, elegant, premium
12
- */
13
-
14
- :root {
15
- --text-primary: #1d1d1f;
16
- --text-secondary: #6e6e73;
17
- --text-tertiary: #86868b;
18
- --bg-primary: #ffffff;
19
- --bg-secondary: #fbfbfd;
20
- --border-color: #d2d2d7;
21
- --accent: #0071e3;
22
- --code-bg: #f5f5f7;
23
- }
24
-
25
- * {
26
- box-sizing: border-box;
27
- margin: 0;
28
- padding: 0;
29
- }
30
-
31
- body {
32
- font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont,
33
- "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
34
- font-size: 17px;
35
- line-height: 1.65;
36
- color: var(--text-primary);
37
- background: var(--bg-primary);
38
- -webkit-font-smoothing: antialiased;
39
- -moz-osx-font-smoothing: grayscale;
40
- -webkit-print-color-adjust: exact;
41
- print-color-adjust: exact;
42
- }
43
-
44
- .container {
45
- max-width: 900px;
46
- margin: 0 auto;
47
- padding: 96px 64px 140px;
48
- }
49
-
50
- /* Heading System */
51
- h1,
52
- h2,
53
- h3,
54
- h4,
55
- h5,
56
- h6 {
57
- font-weight: 600;
58
- line-height: 1.125;
59
- letter-spacing: 0.004em;
60
- margin-top: 1.5em;
61
- margin-bottom: 0.5em;
62
- }
63
-
64
- h1 {
65
- font-size: 40px;
66
- line-height: 1.1;
67
- letter-spacing: -0.005em;
68
- margin-top: 0;
69
- margin-bottom: 24px;
70
- }
71
-
72
- h2 {
73
- font-size: 28px;
74
- margin-top: 48px;
75
- }
76
-
77
- h3 {
78
- font-size: 21px;
79
- }
80
-
81
- h4 {
82
- font-size: 17px;
83
- color: var(--text-secondary);
84
- }
85
-
86
- /* Paragraph */
87
- p {
88
- margin-bottom: 1.25em;
89
- }
90
-
91
- .lead {
92
- font-size: 21px;
93
- line-height: 1.6;
94
- color: var(--text-secondary);
95
- margin-bottom: 32px;
96
- }
97
-
98
- strong {
99
- font-weight: 600;
100
- }
101
-
102
- a {
103
- color: var(--accent);
104
- text-decoration: none;
105
- }
106
-
107
- a:hover {
108
- text-decoration: underline;
109
- }
110
-
111
- /* Lists */
112
- ul,
113
- ol {
114
- margin: 0 0 1.25em;
115
- padding-left: 1.5em;
116
- }
117
-
118
- li {
119
- margin-bottom: 0.5em;
120
- }
121
-
122
- /* Blockquote - Clean Apple Style */
123
- blockquote {
124
- margin: 1.5em 0;
125
- padding: 0 0 0 1.25em;
126
- border-left: 4px solid var(--text-tertiary);
127
- color: var(--text-secondary);
128
- font-style: italic;
129
- }
130
-
131
- blockquote p {
132
- font-size: 1.05em;
133
- line-height: 1.6;
134
- }
135
-
136
- blockquote p:last-child {
137
- margin-bottom: 0;
138
- }
139
-
140
- /* Code */
141
- code {
142
- font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
143
- font-size: 0.875em;
144
- padding: 0.2em 0.4em;
145
- background: var(--code-bg);
146
- border-radius: 6px;
147
- color: #1d1d1f;
148
- }
149
-
150
- pre {
151
- margin: 1.5em 0;
152
- padding: 24px 28px;
153
- background: var(--bg-secondary);
154
- border: 1px solid var(--border-color);
155
- border-radius: 12px;
156
- overflow-x: auto;
157
- font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
158
- font-size: 14px;
159
- line-height: 1.6;
160
- color: #1d1d1f;
161
- }
162
-
163
- pre code {
164
- display: block;
165
- padding: 0;
166
- background: transparent;
167
- color: inherit;
168
- border-radius: 0;
169
- font-size: inherit;
170
- font-family: inherit;
171
- }
172
-
173
- /* Light theme syntax highlighting */
174
- pre .comment {
175
- color: #6e6e73;
176
- font-style: italic;
177
- }
178
-
179
- pre .keyword {
180
- color: #9b2393;
181
- font-weight: 600;
182
- }
183
-
184
- pre .string {
185
- color: #c41a16;
186
- }
187
-
188
- pre .function {
189
- color: #326d74;
190
- }
191
-
192
- pre .number {
193
- color: #1c00cf;
194
- }
195
-
196
- pre .class {
197
- color: #5c2699;
198
- }
199
-
200
- pre .operator {
201
- color: #1d1d1f;
202
- }
203
-
204
- pre .punctuation {
205
- color: #1d1d1f;
206
- }
207
-
208
- /* codehilite compatibility (class names generated by Markdown libraries) */
209
- pre .hll {
210
- background: rgba(255, 255, 0, 0.2);
211
- }
212
-
213
- pre .c,
214
- pre .ch,
215
- pre .cm,
216
- pre .c1,
217
- pre .cs {
218
- color: #6e6e73;
219
- font-style: italic;
220
- }
221
-
222
- pre .k,
223
- pre .kc,
224
- pre .kd,
225
- pre .kn,
226
- pre .kp,
227
- pre .kr,
228
- pre .kt {
229
- color: #9b2393;
230
- font-weight: 600;
231
- }
232
-
233
- pre .s,
234
- pre .s1,
235
- pre .s2,
236
- pre .sa,
237
- pre .sb,
238
- pre .sc,
239
- pre .sd,
240
- pre .se,
241
- pre .sh,
242
- pre .si,
243
- pre .sr,
244
- pre .ss,
245
- pre .sx {
246
- color: #c41a16;
247
- }
248
-
249
- pre .n,
250
- pre .na,
251
- pre .nb,
252
- pre .nc,
253
- pre .nd,
254
- pre .ne,
255
- pre .ni,
256
- pre .nl,
257
- pre .nn,
258
- pre .no,
259
- pre .nt,
260
- pre .nv {
261
- color: #1d1d1f;
262
- }
263
-
264
- pre .nf,
265
- pre .fm {
266
- color: #326d74;
267
- }
268
-
269
- pre .o,
270
- pre .ow {
271
- color: #1d1d1f;
272
- }
273
-
274
- pre .p {
275
- color: #1d1d1f;
276
- }
277
-
278
- pre .mi,
279
- pre .mf,
280
- pre .mh,
281
- pre .mo,
282
- pre .mb,
283
- pre .il {
284
- color: #1c00cf;
285
- }
286
-
287
- pre .bp {
288
- color: #5c2699;
289
- }
290
-
291
- pre .vc,
292
- pre .vg,
293
- pre .vi,
294
- pre .vm {
295
- color: #c41a16;
296
- }
297
-
298
- /* Table - Apple style rounded corners */
299
- table {
300
- width: 100%;
301
- margin: 1.5em 0;
302
- border-collapse: separate;
303
- border-spacing: 0;
304
- font-size: 15px;
305
- border: 1px solid var(--border-color);
306
- border-radius: 12px;
307
- overflow: hidden;
308
- }
309
-
310
- th,
311
- td {
312
- padding: 14px 20px;
313
- text-align: left;
314
- border-bottom: 1px solid var(--border-color);
315
- }
316
-
317
- th {
318
- font-weight: 600;
319
- color: var(--text-secondary);
320
- font-size: 13px;
321
- letter-spacing: 0.02em;
322
- background: var(--bg-secondary);
323
- }
324
-
325
- tr:last-child td {
326
- border-bottom: none;
327
- }
328
-
329
- /* Lists - Apple style */
330
- ul,
331
- ol {
332
- margin: 1em 0;
333
- padding-left: 1.5em;
334
- }
335
-
336
- li {
337
- margin: 0.5em 0;
338
- line-height: 1.6;
339
- }
340
-
341
- li::marker {
342
- color: var(--text-secondary);
343
- }
344
-
345
- ul li {
346
- list-style-type: disc;
347
- }
348
-
349
- ul ul li {
350
- list-style-type: circle;
351
- }
352
-
353
- ol li {
354
- list-style-type: decimal;
355
- }
356
-
357
- /* Divider */
358
- hr {
359
- border: none;
360
- height: 1px;
361
- background: var(--border-color);
362
- margin: 48px 0;
363
- }
364
-
365
- /* Feature Cards */
366
- .feature-grid {
367
- display: grid;
368
- grid-template-columns: repeat(2, 1fr);
369
- gap: 20px;
370
- margin: 32px 0;
371
- }
372
-
373
- .feature-item {
374
- padding: 24px 28px;
375
- background: var(--bg-secondary);
376
- border-radius: 16px;
377
- }
378
-
379
- .feature-item h3 {
380
- font-size: 17px;
381
- margin: 0 0 8px;
382
- }
383
-
384
- .feature-item p {
385
- margin: 0;
386
- font-size: 14px;
387
- color: var(--text-secondary);
388
- line-height: 1.5;
389
- }
390
-
391
- /* Callout */
392
- .callout {
393
- margin: 1.5em 0;
394
- padding: 20px 24px;
395
- background: var(--bg-secondary);
396
- border-radius: 12px;
397
- border-left: 3px solid var(--accent);
398
- }
399
-
400
- .callout-title {
401
- font-size: 12px;
402
- font-weight: 600;
403
- color: var(--text-secondary);
404
- text-transform: uppercase;
405
- letter-spacing: 0.02em;
406
- margin-bottom: 8px;
407
- }
408
-
409
- .callout p:last-child {
410
- margin-bottom: 0;
411
- }
412
-
413
- /* Steps */
414
- .steps {
415
- margin: 32px 0;
416
- }
417
-
418
- .step {
419
- display: flex;
420
- gap: 16px;
421
- margin-bottom: 20px;
422
- }
423
-
424
- .step-number {
425
- width: 28px;
426
- height: 28px;
427
- border-radius: 50%;
428
- background: var(--text-primary);
429
- color: white;
430
- font-size: 14px;
431
- font-weight: 600;
432
- display: flex;
433
- align-items: center;
434
- justify-content: center;
435
- flex-shrink: 0;
436
- }
437
-
438
- .step-content h4 {
439
- margin: 0 0 4px;
440
- font-size: 17px;
441
- color: var(--text-primary);
442
- }
443
-
444
- .step-content p {
445
- margin: 0;
446
- font-size: 15px;
447
- color: var(--text-secondary);
448
- }
449
-
450
- /* Footer */
451
- .footer {
452
- margin-top: 64px;
453
- text-align: center;
454
- color: var(--text-tertiary);
455
- font-size: 12px;
456
- }
457
-
458
- /* Print */
459
- @page {
460
- size: A4;
461
- margin: 24mm 20mm;
462
- }
463
-
464
- @media print {
465
- .container {
466
- padding: 0;
467
- max-width: none;
468
- }
469
-
470
- h1 {
471
- font-size: 28px;
472
- }
473
-
474
- h2 {
475
- font-size: 20px;
476
- }
477
-
478
- pre {
479
- background: var(--bg-secondary) !important;
480
- color: #1d1d1f !important;
481
- border: 1px solid var(--border-color);
482
- -webkit-print-color-adjust: exact;
483
- print-color-adjust: exact;
484
- }
485
-
486
- pre code {
487
- color: inherit !important;
488
- }
489
-
490
- /* Keep light theme syntax highlighting colors when printing */
491
- pre .c,
492
- pre .ch,
493
- pre .cm,
494
- pre .c1,
495
- pre .cs {
496
- color: #6e6e73 !important;
497
- }
498
-
499
- pre .k,
500
- pre .kc,
501
- pre .kd,
502
- pre .kn,
503
- pre .kp,
504
- pre .kr,
505
- pre .kt {
506
- color: #9b2393 !important;
507
- }
508
-
509
- pre .s,
510
- pre .s1,
511
- pre .s2,
512
- pre .sa,
513
- pre .sb,
514
- pre .sc,
515
- pre .sd,
516
- pre .se,
517
- pre .sh,
518
- pre .si,
519
- pre .sr,
520
- pre .ss,
521
- pre .sx {
522
- color: #c41a16 !important;
523
- }
524
-
525
- pre .nf,
526
- pre .fm {
527
- color: #326d74 !important;
528
- }
529
-
530
- pre .mi,
531
- pre .mf,
532
- pre .mh,
533
- pre .mo,
534
- pre .mb,
535
- pre .il {
536
- color: #1c00cf !important;
537
- }
538
-
539
- .feature-grid {
540
- grid-template-columns: repeat(2, 1fr);
541
- }
542
- }
543
- </style>
544
- {{styles}}
545
- </head>
546
-
547
- <body>
548
- <article class="container">
549
- {{body}}
550
- </article>
551
-
552
-
553
- </body>
554
-
555
- </html>
File without changes
File without changes