Commit 7aedbef9 authored by Mario Botsch's avatar Mario Botsch

fix JS error in makeVertical()

parent a2f97f93
......@@ -18,6 +18,9 @@ function deckerStart() {
addSourceCodeLabels();
prepareTaskLists();
prepareFullscreenIframes();
if (Reveal.getConfig().verticalSlides) {
setupVerticalSlides();
}
}
......@@ -55,7 +58,7 @@ function currentDate() {
}
}
function makeVertical() {
function setupVerticalSlides() {
const subsections = Array.from(document.getElementsByClassName("sub")).filter(s => s.nodeName === "SECTION");
const subsection_bundles = [];
for (let i = 0; i < subsections.length; i++) {
......
......@@ -496,7 +496,15 @@ $if(checkOverflow)$
$else$
checkOverflow: false,
$endif$
// whether to use vertical slides (in decker.js)
$if(vertical-slides)$
verticalSlides: $vertical-slides$,
$else$
verticalSlides: false,
$endif$
// setup reveal-menu
$if(menu)$
......@@ -643,10 +651,6 @@ $endif$
});
</script>
$if(vertical-slides)$
<script>makeVertical();</script>
$endif$
<!-- Reload on change machinery -->
<script>
......
---
menu: true
title: Vertical Slides
vertical-slides: true
---
# First slide
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment