-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (77 loc) · 3.68 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#000000">
<title>Quiz</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="styles.css">
<link rel="icon" type="image/png" href="brain.png">
<link rel="manifest" href="manifest.json">
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('sw.js').then(function (registration) {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function (err) {
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>
</head>
<!-- Custom JavaScript -->
<script src="script.js"></script>
<body>
<!-- theme combobox and file selector -->
<div class="justify-content-between p-3 bg-light" id="navbar">
<!-- theme combobox and file selector -->
<div class="container-fluid">
<div class="row justify-content-around">
<div class="col-12 col-md-2 mb-2">
<h2 class="mb-0" id="quiz">Quiz</h2>
</div>
<div class="col-12 col-md-2 mb-2">
<button class="btn btn-secondary w-100" id="fileButton"
onclick="document.getElementById('customFile').click()">Choose
file</button>
<div class="custom-file" style="display: none;">
<input type="file" class="custom-file-input" id="customFile" onchange="loadFile(event)">
<label class="custom-file-label" for="customFile"></label>
</div>
</div>
<div class="col-12 col-md-2 mb-2">
<button class="btn btn-success w-100" id="refreshButton"
onclick="refreshQuestions()">Refresh</button>
</div>
<div class="col-12 col-md-2 mb-2">
<button class="btn btn-primary w-100" id="checkButton" onclick="checkAnswers()">Check</button>
</div>
<div class="col-8 col-md-2 mb-2">
<select id="themeSelect" class="form-select" onchange="changeMode()">
<option value="light">Light Mode</option>
<option value="dark">Dark Mode</option>
<option value="system" selected>Follow System</option>
</select>
</div>
<div class="col-4 col-md-1">
<div class="input-group">
<input type="number" class="form-control dark-mode-toggle" aria-label="Default"
aria-describedby="inputGroup-sizing-default" id="numQuestions" min="1" value="10">
</div>
</div>
</div>
</div>
</div>
<div id="questionsContainer" class="questions-container"></div>
<div id="correctCount"></div>
</nav>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>