-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
109 lines (109 loc) · 2.89 KB
/
index.html
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="author" content="Isaiah Odhner">
<meta name="description" content="A stupid game about columns">
<meta name="keywords" content="Bad Boxart, game, jam, game jam, Game Jolt, GameJolt">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#D26484">
<title>Columns</title>
</head>
<body>
<script>~function(){var d=document,b=d.body,c=b.appendChild(d.createElement("canvas")),p,i,k
canvas=c;ctx=c.getContext("2d")
b.style.overflow="hidden";b.style.margin=0;(onresize=function(){c.width=innerWidth,c.height=innerHeight})()
animate=function a(f){f(),requestAnimationFrame(function(){a(f)})}
for(p=Object.getOwnPropertyNames(Math),i=0;k=p[i];i++){self[k]=Math[k]}TAU=PI*2}()</script>
<script src="lib/dialog-polyfill.js"></script>
<link rel="stylesheet" type="text/css" href="lib/dialog-polyfill.css" />
<div id="controls">
<button id="open-restart-dialogue"></button><button id="toggle-mute" class="mute"></button><button id="fullscreen"></button>
</div>
<style>
body {
font-family: sans-serif;
}
#controls {
position: absolute;
top: 0;
font-size: 1.8em;
}
#controls button {
width: 4em;
height: 4em;
border: 0;
margin: 5px;
padding: 5px;
opacity: 0.7;
background-size: 2em;
background-position: center;
background-repeat: no-repeat;
background-color: transparent;
}
#controls button:hover {
background-color: rgba(0, 0, 0, 0.2);
}
#controls button:focus,
#controls button:active {
background-color: rgba(55, 126, 244, 0.6);
}
#open-restart-dialogue {
background-image: url("icons/restart.svg");
}
#fullscreen {
background-image: url("icons/fullscreen.svg");
}
.mute {
background-image: url("icons/mute.svg");
}
.unmute {
background-image: url("icons/unmute.svg");
}
:fullscreen #fullscreen {
display: none;
}
:-ms-fullscreen #fullscreen {
display: none;
}
:-moz-full-screen #fullscreen {
display: none;
}
:-webkit-full-screen #fullscreen {
display: none;
}
dialog {
background-color: #2D2D2D;
color: white;
border: 0;
padding: 10px 20px;
}
dialog p {
margin: 10px 0;
}
button {
background-color: #555;
color: white;
border: 0;
padding: 5px 10px;
margin: 10px 0;
}
button:hover {
background-color: #666;
}
button:focus,
button:active {
background-color: #377EF4;
}
</style>
<dialog id="restart-dialogue">
<p>Restart the game?</p>
<p>Maybe get some better columns?</p>
<button id="do-restart">Restart</button>
<button id="cancel-restart">Cancel</button>
</dialog>
<script src="lib/coffee-script.js"></script>
<script src="lib/howler.min.js"></script>
<script src="game.coffee" type="text/coffeescript"></script>
</body>
</html>