-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
81 lines (62 loc) · 2 KB
/
index.html
File metadata and controls
81 lines (62 loc) · 2 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
79
80
81
<!DOCTYPE html>
<html manifest ="native.manifest">
<head>
<meta http-equiv="Content Type" content ="text/html; charset=UTF-8">
<style type="text/css">
body {
overflow-y:scroll;
margin: 0;
padding: 0;
}
canvas{
transform: translate3d(0,0,0);
-webkit-transform: translate3d(0,0,0);
}
</style>
<title>
Simplicity
</title>
<meta name="viewport" content="user-scalable=no, width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="jquery.mobile-1.4.4.min.css">
<script src="jquery.js"></script>
<script src="jquery.mobile-1.4.4.min.js"></script>
</head>
<body>
<div data-role = "page" id = "menu">
<h1>Flappy Blocks</h1>
<a href="#game" class="ui-btn"><button onclick="pause = false">Play</button></a>
<a href="#highscore" class="ui-btn"><button onclick="drawHs()">High Score</button></a>
</div>
<div data-role = "page" id = "game">
<canvas width = "500" height = "250" style="border:4px solid black" id = "myCanvas"></canvas>
<script type="text/javascript" src ="game.js"></script>
<script type="text/javascript">$(document).delegate('.ui-content', 'touchmove', false)</script>
</div>
<div data-role="page" id = "highscore">
<a href="#menu" class="ui-btn">Menu</a>
<div id = "scores"></div>
<script type="text/javascript">
$('body').bind('touchmove', function(e){
e.preventDefault();
});
function drawHs(){
page = document.getElementById("scores")
page.innerHTML = ""
hs = getHighscore()
$("#scores").append("<h1>High Score</h1>")
for(i=0;i<hs.length;i++){
$("#scores").append("<h2>"+Math.floor(hs[i])+"</h2>")
}
}
</script>
</div>
<div data-role="popup" id="popupBasic" >
<div id = "scoreBox"></div>
<button onclick= "window.location ='#game';setup()">Play Again</button>
<button onclick="window.location = '#menu';setup();pause = true">Menu</button>
</div>
</body>
</html>