-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
258 lines (246 loc) · 5.4 KB
/
index.html
File metadata and controls
258 lines (246 loc) · 5.4 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Trivia Game</title>
<link rel="stylesheet" href="./style.css">
</head>
<body onLoad="initCards();fetchRandomCategory();">
<html>
<div id="card1" class="screen">
<table id="tblOne">
<tr>
<td colspan="6">
<h1>Trivia Game</h1>
</td>
</tr>
<td>
<h2>Category</h2>
</td>
<td id="categoryIntro" colspan="2">Randomly Selected</td>
</tr>
<tr>
<td>
<h3>Question</h3>
</td>
<td colspan="2"><textarea type="text" id="questionIntro" rows="4" cols="60"
readonly>When competitors are asked questions about interesting but unimportant facts in many subjects</textarea>
</td>
<td> </td>
</tr>
<tr>
<td>
<h3>Answer</h3>
</td>
<td colspan="2"><input type="text" id="answerIntro" required minlength="4" maxlength="80" size="40"
value="A Trivia Game" readonly /></td>
<td> </td>
</tr>
<tr>
<tr>
<td> </td>
<td><button onClick="startGame();">Start Game</button></td>
</tr>
<tr>
<td></td>
</tr>
</table>
</div>
<div id="card2" class="screen">
<table id="tblTwo">
<tr>
<td colspan="6">
<h1>Trivia Game</h1>
</td>
</tr>
<tr>
<td>
<h2>Category</h2>
</td>
<td id="category1" colspan="2"></td>
</tr>
<tr>
<td>
<h3>Question</h3>
</td>
<td colspan="2"><textarea type="text" id="tblTwoBlankQuestion" rows="4" cols="60"
readonly>Loading... </textarea>
</td>
<td> </td>
</tr>
<tr>
<td>
<h3>Answer</h3>
</td>
<td colspan="2"><input type="text" id="blankAnswer" required minlength="4" maxlength="80" size="40" />
</td>
<td> </td>
</tr>
<tr>
<td></td>
<td><button onClick="submitAnswer();">Submit Answer</button></td>
</tr>
<tr>
<td id="points1"></td>
</tr>
</table>
</div>
<div id="card3" class="screen">
<table id="correctAnswer">
<tr>
<td colspan="6">
<h1>Trivia Game</h1>
</td>
</tr>
<tr>
<td>
<h2>Category</h2>
</td>
<td id="category2" colspan="2"></td>
</tr>
<tr>
<td>
<h3>Question<h3>
</td>
<td colspan="2"><textarea type="text" id="correctAnswerBlankQuestion" rows="4" cols="60"
readonly></textarea></td>
<td> </td>
</tr>
<tr>
<td>
<h3>Answer<h3>
</td>
<td colspan="2"><input type="text" id="answer" required minlength="4" maxlength="80" size="40" /></td>
<td> </td>
</tr>
<tr>
<td>Correct!</td>
<td><button>Continue Game</button></td>
<td><button>Exit Game</button></td>
</tr>
<tr>
<td id="points2">Current Points</td>
</tr>
</table>
</div>
<div id="card4" class="screen">
<table id="incorrectAnswer">
<tr>
<td colspan="6">
<h1>Trivia Game</h1>
</td>
</tr>
<tr>
<td>
<h2>Category</h2>
</td>
<td id="category3" colspan="2"></td>
<tr></tr>
<td>
<h3>Question<h3>
</td>
<td colspan="2"><textarea type="text" id="incorrectAnswerBlankQuestion" required rows="4" cols="60"
readonly></textarea></td>
<td> </td>
</tr>
<tr>
<td>
<h3>Answer<h3>
</td>
<td colspan="2"><input type="text" id="userAnswered" required minlength="4" maxlength="80" size="40"
readonly /></td>
<td> </td>
</tr>
<tr>
<td>Incorrect!</td>
<td><button onClick="seeCorrectAnswer();">See Correct Answer</button></td>
<td><button onClick="startNewGame();">Start a New Game</button></td>
</tr>
<tr>
<td>Current Points</td>
</tr>
</table>
</div>
<div id="card5" class="screen">
<table id="revealAnswer">
<tr>
<td colspan="6">
<h1>Trivia Game</h1>
</td>
</tr>
<tr>
<td>
<h2>Category</h2>
</td>
<td id="category4" colspan="2"></td>
</tr>
<tr>
<td>
<h3>Question</h3>
</td>
<td colspan="2"><textarea type="text" id="revealAnswerBlankQuestion" required rows="4" cols="60"
readonly></textarea></td>
<td> </td>
</tr>
<tr>
<td>
<h3>Answer</h3>
</td>
<td colspan="2"><input type="text" id="expectedAnswer" required minlength="4" maxlength="80" size="40"
readonly /></td>
<td> </td>
</tr>
<tr>
<td></td>
<td><button onClick="startNewGame();">Start a New Game</button></td>
<td><button onClick="exitGame();">Exit Game</button></td>
</tr>
<tr>
<td id="points4"></td>
</tr>
</table>
</div>
<div id="card6" class="screen">
<table id="tblExit">
<tr>
<td colspan="6">
<h1>Trivia Game</h1>
</td>
</tr>
<tr>
<td>
<h2>Category</h2>
</td>
<td id="categoryExit" colspan="2"></td>
</tr>
<tr>
<td>
<h3>Question</h3>
</td>
<td colspan="2"><textarea type="text" id="questionExit" required rows="4" cols="60"
readonly>Thanks for Playing!</textarea></td>
<td> </td>
</tr>
<tr>
<td>
<h3>Answer</h3>
</td>
<td colspan="2"><input type="text" id="exitGame" required minlength="4" maxlength="80" size="40"
value="" readonly /></td>
<td> </td>
</tr>
<tr>
<td></td>
<td colspan="2">Data from: "https://jservice.io/</td>
<td></td>
</tr>
<tr>
<td id="points5"></td>
</tr>
</table>
</div>
<script src="./code.js"></script>
</body>
</html>