-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (50 loc) · 2.21 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
<!--
QuizApp v. v. 1.017
By Michal Futera
https://linktr.ee/mjfutera
-->
<!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>Quiz app by Michal Futera</title>
<link rel="stylesheet" href="styles.css">
<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=Roboto&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<div id="questionHeader">
<h1 id="question">Sample question</h1>
<h3 id="questionCategory">Question category</h3>
<h5>Your current result is <span id="currentResult">0</span> points</h5>
<h5>Your best result is <span id="bestResult">0</span> points</h5>
<marquee>
<ol id="bestResults">Best results:
</ol>
</marquee>
</div>
<div id="answers">
<div class="answer">
<h2>Sample answer</h2>
</div>
</div>
<div id="buttons">
<button type="button" class="button" id="getQuestion">Get another question</button>
<button type="button" class="button" id="submitResult">Submit Your result</button>
<button type="button" class="button" id="addNewQuestion" onclick="window.location.href = 'add.html';">Add new question</button>
</div>
</div>
<footer>Quiz app by ©<a href="https://linktr.ee/mjfutera" target="_blank">Michał Futera</a><br>
<a target="_blank" href="https://www.freepik.com/free-vector/space-game-background-neon-night-alien-landscape_7671274.htm#query=space%20background&position=20&from_view=keyword">Image by upklyak</a> on Freepik</footer>
</body>
<script src="scripts.js"></script>
<script>
window.addEventListener("load", showQuestion);
window.addEventListener("load", showResults);
document.getElementById("getQuestion").addEventListener("click", showQuestion);
document.getElementById("submitResult").addEventListener("click", postResult);
</script>
</html>