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') @@ -39,19 +39,6 @@ const deps = [{ condition () { 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, @@ -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,