-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
162 lines (158 loc) · 5.83 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/x-icon" href="./sprites/favicon-32x32.png" />
<title>Bodhi's Dreamworld</title>
<script src="./lib/main.js" type="module" defer></script>
<link rel="stylesheet" href="./css/styles.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=VT323&display=swap"
rel="stylesheet"
/>
</head>
<body>
<main>
<div class="canvas-container">
<canvas></canvas>
<div class="hud canvas-overlay">
<div class="row">
<div><span id="time-number">00:00</span></div>
<div class="hud-treats">
<img
src="./sprites/fish-12x12.png"
alt="Treat icon"
class="treat-icon"
/>
<span id="treats-collected">0</span> /
<span id="treats-total">0</span>
</div>
</div>
</div>
<div class="level-complete canvas-overlay hidden" id="level-complete">
Level Complete!
</div>
</div>
<div class="right">
<h1 class="title">Bodhi's Dreamworld</h1>
<div class="info-panel">
<div class="main-info">
<div id="level-display" class="level-display">
<button id="prev-level"><</button>
<div>
<div class="center-text">
Level <span id="level-number">1</span>
</div>
<div
class="unlocked-levels-display center-text"
id="unlocked-levels-display"
></div>
</div>
<button id="next-level">></button>
</div>
<p id="treats-display" class="info-display-between">
Treats:
<span
><span id="treats-collected">0</span> /
<span id="treats-total">0</span></span
>
</p>
<p id="time-display" class="info-display-between">
Time: <span id="time-number">00:00</span>
</p>
<p class="info-display-between">
Personal Best: <span id="pb-time-number"></span>
</p>
<div>
<div class="info-display-bottom">
<button id="delete-data-btn" class="delete-btn">
Delete Saved Data
</button>
</div>
<div class="btns info-display-between">
<button id="help-btn">?</button>
<button id="restart-btn">Restart</button>
</div>
</div>
</div>
<div class="help hidden">
<p>Help Bodhi get to the big jar of treats!</p>
<ul>
<li>Collect all the treats to unlock the next level.</li>
<li>
Grooming's no fun! Avoid the flying brushes, or you'll get
knocked back.
</li>
</ul>
<p></p>
<div class="controls">
<p class="info-display-between">
<span>Left:</span> <span>A or Left Arrow</span>
</p>
<p class="info-display-between">
<span>Right:</span> <span>D or Right Arrow</span>
</p>
<p class="info-display-between">
<span>Jump:</span> <span>W or Up Arrow</span>
</p>
</div>
</div>
</div>
</div>
</main>
<footer>
<p>
Created by
<a href="https://www.linkedin.com/in/stefan-vosloo/">
Stefan Vosloo
<?xml version="1.0" encoding="utf-8"?>
<svg
fill="#000000"
version="1.1"
id="lni_lni-linkedin-original"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 64 64"
style="enable-background: new 0 0 64 64"
xml:space="preserve"
>
<path
d="M58.5,1H5.6C3.1,1,1.1,3,1.1,5.5v53c0,2.4,2,4.5,4.5,4.5h52.7c2.5,0,4.5-2,4.5-4.5V5.4C63,3,61,1,58.5,1z M19.4,53.7h-9.1
V24.2h9.1V53.7z M14.8,20.1c-3,0-5.3-2.4-5.3-5.3s2.4-5.3,5.3-5.3s5.3,2.4,5.3,5.3S17.9,20.1,14.8,20.1z M53.9,53.7h-9.1V39.4
c0-3.4-0.1-7.9-4.8-7.9c-4.8,0-5.5,3.8-5.5,7.6v14.6h-9.1V24.2h8.9v4.1h0.1c1.3-2.4,4.2-4.8,8.7-4.8c9.3,0,11,6,11,14.2v16H53.9z"
/>
</svg>
</a>
</p>
<a href="https://github.com/saulthebear/bodhi-dreamworld"
>Check out the code
<?xml version="1.0" encoding="utf-8"?>
<svg
version="1.1"
id="lni_lni-github-original"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px"
y="0px"
viewBox="0 0 64 64"
style="enable-background: new 0 0 64 64"
xml:space="preserve"
>
<path
d="M32,1.8c-17,0-31,13.8-31,31C1,46.4,9.9,58,22.3,62.2c1.6,0.3,2.1-0.7,2.1-1.4c0-0.7,0-2.7-0.1-5.4
c-8.6,2-10.4-4.2-10.4-4.2c-1.4-3.5-3.5-4.5-3.5-4.5c-2.8-2,0.1-2,0.1-2c3.1,0.1,4.8,3.2,4.8,3.2c2.7,4.8,7.3,3.4,9,2.5
c0.3-2,1.1-3.4,2-4.2c-6.8-0.7-14.1-3.4-14.1-15.2c0-3.4,1.3-6.1,3.2-8.2c-0.3-0.7-1.4-3.9,0.3-8.2c0,0,2.7-0.8,8.6,3.2
c2.5-0.7,5.1-1.1,7.8-1.1c2.7,0,5.4,0.3,7.8,1.1c5.9-3.9,8.5-3.2,8.5-3.2c1.7,4.2,0.7,7.5,0.3,8.2c2,2.1,3.2,4.9,3.2,8.2
c0,11.8-7.3,14.5-14.1,15.2c1.1,1,2.1,3,2.1,5.8c0,4.2-0.1,7.5-0.1,8.5c0,0.8,0.6,1.7,2.1,1.4C54.1,57.8,63,46.3,63,32.6
C62.9,15.6,49,1.8,32,1.8z"
/>
</svg>
</a>
</footer>
</body>
</html>