forked from rocketacademy/video-poker-bootcamp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
104 lines (101 loc) · 2.84 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
<!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>Pokermon</title>
<link
href="https://fonts.googleapis.com/css?family=Press+Start+2P"
rel="stylesheet"
/>
<link
href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css"
rel="stylesheet"
/>
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico" />
<style>
body {
font-family: "Press Start 2P", cursive;
background-color: #16d6fb;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
text-align: center;
min-height: 100vh;
}
.title-description {
font-size: 12px;
margin-bottom: 1rem;
}
img {
width: 300px;
display: block;
margin: 0 auto;
}
i {
margin-bottom: 1rem;
}
.logo {
display: inline-block;
}
.select {
display: flex;
flex-direction: column;
justify-content: flex-start;
text-align: left;
}
label {
position: relative;
left: -10px;
}
</style>
</head>
<body>
<img src="./assets/pokermon-logo.png" alt="Pokermon" />
<span class="nes-text title-description">Pokemon Video Poker</span>
<div class="logo">
<i class="nes-pokeball"></i>
</div>
<div class="select">
<label class="nes-pointer">
<input type="radio" class="nes-radio" name="answer" checked />
<span class="nes-text start">Start</span>
</label>
<label class="nes-pointer">
<input type="radio" class="nes-radio" name="answer" />
<span class="nes-text option">Option</span>
</label>
</div>
<audio
id="audio"
class="audio"
src="./assets/pokemon-notification.mp3"
></audio>
<script>
// set background color based on host
gameHost = localStorage.getItem("host");
if (gameHost === null || gameHost === "") gameHost = "nes-bulbasaur";
if (gameHost.includes("squirtle")) {
document.body.style.backgroundColor = "#5EBDFC";
} else if (gameHost.includes("charmander")) {
document.body.style.backgroundColor = "#CE2211";
}
const start = document.querySelector(".start");
start.onclick = () => {
document.getElementById("audio").play();
setTimeout(() => {
window.location.href = "game.html";
}, 3000);
};
const option = document.querySelector(".option");
option.onclick = () => {
document.getElementById("audio").play();
setTimeout(() => {
window.location.href = "option.html";
}, 3000);
};
</script>
</body>
</html>