diff options
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/slide.js | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/public/js/slide.js b/public/js/slide.js index 84e098c7..9dfda65b 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -1,5 +1,5 @@ /* eslint-env browser, jquery */ -/* global serverurl, Reveal */ +/* global serverurl, Reveal, RevealMarkdown */ require('../css/extra.css') require('../css/site.css') @@ -40,19 +40,6 @@ const deps = [{ return !document.body.classList } }, { - src: `${serverurl}/js/reveal-markdown.js`, - callback () { - const slideOptions = { - separator: '^(\r\n?|\n)---(\r\n?|\n)$', - verticalSeparator: '^(\r\n?|\n)----(\r\n?|\n)$' - } - const slides = window.RevealMarkdown.slidify(body, slideOptions) - $('.slides').html(slides) - window.RevealMarkdown.initialize() - removeDOMEvents($('.slides')) - $('.slides').show() - } -}, { src: `${serverurl}/build/reveal.js/plugin/notes/notes.js`, async: true, condition () { @@ -60,6 +47,16 @@ const deps = [{ } }] +const slideOptions = { + separator: '^(\r\n?|\n)---(\r\n?|\n)$', + verticalSeparator: '^(\r\n?|\n)----(\r\n?|\n)$' +} +const slides = RevealMarkdown.slidify(body, slideOptions) +$('.slides').html(slides) +RevealMarkdown.initialize() +removeDOMEvents($('.slides')) +$('.slides').show() + // default options to init reveal.js const defaultOptions = { controls: true, |