-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
141 lines (126 loc) · 3.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="favicon.ico" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=0.75, user-scalable=no, interactive-widget=overlays-content"
/>
<link rel="manifest" href="./manifest.json" />
<title>Spicy Slalom</title>
<link rel="stylesheet" href="./node_modules/nes.css/css/nes.min.css" />
<link rel="stylesheet" href="./index.css" />
</head>
<body>
<div id="loading-error" class="hidden">
Game failed to load. Your device might not be supported.
</div>
<div id="container">
<canvas id="game"></canvas>
</div>
<div id="tutorial" class="hidden">
<h1>Spicy Slalom</h1>
<p>Ski down the slope and try to set a record time!</p>
<p>
Pass between flags to get a speed boost, but watch out for dangerous
obstacles.
</p>
<img height="176" src="./src/images/tutorial.png" />
<p class="touch">Tap the left and right halves of the screen to turn.</p>
<p class="no-touch">Press the arrow keys or A/D to turn.</p>
<label>
<input
type="checkbox"
id="flip-controls"
class="nes-checkbox is-dark"
/>
<span>Flip Controls</span>
</label>
<button type="button" id="play" class="nes-btn is-success">
Hit the slopes!
</button>
</div>
<button type="button" id="left" class="turn-btn touch hidden"></button>
<button type="button" id="right" class="turn-btn touch hidden"></button>
<div id="volume-container">
<div id="mutes">
<label>
<input
type="checkbox"
id="music"
data-volume="high"
class="nes-checkbox is-dark"
/>
<span>Music</span>
</label>
<label>
<input
type="checkbox"
id="sfx"
data-volume="high"
class="nes-checkbox is-dark"
/>
<span>SFX</span>
</label>
</div>
<label for="volume-input">
<span>Vol</span>
<div id="volume">
<div id="volume-background"></div>
<progress
id="volume-progress"
class="nes-progress is-primary"
type="range"
value=".5"
max="1"
></progress>
<input
id="volume-input"
class="nes-pointer nes-progress"
type="range"
min="0"
max="1"
step="0.1"
/>
</div>
</label>
</div>
<div id="game-container">
<div id="timer" class="outline-text"></div>
<div id="reset-container" class="hidden">
<button id="reset" class="nes-btn is-primary">
<img src="./src/images/reset.png" />
</button>
<div id="try-again" class="hidden">
Try again <span class="upside-down" role="presentation">v</span>
</div>
</div>
</div>
<dialog id="leaderboard-container" class="nes-dialog is-rounded">
<h2>Leaderboard</h2>
<form class="hidden" novalidate>
<div class="nes-field">
<label for="name">Your name</label>
<input type="text" id="name" class="nes-input" maxlength="50" />
</div>
<button class="nes-btn is-primary">Save</button>
</form>
<div id="leaderboard" class="nes-table-responsive hidden">
<table class="nes-table is-bordered is-centered">
<thead>
<tr>
<th>Rank</th>
<th>Name</th>
<th>Time</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<button id="close" type="button" class="nes-btn is-error">Close</button>
</dialog>
<script type="module" src="./src/main.ts"></script>
</body>
</html>