-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (62 loc) · 3.03 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
<!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>Color Switch</title>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2791700583625642"
crossorigin="anonymous"></script>
</head>
<body>
<canvas style="background-color: #191919;" id="canvas">
</canvas>
<div style="position: absolute; width: 100vw; height: 100vh; top: 0px; left: 0px;">
<h1 id="scoreTxt" style="font-size: 70px; color: white; position: relative; top: 170px; opacity: 0.5;">0</h1>
<div id="gameoverUI" style="position: absolute; top: 0px; left: 0px; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.527); display: none;">
<h1 style="font-size: 50px; color: white; position: relative; top: 0px;">Game Over!</h1>
<h1 id="scoreGameOverTxt" style="font-size: 30px; color: white; position: relative; top: -10px;">Score: 10</h1>
<h1 id="HighestScoreTxt" style="font-size: 30px; color: white; position: relative; top: -30px;">Highest Score: 10</h1>
<div onclick="restartGame()" id="pgBtn" style="width: 180px; height: 50px; background-color: rgb(144, 0, 206); margin: auto; border-radius: 10px; position: relative; top: 250px;">
<h1 style="font-size: 25px; color: white; position: relative; top: 5px; ">PLAY AGAIN</h1>
</div>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2791700583625642"
crossorigin="anonymous"></script>
<!-- Horizontal Display Ad -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-2791700583625642"
data-ad-slot="6981689559"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<!-- <div onclick="restartGame()" id="mnBtn" style="width: 180px; height: 50px; background-color: rgb(144, 0, 206); margin: auto; border-radius: 10px; position: relative; top: 200px;">
<h1 style="font-size: 25px; color: white; position: relative; top: 5px; ">MENU</h1>
</div> -->
</div>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js"></script>
<script src="index.js"></script>
</html>
<style>
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500&display=swap');
body{
overflow-x: hidden;
overflow-y: hidden;
margin: 0px;
}
h1{
font-family: 'Oswald', sans-serif;
text-align: center;
}
* {
user-select: none;
-khtml-user-select: none;
-o-user-select: none;
-moz-user-select: -moz-none;
-webkit-user-select: none;
}
</style>