-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
120 lines (120 loc) · 4.06 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
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
<!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" />
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
crossorigin="anonymous"
/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/global.css" />
<link rel="stylesheet" href="css/index.css" />
<title>Falling Words - Rodrigo Toyama</title>
</head>
<body>
<nav class="navbar navbar-expand-lg bg-transparent px-5">
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="how.html">How to Play</a>
</li>
<li class="nav-item">
<a class="nav-link" href="credits.html">Credits</a>
</li>
</ul>
</div>
</nav>
<div class="container main">
<div class="row align-items-center">
<div class="col-12">
<div class="row text-center my-4">
<div class="col-12">
<div class="logo-container">
<img src="images/logo-game.png" alt="logo" />
</div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-4">
<div class="buttons-container row">
<button
id="Easy"
value="3000"
onclick="buttonValue(this.id)"
class="col-12 btn-index"
>
<h2>EASY</h2>
</button>
<button
id="Medium"
value="2000"
onclick="buttonValue(this.id)"
class="col-12 btn-index"
>
<h2>MEDIUM</h2>
</button>
<button
id="Hard"
value="1000"
onclick="buttonValue(this.id)"
class="col-12 btn-index"
>
<h2>HARD</h2>
</button>
<button
id="Hard"
value="400"
onclick="buttonValue(this.id)"
class="col-12 btn-index"
>
<h2>IMPOSSIBLE</h2>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
crossorigin="anonymous"
></script>
<audio src="./sound/menusound.mp3" id="MenuSound" type="audio/mp3"></audio>
<audio id="HomeSound" autoplay loop controls>
<source src="./sound/homesound.mp3" type="audio/mp3" />
</audio>
<script src="./sound-buttons.js"></script>
<script>
// PASS THROUGH HTTP GET LEVEL SELECTED
function buttonValue(btnID) {
const params = new URLSearchParams();
const btnValue = document.getElementById(btnID).value;
params.append('lvl', btnValue);
window.location.href = `game.html?${params.toString()}`;
}
// DEFAULT VOLUME HOME SONG
const homeSound = document.getElementById('HomeSound');
homeSound.volume = 0.55;
</script>
</body>
</html>