aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2017-05-16 09:43:16 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2017-05-16 09:45:37 +0200
commit58dc6b7c3654f2c4383e608763ba84f3e0ea4221 (patch)
tree245465f40a17bafe8f5d0a5746c09ea043323c8f /js
parentf8b5813e59db12a24f84cb705c70a31c39da7f38 (diff)
downloadfosdem-2018-presentation-58dc6b7c3654f2c4383e608763ba84f3e0ea4221.tar
fosdem-2018-presentation-58dc6b7c3654f2c4383e608763ba84f3e0ea4221.tar.gz
adjust controls layout when there are no vertical or horizontal slides in the deck
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 02dbebe..42c3822 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2739,6 +2739,22 @@
}
}
+ // Flag if there are ANY vertical slides, anywhere in the deck
+ if( dom.wrapper.querySelectorAll( '.slides>section>section' ).length ) {
+ dom.wrapper.classList.add( 'has-vertical-slides' );
+ }
+ else {
+ dom.wrapper.classList.remove( 'has-vertical-slides' );
+ }
+
+ // Flag if there are ANY horizontal slides, anywhere in the deck
+ if( dom.wrapper.querySelectorAll( '.slides>section:not(.stack)' ).length ) {
+ dom.wrapper.classList.add( 'has-horizontal-slides' );
+ }
+ else {
+ dom.wrapper.classList.remove( 'has-horizontal-slides' );
+ }
+
}
}