/
+page.svelte
83 lines (78 loc) · 2.28 KB
/
+page.svelte
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
72
73
74
75
76
77
78
79
80
81
82
83
<script lang="ts">
import Transitions from './../../../internal/Transitions.svelte';
import Media from './../../../internal/Media.svelte';
import Math from './../../../internal/Math.svelte';
import Markdown from './../../../internal/Markdown.svelte';
import LayoutHelpers from './../../../internal/LayoutHelpers.svelte';
import Barebones from './../../../internal/Barebones.svelte';
import Backgrounds from './../../../internal/Backgrounds.svelte';
import AutoAnimate from './../../../internal/AutoAnimate.svelte';
import GettingStarted from './../../../internal/GettingStarted.svelte';
import Love from './../../../internal/Love.svelte';
import 'reveal.js/plugin/highlight/monokai.css';
import Title from './../../../internal/Title.svelte';
import type Reveal from 'reveal.js';
import Presentation from '../../../lib/components/Presentation.svelte';
import { onMount } from 'svelte';
import Slide from '../../../lib/components/Slide.svelte';
let config: Reveal.Options = {};
onMount(async () => {
const Highlight = (await import('reveal.js/plugin/highlight/highlight')).default;
const Markdown = (await import('reveal.js/plugin/markdown/markdown')).default;
const MathReveal = (await import('reveal.js/plugin/math/math')).default;
const RevealNotes = (await import('reveal.js/plugin/notes/notes')).default;
// trigger change
// read about svelte binding
config = {
plugins: [Highlight, RevealNotes, Markdown, MathReveal],
hash: true,
mathjax2: {
config: 'TeX-AMS_HTML-full',
// @ts-ignore
TeX: {
Macros: {
R: '\\mathbb{R}',
set: ['\\left\\{#1 \\; ; \\; #2\\right\\}', 2]
}
}
}
};
});
</script>
<Presentation {config}>
<Slide>
<p>Example 1</p>
<p>
Get from <a href="https://github.com/rajasegar/svelte" target="_blank" rel="noreferrer"
>rajasegar/svelte-slides</a
>
</p>
</Slide>
<Slide markdown>
<script type="text/template">
## Slide 1
A paragraph with some text and a [link](https://hakim.se).
---
## Slide 2
---
## Slide 3
</script>
</Slide>
<Title />
<Love partner={['Svelte', 'Reveal.js']} />
<GettingStarted />
<AutoAnimate />
<Backgrounds />
<Barebones />
<LayoutHelpers />
<Markdown />
<Math />
<Media />
<Transitions />
</Presentation>
<style>
:global(body) {
margin: 0;
padding: 0;
}
</style>