generated from Code-Institute-Org/ci-full-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
238 lines (224 loc) · 8.93 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta data -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Webpage description -->
<meta name="description" content="Guess The Rainbow is a fun quiz to help you learn how to mix colours.">
<!-- Keywords used by search engines -->
<meta name="keywords" content="guess the rainbow, colour mixer quiz">
<!-- link to style sheet -->
<link rel="stylesheet" href="assets/css/style.css">
<!-- link to favicon -->
<link rel='shortcut icon' type='image/x-icon' href='favicon.ico'>
<!-- Page title for browser tab -->
<title>Guess The Rainbow</title>
</head>
<body>
<header>
<!-- Logo and game title -->
<div id="logo">
<img src="assets/images/logo.webp" alt="Rainbow logo">
<h1>Guess The Rainbow</h1>
</div>
</header>
<main id="game-area">
<!-- Question -->
<div id="question">
<div class="question-container">
<div id="first-colour" class="question-box">
<span id="first-colour-text"></span>
<span class="sr-only" id="sr-first-text"></span>
</div>
<i class="fas fa-plus" aria-hidden="true"></i>
<span class="sr-only">plus</span>
<div id="second-colour" class="question-box">
<span id="second-colour-text"></span>
<span class="sr-only" id="sr-second-text"></span>
</div>
<i class="fas fa-equals" aria-hidden="true"></i>
<span class="sr-only">equals</span>
<div id="answer">
<i id="question-mark" class="fas fa-question" aria-hidden="true"></i>
<span class="sr-only" id="sr-answer-text"></span>
<span id="answer-colour-text"></span>
</div>
</div>
<button id="submit" class="btn">Submit Answer</button>
</div>
<!-- Answer selection grid -->
<div id="options">
<div class="grid-container">
<div class="grid-item orange">
<span class="colour-text">orange</span>
<span class="sr-only">orange</span>
</div>
<div class="grid-item green">
<span class="colour-text">green</span>
<span class="sr-only">green</span>
</div>
<div class="grid-item purple">
<span class="colour-text">purple</span>
<span class="sr-only">purple</span>
</div>
<div class="grid-item pink">
<span class="colour-text">pink</span>
<span class="sr-only">pink</span>
</div>
<div class="grid-item l-blue">
<span class="colour-text">light blue</span>
<span class="sr-only">light blue</span>
</div>
<div class="grid-item l-yellow">
<span class="colour-text">light yellow</span>
<span class="sr-only">light yellow</span>
</div>
<div class="grid-item d-red">
<span class="colour-text">dark red</span>
<span class="sr-only">dark red</span>
</div>
<div class="grid-item d-blue">
<span class="colour-text">dark blue</span>
<span class="sr-only">dark blue</span>
</div>
<div class="grid-item d-yellow">
<span class="colour-text">dark yellow</span>
<span class="sr-only">dark yellow</span>
</div>
</div>
</div>
<!-- Current score -->
<div id="score">
<p>Score: <span id="score-span"></span> / <span id="questions-answered-span"></span></p>
</div>
<!-- Instructions and reset buttons -->
<div id="buttons">
<div>
<span>
<button id="instructions-btn" class="btn">Instructions</button>
</span>
<span>
<button id="reset-btn" class="btn">Reset</button>
</span>
</div>
</div>
</main>
<!-- Welcome modal -->
<div id="welcome">
<div id="welcome-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="close-x" title="close">×</span>
<h2>Welcome to Guess the Rainbow!</h2>
</div>
<div class="modal-body">
<p>Answer 9 questions to test your knowledge of colour mixing</p>
<p>The correct answer is the result of mixing the two colours given in the question</p>
<p>Choose your answer from the colour grid below the question and submit button</p>
</div>
<div class="modal-footer">
<h3>Enjoy the game!</h3>
</div>
</div>
</div>
</div>
<!-- Instructions modal -->
<div id="instructions">
<div id="instructions-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="close-x" title="close">×</span>
<h2>Instructions</h2>
</div>
<div class="modal-body">
<p>Determine what the resulting colour would be after mixing the two colours given in the question
</p>
<p>Select your answer from the colour grid and hit the submit button below the question</p>
<p>Click the reset button to start the game again</p>
</div>
<div class="modal-footer">
<h3>Enjoy the game!</h3>
</div>
</div>
</div>
</div>
<!-- Correct answer modal -->
<div id="correct">
<div id="correct-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="close-x" title="close">×</span>
<h2>Correct!</h2>
</div>
<div class="modal-body">
<p>You got the right answer!</p>
</div>
<div class="modal-footer">
<h3>Congratulations!</h3>
</div>
</div>
</div>
</div>
<!-- No answer selected modal -->
<div id="select">
<div id="select-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="close-x" title="close">×</span>
<h2>Select an Answer</h2>
</div>
<div class="modal-body">
<p>Answer the question to continue</p>
<p>Select a colour to answer the question</p>
</div>
<div class="modal-footer">
<h3>Try again</h3>
</div>
</div>
</div>
</div>
<!-- Incorrect answer modal -->
<div id="incorrect">
<div id="incorrect-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="close-x" title="close">×</span>
<h2>Incorrect</h2>
</div>
<div class="modal-body">
<p>The correct answer is</p>
<span id="correct-answer-colour">
<span id="correct-answer-text"></span>
</span>
</div>
<div class="modal-footer">
<h3>Better luck next time</h3>
</div>
</div>
</div>
</div>
<!-- End game modal -->
<div id="end-game">
<div id="end-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<span class="close-x" title="close">×</span>
<h2>Congratulations</h2>
</div>
<div class="modal-body">
<p>You have finished the quiz</p>
</div>
<div class="modal-footer">
<h3>You scored <span id="end-score-span"></span> / 9</h3>
</div>
</div>
</div>
</div>
<!-- Font Awesome embed code -->
<script src="https://kit.fontawesome.com/8e292ce701.js" crossorigin="anonymous"></script>
<!-- Link to javascript file -->
<script src="assets/js/script.js"></script>
</body>
</html>