-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
64 lines (58 loc) · 1.54 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
<html>
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<title>Pong</title>
<style>
canvas {
display: none;
margin: auto;
border:solid 10px white;
border-left: none;
border-right: none;
height: 100%;
max-width: 100%;
box-sizing: border-box;
}
body {
margin : 0;
border: none;
width:100%;
height:100%;
display: grid;
background-color: black;
}
#intro{
background-color: yellow;
text-align: center;
box-sizing: border-box;
margin: auto;
padding: 5%;
font-family: 'Roboto Mono', monospace;
color: black;
font-size: 20px;
}
#intro h1{
text-transform: uppercase;
}
</style>
</head>
<body onclick="run()">
<div id="intro">
<h1>Pong!</h1>
</br>
<p>Controls for Player 1 : W - Up, S - Down </p>
<p>Controls for Player 2 : <i class="fas fa-arrow-up"></i> - Up, <i class="fas fa-arrow-down"></i> - Down </p>
</br>
<h2>Click anywhere to start!</h2>
</div>
<canvas id="backdrop" width="800" height="400" />
<script src="pong.js"></script>
<script>
function run(){
document.getElementById("intro").style.display = "none";
document.getElementById("backdrop").style.display = "grid";
}
</script>
</body>
</html>