-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
147 lines (137 loc) · 7.6 KB
/
index.html
File metadata and controls
147 lines (137 loc) · 7.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--CDN link to Bootstrap-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<!--API link to Google Fonts-->
<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=League+Script&family=Lora&display=swap" rel="stylesheet">
<!--My stylesheet-->
<link rel="stylesheet" href="./assets/css/style.css">
<!--CDN link for JQuery-->
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<title>Coding Quiz Challenge</title>
</head>
<body>
<!--Navigation bar-->
<header>
<nav class="customnavbar navbar navbar-expand-lg" style="background-color: var(--lilac)">
<div class="container-fluid">
<a id="brand" class="navbar-brand" href="#">keri<br>sen</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarText"
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarText">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item d-sm-none">
<a class="nav-link active" aria-current="page" onclick="refreshPage()" href="#">Home</a>
</li>
<li class="nav-item d-sm-none">
<a class="nav-link" id="checkscores" onclick="createHighscores()" href="#">View
Highscores</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!-- Main header that remains static -->
<h1 class="text-center">
Coding Quiz Challenge
</h1>
<div class="container text-center">
<div class="row align-center">
<!-- Question number that turns into tally score -->
<div class="col" id="tallyscore">
<h2 id="tally" class="hidden"></h2>
<div id="line" class="hidden">out of</div>
<h2 id="number" class="hidden"></h2>
</div>
<div class="col-10">
<!-- Quiz template with instructions on page load/refresh -->
<!-- Dynamically displays the JSON contents -->
<form name="quizInput" method="POST">
<div id="quiz">
<h5 class="card-title" id="question">Try to answer the following code-related questions within
the time limit.
Keep in mind that incorrect answers will penalize your score/time by ten seconds!</h5>
<div class="btn-group-vertical hidden" role="group" aria-label="Basic radio toggle button group"
id="answerList">
<a href="#" class="d-inline-flex focus-ring py-1 px-2 text-decoration-none">
<input type="radio" class="btn-check" name="options-base" id="check1" value="1"
autocomplete="off">
<label class="btn" for="check1"><span id="1"></span></label>
</a>
<a href="#" class="d-inline-flex focus-ring py-1 px-2 text-decoration-none">
<input type="radio" class="btn-check" name="options-base" id="check2" value="2"
autocomplete="off">
<label class="btn" for="check2"><span id="2"></span></label>
</a>
<a href="#" class="d-inline-flex focus-ring py-1 px-2 text-decoration-none">
<input type="radio" class="btn-check" name="options-base" id="check3" value="3"
autocomplete="off">
<label class="btn" for="check3"><span id="3"></span></label>
</a>
<a href="#" class="d-inline-flex focus-ring py-1 px-2 text-decoration-none">
<input type="radio" class="btn-check" name="options-base" id="check4" value="4"
autocomplete="off">
<label class="btn" for="check4"><span id="4"></span></label>
</a>
</div>
<br />
<!-- Button to start quiz and also answer the questions - runs counter -->
<button type="reset" class="btn btn-primary" id="clickHere">Start Quiz</a>
</div>
</form>
<div class="text-body-secondary">
<!-- Quiz timer -->
<div class="navbar-text hidden" id="time">
Time: <span id="countdown"></span>
</div>
<!-- Feedback to user on success of last question -->
<div class="alert alert-success hidden" role="alert" id="correct">
Correct!
</div>
<div class="alert alert-warning hidden" role="alert" id="wrong">
Wrong!
</div>
</div>
</div>
<!--Results page that gives the score and allows the user the option to enter initials-->
<div class="hidden" id="newresults">
<h3 class="completed">All done!</h3>
<div class="content" id="submitScore">
<p>Your final score is: <span id="score"></span></p>
<p>Enter initials: <input id="initials" type="text" /></p>
<button class="btn btn-outline-secondary" type="button" id="enterScore">Enter score</button>
</div>
</div>
<!--Highscores page that pulls results from local storage and displays along with current score-->
<div class="hidden" id="highscores">
<h3 class="scoreboard">Highscores</h3>
<ol id="scoreList" class="list-group list-group-flush list-group-numbered">
<!-- dynamically generated ordered list -->
</ol>
<div class="content" id="goodbye">
<button type="button" id="goback" class="btn btn-light customBtn" onclick="refreshPage()">Go
Back</button>
<button type="button" id="clearscores" class="btn btn-light customBtn" onclick="clearScores()">Clear
Scores</button>
</div>
</div>
</div>
</div>
<!--Link to my javascript file-->
<script src="./assets/js/script.js"></script>
<!--Link to Bootstrap javascript CDN-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
</body>
</html>