-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslides.js
More file actions
32 lines (28 loc) · 753 Bytes
/
slides.js
File metadata and controls
32 lines (28 loc) · 753 Bytes
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
import Reveal from './reveal.js/dist/reveal.esm.js';
import Markdown from './reveal.js/plugin/markdown/markdown.esm.js';
import Notes from './reveal.js/plugin/notes/notes.esm.js';
Reveal.initialize({
backgroundTransition: 'none',
dependencies: [
{
async: true,
condition: () => !!document.body.classList,
src: 'reveal-a11y/accessibility/helper.js',
}
],
hash: true,
markdown: {
smartypants: true
},
plugins: [
Markdown,
Notes
],
transition: 'none'
});
Reveal.on('ready', updateTheme);
Reveal.on('slidechanged', updateTheme);
function updateTheme (event) {
const isPrimary = !!event.currentSlide.querySelector('h1');
document.body.classList.toggle('reveal-viewport--primary', isPrimary);
}