-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
98 lines (90 loc) · 2.2 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
<!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>Becomb Game</title>
</head>
<body>
<canvas id="canvas"></canvas>
<div id="cover">
<div class="popup">
<!-- <br> -->
<div class="title">Instructions</div>
<div>Player 1: <kbd>W</kbd><kbd>A</kbd><kbd>S</kbd><kbd>D</kbd> and <kbd>Q</kbd></div>
<div>Player 2: <kbd>I</kbd><kbd>J</kbd><kbd>K</kbd><kbd>L</kbd> and <kbd>U</kbd></div>
<!-- <br> -->
<div>Start game: <kbd>Spacebar</kbd></div>
<!-- <br> -->
<div>Restart game: <kbd>R</kbd></div>
<button id="fullscreen">Start</button>
</div>
</div>
<style>
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
* {
margin: 0;
padding: 0;
font: inherit;
text-transform: uppercase;
}
body {
font-family: 'Press Start 2P', cursive;
background-color: rgb(29, 29, 46);
overflow: hidden;
height: 100vh;
display: flex;
justify-content: center;
/* flex-direction: row; */
}
#canvas {
/* max-width: 100%; */
height: 100vh;
image-rendering: pixelated;
}
#cover {
position: absolute;
width: 100%;
height: 100%;
background-color: #555a;
display: grid;
place-items: center;
}
#fullscreen {
/* padding: 10px 20px; */
/* width: 300px; */
height: 50px;
color: white;
background-color: #db653a;
/* border-top: */
border: rgb(215, 130, 99) outset;
}
.popup {
width: 500px;
/* height: 500px; */
padding: 20px;
/* position: absolute;
top: calc(50% - 250px);
left: calc(50% - 200px); */
display: flex;
flex-direction: column;
gap: 30px;
background-color: #ccc;
}
.title {
width: 100%;
text-align: center;
font-weight: bold;
color: #c45831;
}
kbd {
margin: 0 3px;
padding: 3px 5px;
background-color: #aaa;
}
</style>
<script type="module" src="/src/index.ts">
</script>
</body>
</html>