generated from Code-Institute-Org/gitpod-full-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
quiz.html
94 lines (93 loc) · 3.83 KB
/
quiz.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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta Tags -->
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Online Interactive Quiz on General Knowledge">
<meta name="keywords" content="quiz, online, interactive, general knowledge, multiple choice, fun, learn, challenging">
<!-- Link to Logo icon -->
<link rel="icon" href="assets/images/icon.jpg" type="image/x-icon">
<!-- Link to my Stylesheet -->
<link rel="stylesheet" href="assets/css/styles.css">
<title>Quizzified | Online Quiz</title>
</head>
<body>
<header>
<h1><a href="index.html" title="Link to Home Page (back to start)">Quizzified</a></h1>
</header>
<main>
<!-- Quiz Area -->
<div id="game-area" class="game-area">
<!-- Question Count and Progress Bar -->
<div class="progress">
<div class="progress-txt">
<p id="exhibit-num">1</p>
<p> / </p>
<p>10</p>
</div>
<div class="progress-outline">
<div id="progress-bar" class="progress-bar"></div>
</div>
</div>
<!-- Question and answer options -->
<div class="quiz-container">
<div id="quiz" tabindex="0"></div>
</div>
<!-- Error Message -->
<div class="quiz-feedback">
<p id="error-msg"></p>
</div>
<!-- Previous, Next and Results Buttons -->
<div class="controls">
<button id="previous" aria-label="Previous Button" type="button"
class="btn btn-nav btn-nav--pre">Previous</button>
<button id="next" aria-label="Next Button" type="button"
class="btn btn-nav btn-nav--next">Next</button>
<button id="submit" aria-label="Results Button" type="button"
class="btn btn-submit" onclick="getResults();">Results</button>
</div>
</div>
<!-- Results Area -->
<div id="result-area" class="result-area" style="display:none;">
<div class="icon" id="icon"></div>
<p id="comment"></p><br>
<p>You scored</p>
<span id="result"></span>
<button id="play-again" aria-label="Play Again" type="button"
class="btn btn-start" onclick="location.reload();">Play Again</button>
</div>
</main>
<footer>
<div class="social-links">
<ul>
<li>
<a href="https://www.linkedin.com/in/monique-parnis/" target="_blank" rel="noopener"
aria-label="Visit my Linked In Profile (opens in a new tab)">
<i class="fa-brands fa-linkedin"></i>
</a>
</li>
<li>
<a href="https://github.com/MoniPar" target="_blank" rel="noopener"
aria-label="Visit my GitHub Profile (opens in a new tab)">
<i class="fa-brands fa-square-github"></i>
</a>
</li>
</ul>
</div>
<p>© 2022 | Quizzified by Monique Parnis</p>
</footer>
<!-- Link for External JavaScript -->
<script src="assets/js/script.js"></script>
<!-- Internal JavaScript code -->
<script>
// Calls function to build quiz
generateQuiz();
// Calls function to display only one quiz question and its answer options
showExhibit(currentExhibit);
</script>
<!-- Fontawesome Link -->
<script src="https://kit.fontawesome.com/967a4d433b.js" crossorigin="anonymous"></script>
</body>
</html>