1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.2/reveal.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.2/plugin/highlight/monokai.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.2/theme/dracula.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.2/reveal.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.2/plugin/markdown/markdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.2/plugin/highlight/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.2/plugin/math/math.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/plugin/mermaid/mermaid.js"></script>
{{ $js := resources.Get "js/pdfexport.js" | resources.Minify | resources.Fingerprint "sha512" }}
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
print_pdf = false;
if (window.location.search.match(/\?print-pdf.*$/)) {
print_pdf = true;
document.querySelector('.reveal').removeAttribute('style');
var body = document.querySelector('body');
body.style.setProperty('--gap', '0', 'important');
body.style.setProperty('--content-gap', '0', 'important');
document.querySelector('#top-link').style.display = 'none';
document.querySelectorAll('header, #vcomments').forEach(function (x) {
x.style.height = '0';
x.style.margin = '0';
});
};
Reveal.initialize({
mathjax3: {
mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js',
tex: {
inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ],
displayMath: [ ["$$", "$$"], ["\\[", "\\]"], ],
processEscapes: true,
processEnvironments: true,
},
options: {
enableExplorer: false,
skipHtmlTags: [ 'script', 'noscript', 'style', 'textarea', 'pre' ]
},
},
mermaid: {
theme: 'dark',
darkMode: true,
flowchart: {
useMaxWidth: true,
htmlLabels: true,
},
},
transition: 'fade',
progress: true,
embedded: !print_pdf,
pdfSeparateFragments: false,
plugins: [
RevealMarkdown,
RevealHighlight,
RevealMath.MathJax3,
RevealMermaid,
PdfExport,
]
}).then(()=>{
if (print_pdf) {
setTimeout(function() {
window.print();
}, 400);
}
});
});
</script>
|