@korbiniankuhn/markdown-slides 1.0.0-rc.2 → 1.0.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/CHANGELOG.md +58 -0
- package/README.md +209 -35
- package/app/css/styles.css +1 -1
- package/app/scripts/slides.js +54 -4
- package/cli.js +119 -96
- package/package.json +2 -2
- package/app/scripts/mathjax/core.js +0 -1
- package/app/scripts/mathjax/loader.js +0 -1
- package/app/scripts/mathjax/mml-chtml-nofont.js +0 -1
- package/app/scripts/mathjax/mml-chtml.js +0 -1
- package/app/scripts/mathjax/mml-svg-nofont.js +0 -1
- package/app/scripts/mathjax/mml-svg.js +0 -1
- package/app/scripts/mathjax/startup.js +0 -1
- package/app/scripts/mathjax/tex-chtml-nofont.js +0 -1
- package/app/scripts/mathjax/tex-chtml.js +0 -1
- package/app/scripts/mathjax/tex-mml-chtml-nofont.js +0 -1
- package/app/scripts/mathjax/tex-mml-chtml.js +0 -1
- package/app/scripts/mathjax/tex-mml-svg-nofont.js +0 -1
- package/app/scripts/mathjax/tex-mml-svg.js +0 -1
- package/app/scripts/mathjax/tex-svg-nofont.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,64 @@ All notable changes to markdown-slides. The format follows [Keep a Changelog](ht
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.0.0] - 2026-11-22
|
|
10
|
+
|
|
11
|
+
### Upgrade notes
|
|
12
|
+
|
|
13
|
+
1. **Blockquotes that start with `[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]` or `[!CAUTION]` are now alerts.** Before, the marker was shown as text in a plain blockquote. Find them (matches inside code blocks are not affected):
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
grep -rnE --include='*.md' --exclude-dir=node_modules --exclude-dir=public '^ {0,3}> ?\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]' .
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. **`[^label]: text` on a line of its own is now a footnote definition.** It is no longer shown where it is written, and `[^label]` in the text of the same file becomes a footnote reference. Find definitions (matches inside code blocks are not affected):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
grep -rnE --include='*.md' --exclude-dir=node_modules --exclude-dir=public '^ {0,3}\[\^[^]]+\]:' .
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
3. **Headings with letters beyond A–Z get other anchors.** Letters like ä, ö, ü or é were dropped from the anchor of a heading: `## Übersicht` had the anchor `#-bersicht`, now it is `#übersicht`. Links to such anchors, e.g. `[Overview](#-bersicht)` or bookmarks, need the new anchor. Find headings with such letters:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
LC_ALL=C grep -rnE --include='*.md' --exclude-dir=node_modules --exclude-dir=public '^#{1,6} .*[^ -~]' .
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
4. **Headings now render Markdown.** `` ## Use `code` `` showed the backticks; now it shows code, like in the rest of the text. HTML in a heading is now handled like in the text too: write `\<T>` or `` `<T>` `` to show `<T>`. Find headings with Markdown or HTML:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
grep -rnE --include='*.md' --exclude-dir=node_modules --exclude-dir=public '^#{1,6} .*[`*_<\\]' .
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
5. **`--allowed-files` and `--ignored-files` apply together.** Before, `--ignored-files` was skipped when `--allowed-files` was set. Now a file must match `--allowed-files` and not match `--ignored-files`. Check builds that use both options:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
grep -rnE --exclude-dir=node_modules -- '--allowed-files.*--ignored-files|--ignored-files.*--allowed-files' .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- GitHub-style alerts: `> [!NOTE]`, `> [!TIP]`, `> [!IMPORTANT]`, `> [!WARNING]` and `> [!CAUTION]`, with English or German titles depending on `--language`.
|
|
46
|
+
- Footnotes: `[^1]` in the text and `[^1]: …` anywhere in the file. They are shown at the bottom of the slide that refers to them and numbered per slide, with links to the footnote and back.
|
|
47
|
+
- `--language de` translates the texts of the page: buttons (Vollbild, Kopieren, Hell/Dunkel), labels for screen readers (e.g. "Seite 3 von 12") and messages ("In die Zwischenablage kopiert"). Before, only alert titles and footnotes were translated, and screen readers read the English texts with German pronunciation.
|
|
48
|
+
- `--allowed-files` and `--ignored-files` take glob patterns like in `.gitignore`, e.g. `'*.md'`, `'chapter-*.md'` or `drafts/` (only directories). A pattern that matches nothing, e.g. a typo, is reported as a warning.
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- Pages only load MathJax (2 MB) when they contain a formula and Mermaid (6 MB) when they contain a diagram, and Mermaid no longer delays showing the page. Most pages load about 8 MB less.
|
|
53
|
+
- The package and every built deck are about 12 MB smaller: only the MathJax bundle that the slides use is included (npm download 7.3 MB instead of 10.8 MB).
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- Headings render inline Markdown (`code`, **bold**, links) instead of showing its characters, and `<` in a heading no longer breaks the page. The table of contents shows the text without Markdown.
|
|
58
|
+
- A heading no longer gets the id of an element of the page, e.g. `## Menu` took the id of the menu, so its entry in the table of contents jumped to the menu instead of the slide. It gets `#menu-2` instead.
|
|
59
|
+
- Mermaid diagrams with `<` or `>`, e.g. `<<interface>>` in class diagrams, are no longer cut off. Diagrams in a `~~~mermaid` fence are drawn, too.
|
|
60
|
+
- Code blocks with more than a language in the info string, e.g. ` ```js {1,3} `, are highlighted.
|
|
61
|
+
- `#` headings no longer start with a space.
|
|
62
|
+
- Links to the main page (`README.md`) point to `index.html` instead of the missing `README.html`, and links with an anchor (`chapter.md#intro`) point to the page (`chapter.html#intro`). Links to Markdown files in subdirectories are kept: these files are copied, not converted.
|
|
63
|
+
- Links to `http://localhost` and other addresses without a domain ending open in a new tab like other external links.
|
|
64
|
+
- The copy button of code works on `http://` pages other than localhost (e.g. a server in the local network), where browsers have no Clipboard API. If copying fails, it says so instead of nothing.
|
|
65
|
+
- Long titles no longer widen the menu, which made its title run under the close button. The menu has a fixed width, and titles and table of contents entries wrap. In the header, long titles are cut off with "…" (two lines on phones).
|
|
66
|
+
|
|
9
67
|
## [1.0.0-rc.2] - 2026-11-21
|
|
10
68
|
|
|
11
69
|
### Upgrade notes
|
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Markdown-Slides
|
|
2
2
|
|
|
3
|
-
Generate HTML
|
|
3
|
+
Generate HTML slides from Markdown files
|
|
4
4
|
|
|
5
5
|
<!-- slide -->
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- ✨ Beautiful slides including a pretty title slide
|
|
10
|
-
- 📱 Slides are fully
|
|
10
|
+
- 📱 Slides are fully responsive for mobile devices and small screens
|
|
11
11
|
- 🌓 Light and Dark Mode
|
|
12
12
|
- 🖨️ Print styles to create PDFs in the browser
|
|
13
13
|
- ♿ HTML slides are accessible
|
|
@@ -15,12 +15,13 @@ Generate HTML-Slides with from Markdown-Files
|
|
|
15
15
|
- 💡 Code highlighting with highlight.js
|
|
16
16
|
- ➗ Equations with MathJax
|
|
17
17
|
- 📈 Diagrams with Mermaid
|
|
18
|
+
- 💬 Alerts and footnotes like on GitHub
|
|
18
19
|
- #️⃣ Slide numbers will be generated automatically
|
|
19
20
|
- 📅 Date of the build will be included as a versioning
|
|
20
21
|
- 📚 Supports multiple markdown files to split your presentation in subslides
|
|
21
|
-
- ➡️ Use space and
|
|
22
|
+
- ➡️ Use space, arrow and page keys to navigate
|
|
22
23
|
- 🎨 Easily override the Stuttgart Media University (HDM) theme with custom colors and logos
|
|
23
|
-
- 🚀
|
|
24
|
+
- 🚀 Publish your slides with GitLab or GitHub Pages
|
|
24
25
|
|
|
25
26
|
<!-- slide -->
|
|
26
27
|
|
|
@@ -82,36 +83,63 @@ Convert current directory to slides into a output directory `public`:
|
|
|
82
83
|
npx @korbiniankuhn/markdown-slides
|
|
83
84
|
```
|
|
84
85
|
|
|
85
|
-
|
|
86
|
+
Only use certain files and directories of the input directory, by name or with glob patterns like in `.gitignore`. Quote patterns with `*`, so the shell passes them on:
|
|
86
87
|
|
|
87
88
|
```bash
|
|
88
|
-
npx @korbiniankuhn/markdown-slides --allowed-files .md images
|
|
89
|
+
npx @korbiniankuhn/markdown-slides --allowed-files README.md 'chapter-*.md' images '*.css'
|
|
90
|
+
npx @korbiniankuhn/markdown-slides --ignored-files '*.pdf' drafts/
|
|
89
91
|
```
|
|
90
92
|
|
|
91
93
|
CLI arguments:
|
|
92
94
|
|
|
93
|
-
| Argument
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
95
|
+
| Argument | Description | Default | Required |
|
|
96
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------------------------- | --------- | -------- |
|
|
97
|
+
| `-i`, `--in` | Input directory | . | false |
|
|
98
|
+
| `-o`, `--out` | Output directory | public | false |
|
|
99
|
+
| `-l`, `--language` | `en` or `de`: language of the page and its texts (buttons, labels for screen readers, alerts), and the default institution | en | false |
|
|
100
|
+
| `--institution` | Custom institution name | undefined | false |
|
|
101
|
+
| `--title` | Lecture title for the back link on sub-pages, otherwise the first headline is used | undefined | false |
|
|
102
|
+
| `--toc-numbering` | Number the headings, `true` or `false` | true | false |
|
|
103
|
+
| `--allowed-files` | Only use files and directories of the input directory that match these names or patterns | undefined | false |
|
|
104
|
+
| `--ignored-files` | Ignore files and directories that match these names or patterns (dotfiles are always ignored) | undefined | false |
|
|
103
105
|
|
|
104
106
|
<!-- slide -->
|
|
105
107
|
|
|
106
|
-
##
|
|
108
|
+
## Writing slides
|
|
109
|
+
|
|
110
|
+
<!-- slide -->
|
|
111
|
+
|
|
112
|
+
### Title slide
|
|
113
|
+
|
|
114
|
+
Everything before the first `<!-- slide -->` is the title slide:
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
# Lecture Title
|
|
118
|
+
|
|
119
|
+
@module[123456]
|
|
120
|
+
@semester[Summer 2026]
|
|
121
|
+
|
|
122
|
+
Jane Doe [jane@](mailto:jane@example.com)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- The first `#` heading is the title of the page, and of the lecture on sub-pages (or `--title`)
|
|
126
|
+
- `@module[…]` and `@semester[…]` are shown as labels
|
|
127
|
+
- The institution comes from `--institution`, the date of the build is added automatically
|
|
107
128
|
|
|
108
129
|
<!-- slide -->
|
|
109
130
|
|
|
110
131
|
### Slides
|
|
111
132
|
|
|
112
|
-
| Identifier
|
|
113
|
-
|
|
|
114
|
-
| `<!-- slide -->`
|
|
133
|
+
| Identifier | Description |
|
|
134
|
+
| ------------------ | ---------------------------------------------- |
|
|
135
|
+
| `<!-- slide -->` | Starts a new slide, on a line of its own |
|
|
136
|
+
| `## Heading` | Numbered and listed in the table of contents |
|
|
137
|
+
| `### Heading` | Numbered and listed in the table of contents |
|
|
138
|
+
| `<!-- comment -->` | Other comments are removed, e.g. notes for you |
|
|
139
|
+
|
|
140
|
+
All of [GitHub Flavored Markdown](https://github.github.com/gfm/) works, e.g. tables, task lists and ~~strikethrough~~.
|
|
141
|
+
|
|
142
|
+
<!-- slide -->
|
|
115
143
|
|
|
116
144
|
### Spacer
|
|
117
145
|
|
|
@@ -127,6 +155,9 @@ CLI arguments:
|
|
|
127
155
|
|
|
128
156
|
### Layout
|
|
129
157
|
|
|
158
|
+
<!-- row -->
|
|
159
|
+
<!-- col -->
|
|
160
|
+
|
|
130
161
|
| Identifier | Description |
|
|
131
162
|
| ------------------ | ---------------------- |
|
|
132
163
|
| `<!-- row -->` | Starts a row container |
|
|
@@ -134,7 +165,10 @@ CLI arguments:
|
|
|
134
165
|
| `<!-- col -->` | Starts a col container |
|
|
135
166
|
| `<!-- col:end -->` | Ends a col container |
|
|
136
167
|
|
|
137
|
-
|
|
168
|
+
Columns have the same width. On phones, they are shown below each other.
|
|
169
|
+
|
|
170
|
+
<!-- col:end -->
|
|
171
|
+
<!-- col -->
|
|
138
172
|
|
|
139
173
|
```markdown
|
|
140
174
|
<!-- row -->
|
|
@@ -151,42 +185,80 @@ Right
|
|
|
151
185
|
<!-- row:end -->
|
|
152
186
|
```
|
|
153
187
|
|
|
188
|
+
<!-- col:end -->
|
|
189
|
+
<!-- row:end -->
|
|
190
|
+
|
|
154
191
|
<!-- slide -->
|
|
155
192
|
|
|
156
|
-
### Images
|
|
193
|
+
### Images and videos
|
|
157
194
|
|
|
158
|
-
Set the width and alignment of an image
|
|
195
|
+
Set the width and alignment of an image or video with an attribute block directly after it. The alt text stays as it is.
|
|
159
196
|
|
|
160
197
|
| Attribute | Values | Default |
|
|
161
198
|
| --------- | ------------------------------------------- | ------------- |
|
|
162
199
|
| `width` | Percentage or pixels, e.g. `70%` or `400px` | Original size |
|
|
163
200
|
| `align` | `left`, `center` or `right` | `center` |
|
|
164
201
|
|
|
165
|
-
#### Example
|
|
166
|
-
|
|
167
202
|
```markdown
|
|
168
203
|
{width=70% align=left}
|
|
204
|
+
|
|
205
|
+
{width=50%}
|
|
169
206
|
```
|
|
170
207
|
|
|
171
|
-
|
|
208
|
+
`.mp4` and `.webm` files are shown as videos. The alt text describes the image or video for screen readers; without one, the build warns. Invalid attributes stop the build.
|
|
172
209
|
|
|
173
210
|
<!-- slide -->
|
|
174
211
|
|
|
175
|
-
###
|
|
212
|
+
### Code
|
|
176
213
|
|
|
177
|
-
|
|
214
|
+
Code blocks are highlighted with [highlight.js](https://highlightjs.org/) when the language is set, and have a button to copy the code:
|
|
178
215
|
|
|
179
|
-
|
|
216
|
+
```python
|
|
217
|
+
def greet(name):
|
|
218
|
+
return f"Hello {name}!"
|
|
219
|
+
```
|
|
180
220
|
|
|
181
|
-
|
|
182
|
-
- style.css:
|
|
221
|
+
Long lines scroll sideways on the slide and wrap when printed.
|
|
183
222
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
223
|
+
<!-- slide -->
|
|
224
|
+
|
|
225
|
+
### Multiple files and links
|
|
226
|
+
|
|
227
|
+
- Every Markdown file in the input directory becomes a page: `README.md` is `index.html` (required), `chapter-1.md` is `chapter-1.html`
|
|
228
|
+
- Link to another page with its Markdown file: `[Chapter 1](chapter-1.md)`. Sub-pages link back to `index.html` with the lecture title.
|
|
229
|
+
- All other files and directories, e.g. `images`, are copied as they are, so relative links keep working
|
|
230
|
+
- Links to other websites open in a new tab
|
|
231
|
+
|
|
232
|
+
<!-- slide -->
|
|
233
|
+
|
|
234
|
+
### Alerts
|
|
235
|
+
|
|
236
|
+
Highlight a note, tip or warning like on GitHub. The title follows `--language`.
|
|
237
|
+
|
|
238
|
+
```markdown
|
|
239
|
+
> [!TIP]
|
|
240
|
+
> Build the slides locally before you push.
|
|
188
241
|
```
|
|
189
242
|
|
|
243
|
+
> [!TIP]
|
|
244
|
+
> Build the slides locally before you push.
|
|
245
|
+
|
|
246
|
+
Also available: `[!NOTE]`, `[!IMPORTANT]`, `[!WARNING]` and `[!CAUTION]`.
|
|
247
|
+
|
|
248
|
+
<!-- slide -->
|
|
249
|
+
|
|
250
|
+
### Footnotes
|
|
251
|
+
|
|
252
|
+
Footnotes[^footnotes] are shown at the bottom of the slide that refers to them, and numbered per slide.
|
|
253
|
+
|
|
254
|
+
```markdown
|
|
255
|
+
Footnotes[^footnotes] are shown at the bottom of the slide.
|
|
256
|
+
|
|
257
|
+
[^footnotes]: Defined anywhere in the file.
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
[^footnotes]: Defined anywhere in the file, like on GitHub.
|
|
261
|
+
|
|
190
262
|
<!-- slide -->
|
|
191
263
|
|
|
192
264
|
### MathJax
|
|
@@ -213,3 +285,105 @@ sequenceDiagram
|
|
|
213
285
|
John-->>Alice: Great!
|
|
214
286
|
Alice-)John: See you later!
|
|
215
287
|
```
|
|
288
|
+
|
|
289
|
+
<!-- slide -->
|
|
290
|
+
|
|
291
|
+
## Presenting
|
|
292
|
+
|
|
293
|
+
<!-- slide -->
|
|
294
|
+
|
|
295
|
+
### Navigation
|
|
296
|
+
|
|
297
|
+
| Key | Action |
|
|
298
|
+
| ----------------------------- | -------------- |
|
|
299
|
+
| Right arrow, Page Down, Space | Next slide |
|
|
300
|
+
| Left arrow, Page Up | Previous slide |
|
|
301
|
+
|
|
302
|
+
- The **Fullscreen** button on the title slide shows the slides without the browser around them
|
|
303
|
+
- The button with the title at the top left opens the table of contents, which also has buttons for the light and dark theme (**Auto** follows the system).
|
|
304
|
+
- Scrolling works too, e.g. for slides that are longer than the screen
|
|
305
|
+
|
|
306
|
+
<!-- slide -->
|
|
307
|
+
|
|
308
|
+
### Printing and PDF
|
|
309
|
+
|
|
310
|
+
Print the page in the browser (e.g. <kbd>Ctrl</kbd>+<kbd>P</kbd>, or <kbd>Cmd</kbd>+<kbd>P</kbd> on a Mac) and choose "Save as PDF":
|
|
311
|
+
|
|
312
|
+
- Every `##` heading starts a new page, and pages use the light theme
|
|
313
|
+
- Links to other websites show their address
|
|
314
|
+
- Videos show their description and link instead
|
|
315
|
+
|
|
316
|
+
<!-- slide -->
|
|
317
|
+
|
|
318
|
+
## Custom Theme
|
|
319
|
+
|
|
320
|
+
Override the default theme with these files in the root of your project:
|
|
321
|
+
|
|
322
|
+
| File | Use |
|
|
323
|
+
| ------------------------------------ | ---------------------------------- |
|
|
324
|
+
| `logo-light.svg` and `logo-dark.svg` | Logos for the light and dark theme |
|
|
325
|
+
| `favicon.ico` | Icon in the browser tab |
|
|
326
|
+
| `*.css` | Styles, included in every page |
|
|
327
|
+
| `*.js` | Scripts, included in every page |
|
|
328
|
+
|
|
329
|
+
Setting the primary color is usually enough. In the dark theme, it is lightened where needed, so text stays readable:
|
|
330
|
+
|
|
331
|
+
```css
|
|
332
|
+
:root {
|
|
333
|
+
--color-primary: blue;
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
<!-- slide -->
|
|
338
|
+
|
|
339
|
+
## Publish with GitLab Pages
|
|
340
|
+
|
|
341
|
+
Add a `.gitlab-ci.yml` to your repository. Every push to the default branch publishes the slides:
|
|
342
|
+
|
|
343
|
+
```yaml
|
|
344
|
+
pages:
|
|
345
|
+
image: node:lts-alpine
|
|
346
|
+
script:
|
|
347
|
+
- npx @korbiniankuhn/markdown-slides -o public
|
|
348
|
+
artifacts:
|
|
349
|
+
paths:
|
|
350
|
+
- public
|
|
351
|
+
rules:
|
|
352
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Add CLI parameters to the `npx` line, e.g. `--language de`. Pin a version (`@korbiniankuhn/markdown-slides@1.0.0`) to update on your own schedule.
|
|
356
|
+
|
|
357
|
+
<!-- slide -->
|
|
358
|
+
|
|
359
|
+
## Publish with GitHub Pages
|
|
360
|
+
|
|
361
|
+
Set **Settings → Pages → Source** to **GitHub Actions**, and add `.github/workflows/slides.yml`:
|
|
362
|
+
|
|
363
|
+
```yaml
|
|
364
|
+
name: Slides
|
|
365
|
+
on:
|
|
366
|
+
push:
|
|
367
|
+
branches: [main]
|
|
368
|
+
permissions:
|
|
369
|
+
contents: read
|
|
370
|
+
pages: write
|
|
371
|
+
id-token: write
|
|
372
|
+
jobs:
|
|
373
|
+
deploy:
|
|
374
|
+
runs-on: ubuntu-latest
|
|
375
|
+
environment:
|
|
376
|
+
name: github-pages
|
|
377
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
378
|
+
steps:
|
|
379
|
+
- uses: actions/checkout@v7
|
|
380
|
+
- uses: actions/setup-node@v7
|
|
381
|
+
with:
|
|
382
|
+
node-version: lts/*
|
|
383
|
+
- run: npx @korbiniankuhn/markdown-slides -o public
|
|
384
|
+
- uses: actions/upload-pages-artifact@v5
|
|
385
|
+
with:
|
|
386
|
+
path: public
|
|
387
|
+
- id: deployment
|
|
388
|
+
uses: actions/deploy-pages@v5
|
|
389
|
+
```
|
package/app/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--color-bg: #f6f8fa;--color-bg-slide: #fff;--color-bg-code: #f6f8fa;--color-bg-backdrop: rgba(0, 0, 0, .3);--color-text: #222;--color-border: #eaedef;--color-primary: #e31134;--color-primary-text: var(--color-primary);--color-white: #fff;--color-black: #222;--color-grey: #696969}@media not print{body.dark{--color-bg: #000000;--color-bg-slide: #0e1117;--color-bg-code: #171b22;--color-text: #e6edf3;--color-border: #31363d;--color-grey: #888;--color-primary-text: oklch(from var(--color-primary) max(l, .7) c h)}}@font-face{font-family:Roboto Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./roboto-latin-wght-normal-3ZSHNGCF.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./roboto-latin-ext-wght-normal-QRJLAF7B.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inconsolata Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url("./inconsolata-latin-wght-normal-ZTY4F4RJ.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inconsolata Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url("./inconsolata-latin-ext-wght-normal-TS766457.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}.text-primary{color:var(--color-primary-text)}.bg-primary{background-color:var(--color-primary)}.dark-only{display:none}body.dark .dark-only{display:block}body.dark .light-only{display:none}:fullscreen .nofullscreen{display:none}html{font-size:15px;box-sizing:border-box}body{font-family:Roboto Variable,sans-serif;font-size:1.5rem;line-height:1.75;font-weight:300;letter-spacing:.01rem;margin:0;padding:0;background-color:var(--color-bg);color:var(--color-text)}h1,h2,h3,h4,h5,h6{margin:1rem 0 .5rem}h1{font-size:3rem;font-weight:600;text-align:center}h2{color:var(--color-primary-text);font-size:3rem;font-weight:500}h3{color:var(--color-primary-text);font-size:2rem;font-weight:500}h4{font-size:1.75rem;font-weight:500}h5{font-size:1.5rem;font-weight:600}h6{font-size:1.5rem;font-weight:500}blockquote{border-left:5px solid var(--color-primary-text);margin:.5rem 0;padding:.25rem 1rem}a{color:var(--color-primary-text)}:focus-visible{outline:2px solid var(--color-primary-text);outline-offset:2px}img{cursor:pointer}button{font-size:1rem;padding:.2rem .5rem;cursor:pointer;border-radius:3px;border:1px solid var(--color-border);background:var(--color-bg-code);color:var(--color-text)}button:hover{background:var(--color-border)}button.active{border-color:var(--color-primary-text)}ul{font-size:1.5rem;padding:0;margin:.5rem 2rem}p{font-size:1.5rem;margin:.5rem 0}b,strong{font-weight:500}.noscroll{overflow:hidden}.spacer{display:block}.spacer.sm{height:.75rem}.spacer.md{height:1.5rem}.spacer.lg{height:3rem}.spacer.xl{height:6rem}.slides-container{top:var(--header-height);left:0;right:0;bottom:0;position:absolute;overflow-y:scroll;background:var(--color-bg)}dialog{margin:0;padding:0;height:100vh;max-height:100vh;min-width:250px;max-width:100vw;box-sizing:border-box;z-index:5;pointer-events:auto;background:var(--color-bg-slide);color:var(--color-text);border:none;border-right:1px solid var(--color-border);box-shadow:-10px 0 20px #000;position:fixed;opacity:0;display:flex;flex-direction:column;font-size:1rem;overflow:hidden;transform:translate(-100%);transition:opacity .3s ease-in-out}dialog[open]{transform:translate(0);opacity:1}dialog:not([open]){pointer-events:none;visibility:hidden;transition:opacity .3s ease-in-out,visibility 0s .3s}dialog::backdrop{backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);background:var(--color-bg-backdrop)}dialog header{position:relative;padding:1rem;border-bottom:1px solid var(--color-border)}dialog header button{position:absolute;right:.25rem;top:.25rem;cursor:pointer;padding:.25rem;display:flex}dialog header a{text-decoration:none;font-size:1.25rem;margin-bottom:1rem;color:var(--color-text);font-weight:700}dialog header a:hover{color:var(--color-primary-text)}dialog article{flex:1;overflow-y:auto;padding:0 1rem}dialog article ul{margin:.5rem 0;padding:0;list-style:none;font-size:1.25rem;font-weight:600}dialog article ul li{margin:.25rem 0}dialog article ul a{color:var(--color-text);text-decoration:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center}dialog article ul a span.slide-number{font-weight:400;color:var(--color-grey);font-size:1rem;margin-left:1rem}dialog article ul a:hover{color:var(--color-primary-text)}dialog article ul a:hover span.slide-number{color:var(--color-primary-text)}dialog article ul ul{margin:.25rem 0;font-size:1rem;font-weight:300}dialog article ul ul li{margin:0}dialog article ul ul ul{font-size:1rem;margin-left:1rem}dialog footer{border-top:1px solid var(--color-border);padding:1rem;display:flex;flex-direction:column;font-weight:300}dialog footer div{display:flex;margin-top:.5rem}dialog footer div :first-child{flex:1}dialog footer div button{margin-left:.5rem}@media(prefers-reduced-motion:no-preference){dialog{transition:opacity .3s ease-in-out,transform .3s ease-in-out}}section.slide{position:relative;box-sizing:border-box;background-color:var(--color-bg-slide);min-height:100%;display:flex;flex-direction:column;margin-bottom:2rem;padding-top:2rem;font-size:1.5rem}section.slide .content{box-sizing:border-box;padding:0 2rem;flex:1;width:100%;overflow-x:auto;display:flex;flex-direction:column;justify-content:center}section.slide:last-child{margin-bottom:0}section.slide:first-child .content{align-items:center}section.slide:first-child h1{margin:0}section.slide:first-child a.lecture-title{margin-bottom:1rem}section.slide:first-child img.logo{height:6rem}section.slide:first-child .university{text-transform:uppercase}img.default,video.default{display:block;max-width:100%;max-height:80vh;position:relative;margin-left:auto;margin-right:auto;object-fit:contain}img.default.align-left,video.default.align-left{margin-left:0;object-position:left}img.default.align-right,video.default.align-right{margin-right:0;object-position:right}img.default.broken,video.default.broken{border:1px solid var(--color-border);background:var(--color-code);color:var(--color-primary-text);padding:1rem}video.default{border:1px solid var(--color-border)}.video-print-placeholder{display:none}.row{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1rem}.column{width:100%;padding-right:1rem}.column:last-child{padding-right:0}.video{margin:.5rem 0}.semester{display:inline-block;margin:1rem 0;font-size:2.5rem;line-height:2.5rem;padding:.5rem 1.25rem .3rem;background:var(--color-primary);color:var(--color-white);font-weight:500}.table-container{width:100%;overflow-x:auto}table{min-width:100%;border-collapse:collapse;font-size:1.25rem;margin:1rem 0}table code{font-size:1.25rem}table th{text-align:left;font-weight:600;background-color:var(--color-bg-code)}table td,table th{padding:.5rem;border:1px solid var(--color-border)}.toast-wrapper{position:fixed;bottom:2rem;width:100vw;display:flex;justify-content:center;z-index:10}.toast{padding:.5rem 1rem .25rem;background:var(--color-black);color:var(--color-white);max-width:90vw;box-sizing:border-box;border-radius:.2rem;font-size:1.25rem;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;animation:toast-animation .5s}@keyframes toast-animation{0%{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}:root{--hljs-red: #cf222e;--hljs-purple: #8250df;--hljs-blue: #0550ae;--hljs-dark-blue: #0a3069;--hljs-orange: #953800;--hljs-grey: #57606a;--hljs-green: #116329;--hljs-dark: #24292f;--hljs-yellow: #4d2d00;--hljs-red-2: #82071e}body.dark{--hljs-red: #ff7b72;--hljs-purple: #d2a8ff;--hljs-blue: #79c0ff;--hljs-dark-blue: #a5d6ff;--hljs-orange: #ffa657;--hljs-grey: #8b949e;--hljs-green: #7ee787;--hljs-dark: #c9d1d9;--hljs-yellow: #aff5b4;--hljs-red-2: #ffdcd7}.code-wrapper{position:relative;margin:.75em 0}.code-wrapper button.copy{position:absolute;top:.5rem;right:.5rem;cursor:pointer;opacity:0;transition:opacity .2s}.code-wrapper:hover button.copy,.code-wrapper:focus-within button.copy{opacity:1}code{font-family:Inconsolata Variable,monospace;font-size:1.25rem;font-weight:400;line-height:2rem;color:var(--color-text);background:var(--color-bg-code);padding:0 5px}pre{margin:0}pre code{display:block;overflow-x:auto;padding:1rem}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:var(--hljs-red)}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:var(--hljs-purple)}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:var(--hljs-blue)}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:var(--hljs-dark-blue)}.hljs-built_in,.hljs-symbol{color:var(--hljs-orange)}.hljs-code,.hljs-comment,.hljs-formula{color:var(--hljs-grey)}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:var(--hljs-green)}.hljs-subst{color:var(--hljs-dark)}.hljs-section{color:var(--hljs-blue);font-weight:700}.hljs-bullet{color:var(--hljs-gold)}.hljs-emphasis{color:var(--hljs-dark);font-style:italic}.hljs-strong{color:var(--hljs-dark);font-weight:700}.hljs-addition{color:var(--hljs-green);background-color:#f0fff4}.hljs-deletion{color:var(--hljs-red-2);background-color:#ffeef0}body{--header-height: calc(51px + 2rem) }.header{position:absolute;top:0;background:var(--color-bg-slide);box-sizing:border-box;width:100%;padding:1rem 2rem;display:flex;justify-content:space-between;font-size:1rem;z-index:3;border-bottom:1px solid var(--color-border)}.header img.logo{height:50px}.header-left{display:flex;align-items:center}.header-left button{cursor:pointer;color:var(--color-text);display:flex;align-items:center;background:none;border:none;font-size:1rem;padding:0;margin:0}.header-left button span{margin-left:.5rem}.footer{box-sizing:border-box;padding:1rem;display:flex;justify-content:space-between;color:var(--color-grey);font-size:1rem;position:sticky;bottom:0}@media(max-width:576px){html{font-size:14px}body{--header-height: calc(41px + 1rem) ;font-size:1rem}h1,h2{font-size:2rem}h3{font-size:1.5rem}h4{font-size:1.25rem}h5,h6,a,p,code,pre code,li,table,td,th,table code{font-size:1rem}.header{padding:.5rem 1rem}.header img.logo{height:40px}.nomobile{display:none}.row{flex-direction:column}.column{padding-right:0}}@media print{@page{margin:1cm}.noprint{display:none!important}html{font-size:8pt}body{background-color:transparent}h1,h2{font-size:1.5rem;page-break-after:avoid}h2{page-break-before:always;page-break-after:avoid}h3{font-size:1.4rem;page-break-after:avoid}h4,h5,h6{font-size:1.1rem;page-break-after:avoid}code{font-size:1rem;page-break-inside:avoid}pre code{overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere}a[href^=http]:after{color:var(--color-text);font-size:1rem;text-decoration:none;content:" (" attr(href) ")"}table,table tr,table td,table th{page-break-inside:avoid}table tr td,table tr th{padding:.5rem}dialog{display:none}p:has(img){page-break-inside:avoid}img{page-break-inside:avoid}video{display:none!important}.video-print-placeholder{display:block;background:var(--color-bg);padding:2rem;box-sizing:border-box;text-align:center;border:1px solid var(--color-border)}.video-print-placeholder img{opacity:.5}.slides-container{position:static;overflow:visible;background:unset}.header{display:none}section.slide{min-height:unset;float:none!important;display:block;padding:0;margin:0}section.slide .content{overflow:visible}section.slide:not(.title-slide) .content{display:block}section.slide.title-slide{min-height:100vh;page-break-after:always;display:flex}section.slide .footer{display:none}}
|
|
1
|
+
:root{--color-bg: #f6f8fa;--color-bg-slide: #fff;--color-bg-code: #f6f8fa;--color-bg-backdrop: rgba(0, 0, 0, .3);--color-text: #222;--color-border: #eaedef;--color-primary: #e31134;--color-primary-text: var(--color-primary);--color-white: #fff;--color-black: #222;--color-grey: #696969}@media not print{body.dark{--color-bg: #000000;--color-bg-slide: #0e1117;--color-bg-code: #171b22;--color-text: #e6edf3;--color-border: #31363d;--color-grey: #888;--color-primary-text: oklch(from var(--color-primary) max(l, .7) c h)}}@font-face{font-family:Roboto Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./roboto-latin-wght-normal-3ZSHNGCF.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Roboto Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./roboto-latin-ext-wght-normal-QRJLAF7B.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inconsolata Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url("./inconsolata-latin-wght-normal-ZTY4F4RJ.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inconsolata Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url("./inconsolata-latin-ext-wght-normal-TS766457.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}.text-primary{color:var(--color-primary-text)}.bg-primary{background-color:var(--color-primary)}.dark-only{display:none}body.dark .dark-only{display:block}body.dark .light-only{display:none}:fullscreen .nofullscreen{display:none}html{font-size:15px;box-sizing:border-box}body{font-family:Roboto Variable,sans-serif;font-size:1.5rem;line-height:1.75;font-weight:300;letter-spacing:.01rem;margin:0;padding:0;background-color:var(--color-bg);color:var(--color-text)}h1,h2,h3,h4,h5,h6{margin:1rem 0 .5rem}h1{font-size:3rem;font-weight:600;text-align:center}h2{color:var(--color-primary-text);font-size:3rem;font-weight:500}h3{color:var(--color-primary-text);font-size:2rem;font-weight:500}h4{font-size:1.75rem;font-weight:500}h5{font-size:1.5rem;font-weight:600}h6{font-size:1.5rem;font-weight:500}blockquote{border-left:5px solid var(--color-primary-text);margin:.5rem 0;padding:.25rem 1rem}a{color:var(--color-primary-text)}:focus-visible{outline:2px solid var(--color-primary-text);outline-offset:2px}img{cursor:pointer}button{font-size:1rem;padding:.2rem .5rem;cursor:pointer;border-radius:3px;border:1px solid var(--color-border);background:var(--color-bg-code);color:var(--color-text)}button:hover{background:var(--color-border)}button.active{border-color:var(--color-primary-text)}ul{font-size:1.5rem;padding:0;margin:.5rem 2rem}p{font-size:1.5rem;margin:.5rem 0}b,strong{font-weight:500}.noscroll{overflow:hidden}.spacer{display:block}.spacer.sm{height:.75rem}.spacer.md{height:1.5rem}.spacer.lg{height:3rem}.spacer.xl{height:6rem}.slides-container{top:var(--header-height);left:0;right:0;bottom:0;position:absolute;overflow-y:scroll;background:var(--color-bg)}dialog{margin:0;padding:0;height:100vh;max-height:100vh;width:min(24rem,100vw);max-width:100vw;box-sizing:border-box;z-index:5;pointer-events:auto;background:var(--color-bg-slide);color:var(--color-text);border:none;border-right:1px solid var(--color-border);box-shadow:-10px 0 20px #000;position:fixed;opacity:0;display:flex;flex-direction:column;font-size:1rem;overflow:hidden;transform:translate(-100%);transition:opacity .3s ease-in-out}dialog[open]{transform:translate(0);opacity:1}dialog:not([open]){pointer-events:none;visibility:hidden;transition:opacity .3s ease-in-out,visibility 0s .3s}dialog::backdrop{backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);background:var(--color-bg-backdrop)}dialog header{position:relative;display:flex;flex-direction:column;gap:.5rem;padding:1rem 3rem 1rem 1rem;border-bottom:1px solid var(--color-border);overflow-wrap:anywhere}dialog header button{position:absolute;right:.25rem;top:.25rem;cursor:pointer;padding:.25rem;display:flex}dialog header a{text-decoration:none;font-size:1.25rem;color:var(--color-text);font-weight:700}dialog header a:hover{color:var(--color-primary-text)}dialog article{flex:1;overflow-y:auto;padding:0 1rem}dialog article ul{margin:.5rem 0;padding:0;list-style:none;font-size:1.25rem;font-weight:600}dialog article ul li{margin:.25rem 0}dialog article ul a{color:var(--color-text);text-decoration:none;cursor:pointer;display:flex;justify-content:space-between;align-items:baseline;overflow-wrap:anywhere}dialog article ul a span.slide-number{flex-shrink:0;font-weight:400;color:var(--color-grey);font-size:1rem;margin-left:1rem}dialog article ul a:hover{color:var(--color-primary-text)}dialog article ul a:hover span.slide-number{color:var(--color-primary-text)}dialog article ul ul{margin:.25rem 0;font-size:1rem;font-weight:300}dialog article ul ul li{margin:0}dialog article ul ul ul{font-size:1rem;margin-left:1rem}dialog footer{border-top:1px solid var(--color-border);padding:1rem;display:flex;flex-direction:column;font-weight:300}dialog footer div{display:flex;margin-top:.5rem}dialog footer div :first-child{flex:1}dialog footer div button{margin-left:.5rem}@media(prefers-reduced-motion:no-preference){dialog{transition:opacity .3s ease-in-out,transform .3s ease-in-out}}section.slide{position:relative;box-sizing:border-box;background-color:var(--color-bg-slide);min-height:100%;display:flex;flex-direction:column;margin-bottom:2rem;padding-top:2rem;font-size:1.5rem}section.slide .content{box-sizing:border-box;padding:0 2rem;flex:1;width:100%;overflow-x:auto;display:flex;flex-direction:column;justify-content:center}section.slide:last-child{margin-bottom:0}section.slide:first-child .content{align-items:center}section.slide:first-child h1{margin:0}section.slide:first-child a.lecture-title{margin-bottom:1rem}section.slide:first-child img.logo{height:6rem}section.slide:first-child .university{text-transform:uppercase}img.default,video.default{display:block;max-width:100%;max-height:80vh;position:relative;margin-left:auto;margin-right:auto;object-fit:contain}img.default.align-left,video.default.align-left{margin-left:0;object-position:left}img.default.align-right,video.default.align-right{margin-right:0;object-position:right}img.default.broken,video.default.broken{border:1px solid var(--color-border);background:var(--color-code);color:var(--color-primary-text);padding:1rem}video.default{border:1px solid var(--color-border)}.video-print-placeholder{display:none}.row{display:flex;flex-direction:row;justify-content:space-between;margin-bottom:1rem}.column{width:100%;padding-right:1rem}.column:last-child{padding-right:0}.video{margin:.5rem 0}.semester{display:inline-block;margin:1rem 0;font-size:2.5rem;line-height:2.5rem;padding:.5rem 1.25rem .3rem;background:var(--color-primary);color:var(--color-white);font-weight:500}.table-container{width:100%;overflow-x:auto}table{min-width:100%;border-collapse:collapse;font-size:1.25rem;margin:1rem 0}table code{font-size:1.25rem}table th{text-align:left;font-weight:600;background-color:var(--color-bg-code)}table td,table th{padding:.5rem;border:1px solid var(--color-border)}:root{--color-alert-note: #0969da;--color-alert-tip: #1a7f37;--color-alert-important: #8250df;--color-alert-warning: #9a6700;--color-alert-caution: #cf222e}@media not print{body.dark{--color-alert-note: #4493f8;--color-alert-tip: #3fb950;--color-alert-important: #ab7df8;--color-alert-warning: #d29922;--color-alert-caution: #f85149}}.markdown-alert{--color-alert: var(--color-alert-note);border-left:5px solid var(--color-alert);margin:.5rem 0;padding:.25rem 1rem}.markdown-alert>:last-child{margin-bottom:.5rem}.markdown-alert .markdown-alert-title{display:flex;align-items:center;gap:.5rem;margin:.25rem 0;color:var(--color-alert);font-weight:500}.markdown-alert .markdown-alert-title svg{width:1em;height:1em;fill:currentColor}.markdown-alert-tip{--color-alert: var(--color-alert-tip)}.markdown-alert-important{--color-alert: var(--color-alert-important)}.markdown-alert-warning{--color-alert: var(--color-alert-warning)}.markdown-alert-caution{--color-alert: var(--color-alert-caution)}sup.footnote-ref{line-height:0}sup.footnote-ref a{text-decoration:none;padding:0 .1em}.footnotes{box-sizing:border-box;width:100%;margin-top:1rem;padding:.5rem 2rem 0;font-size:1.1rem}.footnotes p,.footnotes li,.footnotes a{font-size:inherit}.footnotes ol{margin:0;padding-top:.5rem;padding-left:1.5rem;border-top:1px solid var(--color-border)}.footnotes p{margin:.25rem 0}@media(max-width:576px){.footnotes{font-size:.85rem}}.toast-wrapper{position:fixed;bottom:2rem;width:100vw;display:flex;justify-content:center;z-index:10}.toast{padding:.5rem 1rem .25rem;background:var(--color-black);color:var(--color-white);max-width:90vw;box-sizing:border-box;border-radius:.2rem;font-size:1.25rem;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;animation:toast-animation .5s}@keyframes toast-animation{0%{opacity:0;transform:scale(.75)}to{opacity:1;transform:scale(1)}}:root{--hljs-red: #cf222e;--hljs-purple: #8250df;--hljs-blue: #0550ae;--hljs-dark-blue: #0a3069;--hljs-orange: #953800;--hljs-grey: #57606a;--hljs-green: #116329;--hljs-dark: #24292f;--hljs-yellow: #4d2d00;--hljs-red-2: #82071e}body.dark{--hljs-red: #ff7b72;--hljs-purple: #d2a8ff;--hljs-blue: #79c0ff;--hljs-dark-blue: #a5d6ff;--hljs-orange: #ffa657;--hljs-grey: #8b949e;--hljs-green: #7ee787;--hljs-dark: #c9d1d9;--hljs-yellow: #aff5b4;--hljs-red-2: #ffdcd7}.code-wrapper{position:relative;margin:.75em 0}.code-wrapper button.copy{position:absolute;top:.5rem;right:.5rem;cursor:pointer;opacity:0;transition:opacity .2s}.code-wrapper:hover button.copy,.code-wrapper:focus-within button.copy{opacity:1}code{font-family:Inconsolata Variable,monospace;font-size:1.25rem;font-weight:400;line-height:2rem;color:var(--color-text);background:var(--color-bg-code);padding:0 5px}pre{margin:0}pre code{display:block;overflow-x:auto;padding:1rem}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:var(--hljs-red)}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:var(--hljs-purple)}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:var(--hljs-blue)}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:var(--hljs-dark-blue)}.hljs-built_in,.hljs-symbol{color:var(--hljs-orange)}.hljs-code,.hljs-comment,.hljs-formula{color:var(--hljs-grey)}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:var(--hljs-green)}.hljs-subst{color:var(--hljs-dark)}.hljs-section{color:var(--hljs-blue);font-weight:700}.hljs-bullet{color:var(--hljs-gold)}.hljs-emphasis{color:var(--hljs-dark);font-style:italic}.hljs-strong{color:var(--hljs-dark);font-weight:700}.hljs-addition{color:var(--hljs-green);background-color:#f0fff4}.hljs-deletion{color:var(--hljs-red-2);background-color:#ffeef0}:is(h1,h2,h3,h4,h5,h6) code{font-size:.85em;line-height:inherit}body{--header-height: calc(51px + 2rem) }.header{position:absolute;top:0;background:var(--color-bg-slide);box-sizing:border-box;width:100%;padding:1rem 2rem;display:flex;justify-content:space-between;gap:1rem;font-size:1rem;z-index:3;border-bottom:1px solid var(--color-border)}.header img.logo{height:50px}.header-left{display:flex;align-items:center;min-width:0}.header-left button{min-width:0;text-align:left;cursor:pointer;color:var(--color-text);display:flex;align-items:center;background:none;border:none;font-size:1rem;padding:0;margin:0}.header-left button svg{flex-shrink:0}.header-left button span{margin-left:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.footer{box-sizing:border-box;padding:1rem;display:flex;justify-content:space-between;color:var(--color-grey);font-size:1rem;position:sticky;bottom:0}@media(max-width:576px){html{font-size:14px}body{--header-height: calc(41px + 1rem) ;font-size:1rem}h1,h2{font-size:2rem}h3{font-size:1.5rem}h4{font-size:1.25rem}h5,h6,a,p,code,pre code,li,table,td,th,table code{font-size:1rem}.header{padding:.5rem 1rem}.header img.logo{height:40px}.header .header-left span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal}.nomobile{display:none}.row{flex-direction:column}.column{padding-right:0}}@media print{@page{margin:1cm}.noprint{display:none!important}html{font-size:8pt}body{background-color:transparent}h1,h2{font-size:1.5rem;page-break-after:avoid}h2{page-break-before:always;page-break-after:avoid}h3{font-size:1.4rem;page-break-after:avoid}h4,h5,h6{font-size:1.1rem;page-break-after:avoid}code{font-size:1rem;page-break-inside:avoid}pre code{overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere}a[href^=http]:after{color:var(--color-text);font-size:1rem;text-decoration:none;content:" (" attr(href) ")"}table,table tr,table td,table th{page-break-inside:avoid}table tr td,table tr th{padding:.5rem}dialog{display:none}p:has(img){page-break-inside:avoid}img{page-break-inside:avoid}video{display:none!important}.video-print-placeholder{display:block;background:var(--color-bg);padding:2rem;box-sizing:border-box;text-align:center;border:1px solid var(--color-border)}.video-print-placeholder img{opacity:.5}.slides-container{position:static;overflow:visible;background:unset}.header{display:none}section.slide{min-height:unset;float:none!important;display:block;padding:0;margin:0}section.slide .content{overflow:visible}section.slide:not(.title-slide) .content{display:block}section.slide.title-slide{min-height:100vh;page-break-after:always;display:flex}section.slide .footer{display:none}}
|
package/app/scripts/slides.js
CHANGED
|
@@ -1,15 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
+
// packages/app/src/texts.ts
|
|
4
|
+
var english = {
|
|
5
|
+
copied: "Copied to clipboard",
|
|
6
|
+
copyFailed: "Copying failed, select the code instead",
|
|
7
|
+
codeRegion: "Code example, scrollable"
|
|
8
|
+
};
|
|
9
|
+
var texts = {
|
|
10
|
+
...english,
|
|
11
|
+
...window.slidesTexts
|
|
12
|
+
};
|
|
13
|
+
|
|
3
14
|
// packages/app/src/clipboard.ts
|
|
4
15
|
var Clipboard = class {
|
|
5
|
-
copy(id) {
|
|
6
|
-
|
|
16
|
+
async copy(id) {
|
|
17
|
+
const text = document.getElementById(id).innerText;
|
|
18
|
+
const copied = await this.writeText(text) || this.copyBySelection(text);
|
|
19
|
+
this.showToast(copied ? texts.copied : texts.copyFailed);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The Clipboard API is missing outside of secure contexts, e.g. on
|
|
23
|
+
* http:// pages other than localhost, and can be denied.
|
|
24
|
+
*/
|
|
25
|
+
async writeText(text) {
|
|
26
|
+
try {
|
|
27
|
+
await navigator.clipboard.writeText(text);
|
|
28
|
+
return true;
|
|
29
|
+
} catch {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** The older way, which also works outside of secure contexts */
|
|
34
|
+
copyBySelection(text) {
|
|
35
|
+
const focused = document.activeElement;
|
|
36
|
+
const textarea = document.createElement("textarea");
|
|
37
|
+
textarea.value = text;
|
|
38
|
+
textarea.setAttribute("readonly", "");
|
|
39
|
+
textarea.style.position = "fixed";
|
|
40
|
+
textarea.style.opacity = "0";
|
|
41
|
+
document.body.appendChild(textarea);
|
|
42
|
+
textarea.select();
|
|
43
|
+
let copied;
|
|
44
|
+
try {
|
|
45
|
+
copied = document.execCommand("copy");
|
|
46
|
+
} catch {
|
|
47
|
+
copied = false;
|
|
48
|
+
}
|
|
49
|
+
textarea.remove();
|
|
50
|
+
focused?.focus({ preventScroll: true });
|
|
51
|
+
return copied;
|
|
52
|
+
}
|
|
53
|
+
showToast(text) {
|
|
7
54
|
const toast = document.createElement("div");
|
|
8
55
|
toast.classList.add("toast-wrapper");
|
|
9
56
|
toast.setAttribute("role", "status");
|
|
10
57
|
const content = document.createElement("div");
|
|
11
58
|
content.classList.add("toast");
|
|
12
|
-
content.textContent =
|
|
59
|
+
content.textContent = text;
|
|
13
60
|
toast.appendChild(content);
|
|
14
61
|
document.body.appendChild(toast);
|
|
15
62
|
setTimeout(() => {
|
|
@@ -30,7 +77,7 @@
|
|
|
30
77
|
if (block.scrollWidth > block.clientWidth) {
|
|
31
78
|
block.tabIndex = 0;
|
|
32
79
|
block.setAttribute("role", "region");
|
|
33
|
-
block.setAttribute("aria-label",
|
|
80
|
+
block.setAttribute("aria-label", texts.codeRegion);
|
|
34
81
|
} else {
|
|
35
82
|
block.removeAttribute("tabindex");
|
|
36
83
|
block.removeAttribute("role");
|
|
@@ -188,6 +235,9 @@
|
|
|
188
235
|
}
|
|
189
236
|
async update(darkMode) {
|
|
190
237
|
const mermaid = window.mermaid;
|
|
238
|
+
if (this.elements.length === 0 || !mermaid) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
191
241
|
mermaid.initialize({
|
|
192
242
|
startOnLoad: false,
|
|
193
243
|
theme: "base",
|