Commit 663b83c

xxwhirlpool  ·  2025-12-24 10:11:51 -0500 EST
parent b52f34c
fix up md2page
3 files changed,  +414, -260
+323, -190
......@@ -1,196 +1,329 @@
11 @import url('https://unpkg.com/@catppuccin/palette/css/catppuccin.css');
2- html {
3- color: var(--ctp-frappe-base);
4- background-color: var(--ctp-latte-base);
5- }
6- body {
7- margin: 0;
8- min-height: 100vh;
9- line-height: 1.7;
10- font-family: Arial, sans-serif;
11- hyphens: auto;
12- overflow-wrap: break-word;
13- text-rendering: optimizeLegibility;
14- font-kerning: normal;
15- }
16- @media (max-width: 600px) {
17- body {
18- font-size: 0.9em;
19- padding: 12px;
20- max-width: 100%;
21- }
22- h1 {
23- font-size: 1.8em;
24- }
25- }
26- @media print {
27- html {
28- background-color: white;
29- }
30- body {
31- background-color: transparent;
32- color: black;
33- font-size: 12pt;
34- }
35- p, h2, h3 {
36- orphans: 3;
37- widows: 3;
38- }
39- h2, h3, h4 {
40- page-break-after: avoid;
41- }
42- }
43- p {
44- margin: 1em 0;
45- }
46- a, a:link, a:visited, a:link:visited {
47- color: var(--ctp-latte-lavender);
48- }
49- a:hover {
50- text-decoration: none;
51- color: var(--ctp-latte-text);
52- }
53- img {
54- max-width: 100%;
55- display: block;
56- }
57- svg {
58- height: auto;
59- max-width: 100%;
60- }
61- h1, h2, h3, h4, h5, h6 {
62- margin-top: 1.4em;
63- color: var(--ctp-frappe-surface0);
64- line-height: 1.1;
65- }
66- h5, h6 {
67- font-size: 1em;
68- font-style: italic;
69- }
70- h6 {
71- font-weight: normal;
72- }
73- ol, ul {
74- padding-left: 1.7em;
75- margin-top: 1em;
76- }
77- li > ol, li > ul {
78- margin-top: 0;
79- }
80- blockquote {
81- margin: 1em 0 1em 1.7em;
82- padding-left: 1em;
83- border-left: 2px solid #e6e6e6;
84- color: #606060;
85- }
86- code {
87- font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
88- font-size: 85%;
89- margin: 0;
90- hyphens: manual;
91- }
92- pre {
93- margin: 1em 0;
94- overflow: auto;
95- padding: 1em;
96- background: #303446;
97- }
98- pre code {
99- padding: 0;
100- overflow: visible;
101- overflow-wrap: normal;
102- }
103- .sourceCode {
104- background-color: transparent;
105- overflow: visible;
106- }
107- hr {
108- background-color: #1a1a1a;
109- border: none;
110- height: 1px;
111- margin: 1em 0;
112- }
113- table {
114- margin: 1em 0;
115- border-collapse: collapse;
116- width: 100%;
117- overflow-x: auto;
118- display: block;
119- font-variant-numeric: lining-nums tabular-nums;
120- }
121- table caption {
122- margin-bottom: 0.75em;
123- }
124- tbody {
125- margin-top: 0.5em;
126- border-top: 1px solid #1a1a1a;
127- border-bottom: 1px solid #1a1a1a;
128- }
129- th {
130- border-top: 1px solid #1a1a1a;
131- padding: 0.25em 0.5em 0.25em 0.5em;
132- }
133- td {
134- padding: 0.125em 0.5em 0.25em 0.5em;
135- }
136- header {
137- margin-bottom: 4em;
138- text-align: center;
139- }
140- #TOC li {
141- list-style: none;
142- }
143- #TOC ul {
144- padding-left: 1.3em;
145- }
146- #TOC > ul {
147- padding-left: 0;
148- }
149- #TOC a:not(:hover) {
150- text-decoration: none;
151- }
152- code{white-space: pre-wrap;}
153- span.smallcaps{font-variant: small-caps;}
154- div.columns{display: flex; gap: min(4vw, 1.5em);}
155- div.column{flex: auto; overflow-x: auto;}
156- div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
157- /* The extra [class] is a hack that increases specificity enough to
158- override a similar rule in reveal.js */
159- ul.task-list[class]{list-style: none;}
160- ul.task-list li input[type="checkbox"] {
161- font-size: inherit;
162- width: 0.8em;
163- margin: 0 0.8em 0.2em -1.6em;
164- vertical-align: middle;
165- }
166- .display.math{display: block; text-align: center; margin: 0.5rem auto;}
167-
168- ::selection {
169- color: var(--ctp-latte-surface1);
170- background: var(--ctp-frappe-crust);
171- }
172-
173- .flow > * + * {
174- margin-block-start: var(--flow-space, 1em);
175- }
2+@import url(https://fonts.bunny.net/css?family=inter:400);
3+@import url(https://fonts.bunny.net/css?family=jetbrains-mono:400);
4+:root {
5+ --text-color: var(--ctp-frappe-base);
6+ --heading-color: var(--ctp-frappe-surface0);
7+ --accent-color: var(--ctp-latte-lavender);
8+ --accent-color-dark: color-mix(in srgb, var(--accent-color), black);
9+ --base-color: var(--ctp-latte-base);
10+ --font-sans-serif: "Inter";
11+ --font-monospace: "JetBrains Mono";
17612
177- :is(h1, h2, h3, blockquote) {
178- --flow-space: 1.5em;
179- }
180-
181- :is(h1, h2, h3) + * {
182- --flow-space: 0.5em;
183- }
13+ --step--2: clamp(0.7813rem, 0.7769rem + 0.0192vw, 0.8rem);
14+ --step--1: clamp(0.9375rem, 0.9231rem + 0.0641vw, 1rem);
15+ --step-0: clamp(1.125rem, 1.0962rem + 0.1282vw, 1.25rem);
16+ --step-1: clamp(1.35rem, 1.301rem + 0.2179vw, 1.5625rem);
17+ --step-2: clamp(1.62rem, 1.5431rem + 0.3417vw, 1.9531rem);
18+ --step-3: clamp(1.944rem, 1.8292rem + 0.5102vw, 2.4414rem);
19+ --step-4: clamp(2.3328rem, 2.1669rem + 0.7374vw, 3.0518rem);
20+ --step-5: clamp(2.7994rem, 2.5651rem + 1.0414vw, 3.8147rem);
21+}
18422
185- article > * {
186- max-width: 65ch;
23+@media (max-width: 600px) {
24+ body {
25+ font-size: 0.9em;
26+ padding: 12px;
27+ max-width: 100%;
18728 }
188-
189- article {
190- max-width: 65ch;
191- margin-inline: auto;
29+ h1 {
30+ font-size: 1.8em;
19231 }
193-
194- blockquote {
195- max-width: 50ch;
32+}
33+
34+@media print {
35+ html {
36+ background-color: var(--base-color);
19637 }
38+ body {
39+ background-color: transparent;
40+ color: var(--text-color);
41+ font-size: 12pt;
42+ }
43+ p, h2, h3 {
44+ orphans: 3;
45+ widows: 3;
46+ }
47+ h2, h3, h4 {
48+ page-break-after: avoid;
49+ }
50+}
51+
52+html {
53+ color: var(--text-color);
54+ background-color: var(--base-color);
55+}
56+
57+body {
58+ margin-block: 0;
59+ margin-inline: 0;
60+ min-height: 100vh;
61+ line-height: 1.7;
62+ font-family: var(--font-sans-serif), sans-serif;
63+ hyphens: auto;
64+ overflow-wrap: break-word;
65+ text-rendering: optimizeLegibility;
66+ font-kerning: normal;
67+}
68+
69+p {
70+ margin-block-start: 1.4em;
71+ margin-block-end: 0;
72+}
73+
74+a, a:link, a:visited, a:link:visited {
75+ color: var(--accent-color);
76+ text-underline-offset: .3rem;
77+}
78+
79+a:hover {
80+ text-decoration-color: color-mix(in srgb, currentColor, transparent 50%);
81+ color: var(--accent-color-dark);
82+}
83+
84+img {
85+ max-width: 100%;
86+ display: block;
87+}
88+
89+svg {
90+ height: auto;
91+ max-width: 100%;
92+}
93+
94+h1, h2, h3, h4, h5, h6 {
95+ margin-block: 1.4em;
96+ margin-inline: 0;
97+ color: var(--heading-color);
98+ line-height: 1.1;
99+ text-wrap: balance;
100+ max-width: 50ch;
101+}
102+
103+h1 {
104+ margin-block-start: 1.4em;
105+ margin-block-end: auto;
106+ text-align: center;
107+ font-size: var(--step-3);
108+}
109+
110+h2 {
111+ font-size: var(--step-2);
112+}
113+
114+h3 {
115+ font-size: var(--step-1);
116+}
117+
118+h4 {
119+ font-size: var(--step-0);
120+}
121+
122+h5 {
123+ font-size: var(--step--1);
124+}
125+
126+h6 {
127+ font-size: var(--step--2);
128+}
129+
130+ol, ul {
131+ padding-inline-start: 1.7em;
132+ margin-block-start: 1em;
133+}
134+
135+li > ol, li > ul {
136+ margin-block-start: 0;
137+}
138+
139+blockquote {
140+ margin-block: 1em;
141+ padding-inline-start: 1em;
142+ border-inline-start: 2px solid #e6e6e6;
143+ color: #606060;
144+}
145+
146+code {
147+ font-family: var(--font-monospace), monospace;
148+ font-size: 85%;
149+ margin-block: 0;
150+ margin-inline: 0;
151+ hyphens: manual;
152+}
153+
154+pre {
155+ margin-block-start: 1em;
156+ margin-block-end: 0;
157+ padding-block: 1em;
158+ padding-inline: 1em;
159+ overflow: auto;
160+ background: #303446;
161+}
162+
163+pre code {
164+ padding-block: 0;
165+ padding-inline: 0;
166+ overflow: visible;
167+ overflow-wrap: normal;
168+}
169+
170+.sourceCode {
171+ background-color: transparent;
172+ overflow: visible;
173+}
174+
175+hr {
176+ background-color: var(--accent-color);
177+ border: none;
178+ height: 1px;
179+ margin-block: 1.4em;
180+ max-width: 1200px;
181+ width: 45ch;
182+}
183+
184+table {
185+ margin-block-start: 1.4em;
186+ margin-block-end: 0;
187+ border-collapse: collapse;
188+ width: 100%;
189+ overflow-x: auto;
190+ display: block;
191+ font-variant-numeric: lining-nums tabular-nums;
192+}
193+
194+table caption {
195+ margin-block-end: 0.75em;
196+}
197+
198+tbody {
199+ margin-block-start: 0.5em;
200+ border-block-start: 1px solid #1a1a1a;
201+ border-block-end: 1px solid #1a1a1a;
202+}
203+
204+th {
205+ border-block-start: 1px solid #1a1a1a;
206+ padding-block-start: 0.25em;
207+ padding-block-end: 0.25em;
208+ padding-inline-end: 0.5em;
209+ padding-inline-start: 0.5em;
210+}
211+
212+td {
213+ padding-block-start: 0.125em;
214+ padding-block-end: 0.25em;
215+ padding-inline-start: 0.5em;
216+ padding-inline-end: 0.5em;
217+}
218+
219+header {
220+ margin-block-end: 4em;
221+ margin-inline: auto;
222+ max-width: 90ch;
223+}
224+
225+.metadata > p time {
226+ color: var(--accent-color);
227+}
228+
229+#TOC li {
230+ list-style: none;
231+}
232+
233+#TOC ul {
234+ padding-inline-start: 1.3em;
235+}
236+
237+#TOC > ul {
238+ padding-inline-start: 0;
239+}
240+
241+#TOC a:not(:hover) {
242+ text-decoration: none;
243+}
244+
245+code {
246+ white-space: pre-wrap;
247+}
248+
249+span.smallcaps {
250+ font-variant: small-caps;
251+}
252+
253+div.columns {
254+ display: flex;
255+ gap: min(4vw, 1.5em);
256+}
257+
258+div.column {
259+ flex: auto;
260+ overflow-x: auto;
261+}
262+
263+div.hanging-indent {
264+ margin-inline-start: 1.5em;
265+ text-indent: -1.5em;
266+}
267+
268+ul.task-list[class] {
269+ list-style: none;
270+}
271+
272+ul.task-list li input[type="checkbox"] {
273+ font-size: inherit;
274+ width: 0.8em;
275+ margin-block-start: 0;
276+ margin-block-end: 0.2em;
277+ margin-inline-start: -1.6em;
278+ margin-inline-end: 0.8em;
279+ vertical-align: middle;
280+}
281+
282+.display.math {
283+ display: block;
284+ text-align: center;
285+ margin-block-start: 0.5rem;
286+ margin-block-end: auto;
287+}
288+
289+::selection {
290+ color: var(--base-color);
291+ background: var(--text-color);
292+}
293+
294+.hljs::selection, .hljs > span::selection, .hljs > span span::selection {
295+ background-color: var(--accent-color-dark);
296+}
297+
298+.flow > * + * {
299+ margin-block-start: var(--flow-space, 1em);
300+}
301+
302+:is(h1, h2, h3, blockquote) {
303+ --flow-space: 1.5em;
304+}
305+
306+:is(h1, h2, h3) + * {
307+ --flow-space: 0.5em;
308+}
309+
310+article {
311+ max-width: 90ch;
312+ margin-inline: auto;
313+}
314+
315+main {
316+ margin-block-end: 3em;
317+}
318+
319+blockquote {
320+ max-width: 50ch;
321+}
322+
323+.e-content {
324+ --flow-space: 2.5rem;
325+}
326+
327+.e-content :is(h2 + *, h3 + *, h4 + *) {
328+ --flow-space: 1rem
329+}
+90, -69
......@@ -1,88 +1,109 @@
11 <!DOCTYPE html>
22 <html lang="en">
3+
34 <head>
4- <meta charset="utf-8" />
5- <meta name="generator" content="pandoc" />
6- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7-$for(author-meta)$
8- <meta name="author" content="$author-meta$" />
9-$endfor$
10-$if(date-meta)$
11- <meta name="dcterms.date" content="$date-meta$" />
12-$endif$
13-$if(keywords)$
14- <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
15-$endif$
16-$if(description-meta)$
17- <meta name="description" content="$description-meta$" />
18-$endif$
19- <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
5+ <meta charset="utf-8" />
6+ <meta name="generator" content="pandoc" />
7+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
8+ $for(author-meta)$
9+ <meta name="author" content="$author-meta$" />
10+ $endfor$
11+ $if(date-meta)$
12+ <meta name="dcterms.date" content="$date-meta$" />
13+ $endif$
14+ $if(keywords)$
15+ <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
16+ $endif$
17+ $if(description-meta)$
18+ <meta name="description" content="$description-meta$" />
19+ $endif$
20+ <title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
21+
22+ <link rel="stylesheet" href="https://unpkg.com/@catppuccin/highlightjs@1.0.1/css/catppuccin-frappe.css">
23+
24+ <link rel="stylesheet" href="./md2html.css">
25+
26+ <script src="https://unpkg.com/@highlightjs/cdn-assets@11.9.0/highlight.min.js"></script>
2027
21- <link rel="stylesheet" href="https://unpkg.com/@catppuccin/highlightjs@1.0.1/css/catppuccin-frappe.css">
28+ <script>
29+ document.getElementById("sourceCode").classList.add("language ");
30+ </script>
2231
23- <link rel="stylesheet" href="./md2html.css">
24-
25- <script src="https://unpkg.com/@highlightjs/cdn-assets@11.9.0/highlight.min.js"></script>
26-
27- <script>
28- document.getElementById("sourceCode").classList.add("language ");
29- </script>
30-
31-$for(header-includes)$
32- $header-includes$
33-$endfor$
34-$if(math)$
35- $math$
36-$endif$
32+ $for(header-includes)$
33+ $header-includes$
34+ $endfor$
35+ $if(math)$
36+ $math$
37+ $endif$
3738 </head>
39+
3840 <body>
41+
3942 <script>hljs.highlightAll();</script>
40-<article class="flow">
41-$for(include-before)$
42-$include-before$
43-$endfor$
44-$if(title)$
45-<header id="title-block-header">
46-<h1 class="title">$title$</h1>
47-$if(subtitle)$
48-<p class="subtitle">$subtitle$</p>
49-$endif$
50-<p>
51-$if(date)$
52-published <span class="date">$date$</span>
53-$endif$
54-</p>
55-<p>
56-$if(lastmodified)$
57-last edited <span class="date">$lastmodified$</span>
58-$endif$
59-</p>
60-<p>
61-$for(author)$
62-by <a href="https://girlonthemoon.xyz/"><span class="author">$author$</span></a>
63-$endfor$
64-</p>
65-$if(abstract)$
66-<div class="abstract">
67-<div class="abstract-title">$abstract-title$</div>
68-$abstract$
69-</div>
70-$endif$
43+
44+<main class="h-entry">
45+ <article class="flow e-content">
46+ $for(include-before)$
47+ $include-before$
48+ $endfor$
49+
50+ $if(title)$
51+ <header id="title-block-header">
52+ <h1 class="title p-name">$title$</h1>
53+
54+ <div class="metadata">
55+ $if(subtitle)$
56+ <p class="subtitle">$subtitle$</p>
57+ $endif$
58+
59+ <p>
60+ $if(date)$
61+ published <span class="date"><time class="dt-published" datetime="$date$">$date$</time></span>
62+ $endif$
63+ </p>
64+
65+ <p>
66+ $if(lastmodified)$
67+ last edited <span class="date"><time class="dt-updated" datetime="$lastmodified$">$lastmodified$</time></span>
68+ $endif$
69+ </p>
70+
71+ <p>
72+ $for(author)$
73+ by <a href="https://girlonthemoon.xyz/"><span class="author">$author$</span></a>
74+ $endfor$
75+ </p>
76+
77+ $if(abstract)$
78+ <div class="abstract">
79+ <div class="abstract-title">$abstract-title$</div>
80+ $abstract$
81+ </div>
82+ $endif$
83+ </div>
7184 </header>
7285 $endif$
86+
7387 $if(toc)$
74-<nav id="$idprefix$TOC" role="doc-toc">
75-$if(toc-title)$
76-<h2 id="$idprefix$toc-title">$toc-title$</h2>
77-$endif$
78-$table-of-contents$
79-</nav>
88+ <nav id="$idprefix$TOC" role="doc-toc">
89+ $if(toc-title)$
90+
91+ <h2 id="$idprefix$toc-title">$toc-title$</h2>
92+ $endif$
93+
94+ $table-of-contents$
95+ </nav>
8096 $endif$
8197
8298 $body$
99+
83100 $for(include-after)$
84-$include-after$
101+ $include-after$
85102 $endfor$
86103 </article>
104+
105+</main>
106+
107+
87108 </body>
88109 </html>
+1, -1
......@@ -6,4 +6,4 @@ HTML="./md2html.html"
66
77 CSS="./md2html.css"
88
9-pandoc --standalone "$FILE.md" --template=$HTML --no-highlight -o "$FILE.html"
9+pandoc --standalone "$FILE.md" --template=$HTML --no-highlight --wrap=none -o "$FILE.html"