-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
194 lines (171 loc) · 5.18 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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html>
<head>
<script src="https://www.gstatic.com/firebasejs/5.9.4/firebase.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<meta charset="utf-8" />
<title>Grav Ball</title>
<link href="https://fonts.googleapis.com/css?family=Orbitron:700" rel="stylesheet">
<style>
* {
padding: 0;
font-family: 'Orbitron', sans-serif;
background: black;
text-align: center;
}
html{
max-width: 100vw;
}
body{
max-width: 100vw;
}
a{font-size: 45px; margin: 10px;color: inherit;}
i{color:white;}
#highScores > h1{
font-size: 19px;
}
canvas {
display: block;
clip-path: polygon(
0% 5%, /* top left */
5% 0%, /* top left */
95% 0%, /* top right */
100% 5%, /* top right */
100% 95%, /* bottom right */
95% 100%, /* bottom right */
5% 100%, /* bottom left */
0% 95% /* bottom left */
);
margin: 0;
margin-right: 8vw;
margin-top: 5vh;
margin-left: 25px;
}
#score-card{
margin-right: 10px;
width: 100px;
}
#score-container{
display:flex;
flex-direction: column;
}
li{
margin-top: 15px;
text-align: center;
color: black;
background: white;
padding: 5px;
border-radius: 5px;
}
.game{
display:flex;
justify-content: space-between;
height: 100%;
}
form > h1{
padding 5px;
}
.game > div{
min-width: 300px;;
min-height: 100%;
margin-left: 45px;
}
footer{
color: white;
}
form{
padding: 5px;
display: none;
position: absolute;
flex-direction: column;
color: white;
top: 45%;
left: 43vw;
clip-path: polygon(
0% 5%, /* top left */
5% 0%, /* top left */
95% 0%, /* top right */
100% 5%, /* top right */
100% 95%, /* bottom right */
95% 100%, /* bottom right */
5% 100%, /* bottom left */
0% 95% /* bottom left */
);
}
input, button{background: white;
color: black;
border-radius: 5px;}
#Instructions{
margin-top: 30%;
margin-left: 35px;
word-wrap: normal;
margin-right: 20px;ß
}
#playButton{
display: hidden;
visibility: none;
opacity: 0;
}
.scorecontainer{
display:flex;
color:white;
}
ul{list-style: none;}
</style>
<script src='bundle.js'></script>
</head>
<body>
<div class="game">
<div><p id="Instructions">
<p id='instruct1'>
Welcome to Grav Ball!<br>
The Objective is simple: Collect as many coins as possible<br>
</p>
<br>
<p id='instruct2'>
Move and jump with the arrow keys or WASD<br>
Rotate Gravity with Q and E<br>
If you get hit, its game over!<br>
</p>
<br>
<p id='instruct3'>
Collect the yellow coins to increase your score!
</p>
<br>
<br>
<p id="instruct4">
Good Luck! You're going to need it... <br>
Press Space whenever you're ready to start!
</p>
</p></div>
<canvas id="Canvas" width="700" height="700"></canvas>
<div class="scorecontainer">
<h2 id="score-card">Score: --</h2>
<div id="highScores">
<h1>
Top Ten Grav Ballas<br>
</h1>
<ul id="scoreList">
</ul>
</div>
</div>
</div>
<footer id="footer">
<p>Game concept and music by Nicolas Schneider</p>
<div>
<a href="https://www.linkedin.com/in/nicolas-schneider-01/"><i id="icon3" class="fab fa-linkedin-in"></i></a>
<a href="https://github.com/NicolasESchneider"><i id="icon" class="fab fa-github"></i></a>
<a><i id="icon2" class="fas fa-user-circle"></i></a>
</div>
</footer>
<form id="form">
<h1>
Submit Your Score
</h1>
<input id="name" type="text" placeholder="enter your name" />
<input id="score" readOnly/>
<button id="submit">Submit Score</button>
</form>
</body>
</html>