takahashi-0.2.1.0: html/Temp.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
var SlideList = []
var SlideIndex = 0;
var Title = "Slide";
function init(){
SlideList = document.getElementsByName("pages");
changeSlide(0);
}
function changeSlide(index){
if(0 > index || index >= SlideList.length) return;
for(i = 0; i < SlideList.length ;i++) {
if(i == index) {
SlideList[i].style.display = "table-cell";
document.title = Title + " - " + (i + 1) + "/" + SlideList.length;
} else {
SlideList[i].style.display = "none";
}
}
SlideIndex = index;
}
document.onkeydown = function(e){
if(e.keyCode == 39 || e.keyCode == 34) changeSlide(SlideIndex + 1);
if(e.keyCode == 37 || e.keyCode == 33) changeSlide(SlideIndex - 1);
}
// -----
function judgeMoveSlide(x){
if(x > (window.innerWidth / 3 * 2)) changeSlide(SlideIndex + 1);
if(x < (window.innerWidth / 3)) changeSlide(SlideIndex - 1);
}
document.ontouchend = function(e){
judgeMoveSlide(e.changedTouches[0].pageX);
}
</script>
<style>
html, body {
height: 98%;
width: 99%;
overflow:hidden;
}
h1, h2, h3, ul, p {
margin:0px;
padding:0px;
}
.slide {
font-size:45pt;
display:inline-table;
width:100%;
height:100%;
}
</style>
<head>
<body onload="init()" style="height:100%">
<div class="slide">
##Presentation
</div>
</body>
</html>