-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (74 loc) · 3.05 KB
/
index.html
File metadata and controls
78 lines (74 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="shortcut icon" type="image/x-icon" href="img/cap.png">
<title>Bob´s drunken walk</title>
<link rel="stylesheet" href="css/main.css">
<script src="js/drunkenwalk.js"></script>
</head>
<body>
<nav id="navigation" class="menu-opener">
<div class="menu-opener-inner"></div>
</nav>
<nav class="menu">
<div class="content">
<div id="events">
<div id="eventtext"><textarea id="textarea" rows="8" cols="40" readonly></textarea></div>
<div id="eventcontrols"><button type="button" id="buttonRestart" class="btn" onclick="drawer.restartWalk();">Start again</button></div>
<div class="clear"/>
</div>
</div>
</div>
</nav>
<script src="js/jquery-1.9.1.js"></script>
<div id="page">
<canvas id="canvasLayer0" width="1680" height="885">
</canvas>
<canvas id="canvasLayer1" width="1680" height="885">
</canvas>
<canvas id="canvasLayer2" width="1680" height="885">
</canvas>
<canvas id="canvasLayer3" width="1680" height="885">
</canvas>
<div id="overlay">
<img id="bob" src="img/cap.png">
<p id="text">This is Bob.<br><br>Bob is at vacation in Barcelona. He drunk to much "Happy Otter" pale ale and
wants to get back to the Hotel. It is 1:15 AM and the battery of his phone is
empty. He is straying around to find the right way.
We hope he will find his way as soon as possible.</p>
<button type="button" id="buttonStart" class="btn" onclick="drawer.startWalk();">Start</button>
</div>
</div>
<script>
// On mobile Safari in portrait mode is a bottom menu bar which results in wrong window.innherHeight
var iOS;
var iw, ih;
function getWindowSize() {
iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && Math.abs(window.orientation) !== 90;
iw = (iOS) ? screen.width : window.innerWidth, ih = (iOS) ? screen.height : window.innerHeight;
}
$(document).ready(function() {
getWindowSize();
drawer = new WalkDrawer(ih, iw);
});
$(window).on('resize', function(){
if (drawer != null && drawer !== 'undefined') {
drawer.stop();
}
getWindowSize();
drawer = new WalkDrawer(ih, iw);
});
$(".menu-opener").click(function(){
$(".menu-opener, .menu-opener-inner, .menu, .content").toggleClass("active");
if ($(".content").hasClass("show") == false) {
setTimeout(function () {
$(".content").addClass("show");
drawer.scrollMessages();
}, 300);
} else {
$(".content").removeClass("show");
}
});
</script>
</body></html>