-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
181 lines (163 loc) · 7.78 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lava Leap</title>
<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=Montserrat:ital,wght@0,300;0,400;0,500;0,600;1,300;1,500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<main>
<!-- game welcome -->
<div id="game-start-container">
<div class="title-container" id="title-container">
<h1>Lava Leap</h1>
</div>
<!-- game about -->
<div id="game-about-container" class="vertical-container">
<div class="row-container gap-40 capture-container">
<div class="align-right">
<p class="about-text">Capture the gold</p>
</div>
<div class="align-left coins-animation animation">
<div class="front-coin"></div>
<div class="front-coin"></div>
<div class="front-coin"></div>
</div>
</div>
<div class="row-container gap-40 elude-container">
<div class="align-right">
<p class="about-text">Elude the flames</p>
</div>
<div class="align-left lava-animation animation">
<div class="front-lava"></div>
</div>
</div>
<div class="row-container gap-40 levels-container">
<div class="align-right">
<p class="about-text">Levels</p>
</div>
<div class="align-left animation">
<p class="levels-number">5</p>
</div>
</div>
<div class="row-container gap-40">
<div class="align-right">
<p class="about-text">Lives</p>
</div>
<div class="align-left animation lives-container">
<p id="welcome-lives-number">3</p>
<div class="you-choose">
<button id="lives-button" class="lives-button">Change lives</button>
</div>
</div>
</div>
</div>
<div id="start-button-container" class="container start-button-container">
<button id="start-button">Start Game</button>
</div>
</div>
<!-- modal -->
<div id="modal-overlay" class="modal-overlay">
<div id="modal" class="modal" tabindex="-1">
<h4>Choose Lives</h4>
<p class="vertical-paragraph">
<span>
Set the number of lives directly here, or
</span>
<span>
append <code>?lives=number</code> to the URL.
</span>
</p>
<div id="error-message-container" class="error-message-container">
<p class="vertical-paragraph">
<span><span class="emoji">⚠️</span>Enter a number between 1 and 10, or</span>
<span>press Cancel to keep the current number.</span>
</p>
</div>
<form id="modal-form">
<div class="modal-input-container">
<label for="modal-input">
Enter number of lives (max 10)
</label>
<input id="modal-input" class="modal-input" name="lives" autocomplete="off">
</div>
<div class="buttons-container">
<button type="button" class="modal-button" id="modal-close">Cancel</button>
<button type="submit" class="modal-button" id="modal-submit">Save</button>
</div>
</form>
</div>
</div>
<!-- game end -->
<div id="game-end-container">
<div class="end-message">
<span id="end-message-one"></span>
<span id="end-message-two"></span>
</div>
<button id="restart-button">Restart Game</button>
</div>
<!-- game stats -->
<div id="game-stats-container" class="vertical-container">
<div class="row-container-stats gap-20">
<div class="align-right">
<p class="stats-text">Lives: </p>
</div>
<div class="align-left">
<p id="lives-container" class="stats-number">3</p>
</div>
</div>
<div class="row-container-stats gap-20">
<div class="align-right">
<p class="stats-text">Level: </p>
</div>
<div class="align-left level-text">
<p id="level-number" class="stats-number">1</p>
<!-- <p>of</p>
<p id="total-levels">5</p> -->
</div>
</div>
<div class="row-container-stats gap-20 margin-top-30 centered">
<div class="align-right">
<p class="stats-heading">COINS </p>
</div>
<div class="align-left">
</div>
</div>
<!--
<div class="margin-top-30 centered">
<p class="stats-heading">COINS </p>
</div> -->
<div class="row-container-stats gap-20">
<div class="align-right">
<p class="stats-text">Collected: </p>
</div>
<div class="align-left">
<p id="coins-collected-container" class="stats-number">0</p>
</div>
</div>
<div class="row-container-stats gap-20">
<div class="align-right">
<p class="stats-text">Remaining: </p>
</div>
<div class="align-left">
<p id="coins-remaining-container" class="stats-number">0</p>
</div>
</div>
</div>
</main>
<script type="module" src="./src/domElements.js"></script>
<script type="module" src="./src/classes.js"></script>
<script type="module" src="./src/displayClass.js"></script>
<script type="module" src="./src/utils/parseURLQuery.js"></script>
<script type="module" src="./src/utils/arrowKeys.js"></script>
<script type="module" src="./src/gameLogic.js"></script>
<script type="module" src="./src/levels.js"></script>
<script type="module" src="./src/utils/launchConfetti.js"></script>
<script type="module" src="./src/modalClass.js"></script>
<script type="module" src="main.js"></script>
</body>
</html>