-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
149 lines (143 loc) · 3.86 KB
/
index.php
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<head>
<script defer src="js/howler.min.js"></script>
<script defer src="js/utils.js"></script>
<script defer src="js/classes.js"></script>
<script defer src="index.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet" />
<style>
* {
box-sizing: border-box;
font-family: "Press Start 2P", cursive;
}
body {
background-color: black;
display: grid;
place-content: center;
}
@keyframes rainbow_animation {
0%,
100% {
background-position: 0 0;
}
50% {
background-position: 100% 0;
}
}
</style>
</head>
<body>
<!-- red container div -->
<div style="position: relative; display: inline-block">
<!-- smaller red container div -->
<div style="
position: absolute;
display: flex;
width: 100%;
align-items: center;
padding: 20px;
">
<!-- player health -->
<div style="
position: relative;
width: 100%;
display: flex;
justify-content: flex-end;
border-top: 4px solid white;
border-left: 4px solid white;
border-bottom: 4px solid white;
">
<div style="background-color: red; height: 30px; width: 100%"></div>
<div id="playerHealth" style="
position: absolute;
background: #818cf8;
top: 0;
right: 0;
bottom: 0;
width: 100%;
"></div>
</div>
<!-- timer -->
<div id="timer" style="
background-color: black;
width: 100px;
height: 50px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
color: white;
border: 4px solid white;
">
10
</div>
<!-- player2 health -->
<div style="
position: relative;
width: 100%;
border-top: 4px solid white;
border-right: 4px solid white;
border-bottom: 4px solid white;
">
<div style="background-color: yellow; height: 30px"></div>
<div id="player2Health" style="
position: absolute;
background: #818cf8;
top: 0;
right: 0;
bottom: 0;
left: 0;
"></div>
</div>
<div></div>
</div>
<div id="displayText" style="
position: absolute;
color: white;
display: none;
align-items: center;
justify-content: center;
top: 0;
right: 0;
bottom: 0;
left: 0;
"></div>
<div id="displayButton" style="
position: absolute;
top: 320px;
right: 0;
bottom: 0;
left: 440px;
height: 50px;
width: 150px;
background-color: white;
display: none;
">
<form action="php/insert.php" method="post">
<input type="number" id="winner" name="winner" value="" style="display: none;">
<input type="text" id="playerName" name="playerName" value="" style="display: none;">
<input type="submit" name="save-score" value="Save Score" style="
border: none;
background: linear-gradient(
to right,
#6666ff,
#0099ff,
#00ff00,
#ff3399,
#6666ff
);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: rainbow_animation 6s ease-in-out infinite;
background-size: 400% 100%;
width: 150px;
height: 50px;
">
</input>
</form>
</div>
<canvas></canvas>
</div>
</body>