aboutsummaryrefslogtreecommitdiff
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-08-10 13:32:19 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-08-10 13:32:19 -0400
commit73b69eb13dc15734fd4ce0ad9aabe0a9c5f053b9 (patch)
treeee52a8db9dd27d8a1f8b9413d4d961ec700900a5 /js/reveal.js
parent8e01c038249a56732579423b4126c149f07607a8 (diff)
downloadfosdem-2018-presentation-73b69eb13dc15734fd4ce0ad9aabe0a9c5f053b9.tar
fosdem-2018-presentation-73b69eb13dc15734fd4ce0ad9aabe0a9c5f053b9.tar.gz
reduce overview depth on small screens
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index f2c0e02..19b77e5 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -1032,6 +1032,12 @@ var Reveal = (function(){
var wasActive = dom.wrapper.classList.contains( 'overview' );
+ var depth = 2500;
+
+ if( window.innerWidth < 400 ) {
+ depth = 1000;
+ }
+
dom.wrapper.classList.add( 'overview' );
dom.wrapper.classList.remove( 'exit-overview' );
@@ -1048,7 +1054,7 @@ var Reveal = (function(){
for( var i = 0, len1 = horizontalSlides.length; i < len1; i++ ) {
var hslide = horizontalSlides[i],
hoffset = config.rtl ? -105 : 105,
- htransform = 'translateZ(-2500px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)';
+ htransform = 'translateZ(-'+ depth +'px) translate(' + ( ( i - indexh ) * hoffset ) + '%, 0%)';
hslide.setAttribute( 'data-index-h', i );
hslide.style.WebkitTransform = htransform;