Update to hide scrollbar (but scrollable) in the slide mode

This commit is contained in:
Wu Cheng-Han 2016-08-15 11:30:12 +08:00
parent 29d198def9
commit 058c35730b
3 changed files with 49 additions and 25 deletions

View File

@ -280,6 +280,25 @@ pre.mermaid > svg {
max-width: 758px;
}
html, body {
height: 100%;
width: 100%;
overflow: hidden;
}
.container {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow-y: scroll;
}
.container.hidescrollbar {
right: -17px;
}
.reveal {
height: 100vh;
}

View File

@ -110,3 +110,7 @@ Reveal.addEventListener('ready', function (event) {
}, 0);
});
Reveal.addEventListener('slidechanged', renderSlide);
var isMacLike = navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i) ? true : false;
if (!isMacLike) $('.container').addClass('hidescrollbar');

View File

@ -46,7 +46,7 @@
</script>
</head>
<body>
<div class="container">
<div class="reveal">
<div class="slides"><%- slides %></div>
</div>
@ -74,6 +74,7 @@
</div>
<% } %>
</div>
</div>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ messageStyle: "none", skipStartupTypeset: true ,tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true }});