generated from Code-Institute-Org/ci-full-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
275 lines (170 loc) · 7.77 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Trivia Survivor, use your knowledge of movie trivia to escape the creature.">
<meta name="keywords" content="Trivia, Survivor, movie, horror-movie, quiz, zombie">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes, maximum-scale=10">
<link rel="stylesheet" href="assets/css/style.css">
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon/favicon-16x16.png">
<link rel="manifest" href="assets/favicon/site.webmanifest">
<title>Trivia Survivor</title>
</head>
<body>
<!-- Main game container -->
<section class="flex-container">
<!-- Navigation bar to sit at the top of the screen -->
<div id="nav-box">
<nav>
<i class="fa-solid fa-house" id="home-btn"></i>
<i class="fa-solid fa-volume-off" id="sound-btn"></i>
<i class="fa-solid fa-circle-info" id="info-btn"></i>
<i class="fa-solid fa-star" id="score-btn"></i>
<i class="fa-solid fa-comment" id="comment-btn"></i>
</nav>
<div id="label-box">
<p id="home-label" class="hidden">Home</p>
<p id="sound-label" class="hidden">Sound is off</p>
<p id="info-label" class="hidden">About the game</p>
<p id="score-label" class="hidden">Scores</p>
<p id="comment-label" class="hidden">Feedback</p>
</div>
</div>
<!-- Title Card Section, first thing user will see -->
<div id="title-card" class="card">
<h1 id="title">TRIVIA SURVIVOR</h1>
<h2 id="sub-title">[Demo of the Dead]</h2>
<!-- username entry -->
<div id="enter-name">
<form action="javascript:void(0);" id="name-input">
<label for="name">Enter your name to begin:</label><br>
<input type="text" id="name" name="name" placeholder="Name" required><br>
<button type="submit" name="start-btn" id="start-btn" class="start-btn btn">Start</button>
</form>
</div>
<!-- Difficulty mode selection -->
<div id="choose-difficulty" class="hidden">
<button id="easy-btn" class="easy-btn btn" value="easy">Easy</button><br>
<button id="normal-btn" class="normal-btn btn" value="normal">Normal</button><br>
<button id="hard-btn" class="hard-btn btn" value="hard">Hard</button><br>
</div>
</div>
<!-- Game Card Section, the main portion of the game -->
<div id="game-card" class="card">
<!-- Top Half of the game card -->
<div id="creature-box" class="hidden">
<div id="danger-box">
<div class="danger-square">
<img id="danger-square-05" src="assets/images/danger-block-05.webp" class="hidden" alt="A red coloured square.">
</div>
<div class="danger-square">
<img id="danger-square-04" src="assets/images/danger-block-04.webp" class="hidden" alt="An orange coloured square.">
</div>
<div class="danger-square">
<img id="danger-square-03" src="assets/images/danger-block-03.webp" class="hidden" alt="A green-yellow mix coloured square.">
</div>
<div class="danger-square">
<img id="danger-square-02" src="assets/images/danger-block-02.webp" class="hidden" alt="A more pale green coloured square.">
</div>
<div class="danger-square">
<img id="danger-square-01" src="assets/images/danger-block-01.webp" class="hidden" alt="A green coloured square.">
</div>
</div>
<div id="view-box">
<img id="zombie" src="assets/images/zombie-approach-00.webp" alt="An empty corridor.">
</div>
</div>
<!-- Bottom half of the game card -->
<div id="question-box" class="hidden">
<div id="text-box">
</div>
<div id="next-btn-box">
<button class="hidden" id="next-btn">next >></button>
</div>
<div id="questions" class="hidden">
</div>
<div id="answers" class="hidden">
<button id="answer-btn-a" class="btn answer-btn" value="A" aria-label="Answer Button A">Answer A</button><br>
<button id="answer-btn-b" class="btn answer-btn" value="B" aria-label="Answer Button B">Answer B</button><br>
<button id="answer-btn-c" class="btn answer-btn" value="C" aria-label="Answer Button C">Answer C</button><br>
<button id="answer-btn-d" class="btn answer-btn" value="D" aria-label="Answer Button D">Answer D</button><br>
</div>
</div>
</div>
<!-- Screen to be displayed as win/lose result -->
<div id="results-card" class="card">
<div id="win-state" class="hidden">
<h1>YOU SURVIVED</h1>
<p id="win-text"></p>
<button id="win-replay-btn">Return</button>
</div>
<div id="fail-state" class="hidden">
<h1>YOU FAILED</h1>
<p id="fail-text"></p>
<button id="fail-replay-btn">Return</button>
</div>
</div>
<!-- Display of user scores -->
<div id="score-card" class="card">
<div id="survivor-box">
<h1>SURVIVED</h1>
<p id="survivors"></p>
</div>
<div id="failure-box">
<h1>FAILED</h1>
<p id="failures"></p>
</div>
<div id="score-btn-box">
<button id="continue-btn-score">Continue</button>
</div>
</div>
<!-- Description of the game -->
<div id="info-card" class="card">
<h1>INFORMATION</h1>
<p>Trivia Survivor is a survival quiz game. The rules are simple. You must test your knowledge of movie-triva against an approaching threat. The creature stalking you will advance a step with every wrong answer. Answer all 10 questions to survive. Good luck.</p>
<div id="info-btn-box">
<button id="continue-btn-info">Continue</button>
</div>
</div>
<!-- A feedback form -->
<div id="comment-card" class="card">
<h1>FEEDBACK</h1>
<p id="feedback-text">Thank you for checking out Trivia Survivor. Please consider leaving a comment on your experience with the game.</p>
<div id="feedback-form">
<form id="contact-form">
<input type="hidden" name="contact_number">
<label>Name:</label><br>
<input type="text" name="user_name" required><br>
<label>Email:</label><br>
<input type="email" name="user_email" required><br>
<label>Message:</label><br>
<textarea name="message" required></textarea><br>
<input type="submit" value="Send" id="send"><br><br>
</form>
<div id="form-btn-box">
<button id="continue-btn-comment">Continue</button>
</div>
</div>
</div>
</section>
<!-- Modal html from https://www.w3schools.com/howto/howto_css_modals.asp -->
<div id="modal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<p id="modal_message">What a horrible night to have a curse...</p>
<button id="continue-btn-modal">Continue</button>
</div>
</div>
<!-- Adding script for fontawesome icons -->
<script src="https://kit.fontawesome.com/5216db6454.js" crossorigin="anonymous"></script>
<!-- Link to emailJS script -->
<script src="https://cdn.jsdelivr.net/npm/@emailjs/browser@3/dist/email.min.js"></script>
<script src="assets/js/email.js"></script>
<!-- link to Javascript files -->
<script src="assets/js/script.js"></script>
<script src="assets/js/questions.js"></script>
</body>
</html>