-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (99 loc) · 4.23 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./assets/css/reset.css"/>
<link rel="stylesheet" href="./assets/css/styles.css"/>
<title>Code Quiz</title>
</head>
<body>
<header>
<button class = 'view-leaderboard' id = 'view-leaderboard'>View high scores</button>
<h1>Coding Quiz</h1>
<h2 class = 'timer'>Timer: <span id = 'timer'>60</span></h2>
</header>
<section class = 'start-game active section' id = 'start-game'>
<p class = 'start-text'>The quiz will start when you press the 'Start Quiz' button. Answering a question correctly will move you to the next question with no penalty;
answer incorrectly and you will still move on but also lose 5 seconds of time. Your final score upon quiz completion is your remaining time. Are you ready?
</p>
<button id = 'start-game'>
Start Quiz
</button>
</section>
<section class = 'section' id = 'question-1'>
<h3>Question #1</h3>
<p>What does HTML stand for?</p>
<div class = 'button-div'>
<button class = 'button-answer' data = 'incorrect'>
A. Hyper Trainer Marking Language
</button>
<button class = 'button-answer' data = 'incorrect'>
B. Hyper Text Marketing Language
</button>
<button class = 'button-answer' data = 'correct'>
C. Hyper Text Markup Language
</button>
<button class = 'button-answer' data = 'incorrect'>
D. Hyper Text Markup Leveler
</button>
</div>
</section>
<section class = 'section' id = 'question-2'>
<h3>Question #2</h3>
<p>Commonly used data types DO NOT include:</p>
<div class = 'button-div'>
<button class = 'button-answer' data = 'incorrect'>
A. Strings
</button>
<button class = 'button-answer' data = 'incorrect'>
B. Booleans
</button>
<button class = 'button-answer' data = 'incorrect'>
C. Arrays
</button>
<button class = 'button-answer' data = 'correct'>
D. Alerts
</button>
</div>
</section>
<section class = 'section' id = 'question-3'>
<h3>Question #3</h3>
<p>The condition in an if/else statement is enclosed with:</p>
<div class = 'button-div'>
<button class = 'button-answer' data = 'incorrect'>
A. Quotes
</button>
<button class = 'button-answer' data = 'correct'>
B. Parentheses
</button>
<button class = 'button-answer' data = 'incorrect'>
C. Curly Brackets
</button>
<button class = 'button-answer' data = 'incorrect'>
D. Square Brackets
</button>
</div>
</section>
<section class = 'game-end section' id = 'game-won'>
<h2>You won! Your score was: <span id = 'score'></span></h2>
<form id="win-form" class = 'win-form'>
<input type="text" class="form-input w-100" id="win-input" name="win-input" placeholder="Enter your initials" />
<button class = 'margin-top' id = 'win-submit'>Submit</button>
</form>
</section>
<section class = 'leaderboard-div section' id = 'leaderboard-div'> <!--The leaderboard has to have an extra div around it so that when we append user scores to it, they still appear above the button and not beneath it.-->
<div class = 'leaderboard' id = 'leaderboard'>
<h2>Leaderboard</h2>
</div>
<button class = 'margin-top' id = 'back'>Back</button>
</section>
<section class = 'game-end section' id = 'game-lost'>
<h2>You ran out of time. Refresh the page and try again!</h2>
</section>
<!--Adding jQuery to get some more practice using it even though it's technically part of the next module.-->
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src = './assets/js/script.js'>
</script>
</body>
</html>