-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.html
66 lines (53 loc) · 2.33 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Quiz App</title>
<!-- Favicon -->
<link rel="icon" type="image/png" href="./resources/favicon.png">
<!-- Font-awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css">
<!-- Bootsrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<!-- Custom CSS -->
<link rel="stylesheet" href="./styles/index.css">
</head>
<body>
<script>
// ------------Main container-------------
var mainContainer = document.createElement('div');
mainContainer.setAttribute('class', 'container');
document.body.append(mainContainer);
// -------------Header---------------------
var indexHeader = document.createElement('div');
indexHeader.setAttribute('class', 'index-header');
indexHeader.innerHTML = "<h1>Quick Quiz</h1>"
mainContainer.appendChild(indexHeader);
// ------------ Play Button ------------------
var playButton = document.createElement('a');
playButton.setAttribute('href', './pages/game.html');
mainContainer.appendChild(playButton);
var btn1 = document.createElement('button');
btn1.setAttribute('id', 'play');
btn1.innerText = "Play"
var i1 = document.createElement('i');
i1.setAttribute('class','fa ml-2 fa-play');
i1.setAttribute('aria-hidden', 'true');
btn1.appendChild(i1);
playButton.appendChild(btn1);
// -------------- High Scores Button -------------
var highScoreButton = document.createElement('a');
highScoreButton.setAttribute('href', './pages/highscores.html');
mainContainer.appendChild(highScoreButton);
var btn2 = document.createElement('button');
btn2.setAttribute('id', 'highScores');
btn2.innerText = "High Scores"
var i2 = document.createElement('i');
i2.setAttribute('class','fa ml-2 fa-trophy');
i2.setAttribute('aria-hidden', 'true');
btn2.appendChild(i2);
highScoreButton.appendChild(btn2);
</script>
</body>
</html>