-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (84 loc) · 2.02 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Tetris</title>
<link href="https://unpkg.com/nes.css@2.3.0/css/nes.min.css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
<style>
html,
body,
pre,
code,
kbd,
samp {
font-family: 'Press Start 2P', cursive;
}
body {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: center;
flex-wrap: nowrap;
}
#tetris-container {
margin: 1rem;
padding: 0.3rem;
}
#tetris-sidebar {
margin: 1rem;
}
#fps-container {
margin-top: 1rem;
}
#controls {
margin-top: 1rem;
}
.control {
margin-top: 2px;
}
#fps {
white-space: pre;
font-family: monospace;
}
</style>
</head>
<body>
<div id="tetris-container" class="nes-container">
<canvas id="tetris-playground"></canvas>
</div>
<div id="tetris-sidebar">
<div class="nes-container with-title">
<h3 class="title">Score</h3>
<div id="tetris-score" class="item">0</div>
</div>
<div id="fps-container" class="nes-container with-title">
<h3 class="title">FPS</h3>
<div id="fps"></div>
</div>
<div id="controls" class="nes-container with-title">
<h3 class="title">Controls</h3>
<div class="item">
<div class="control">
<span class="nes-btn">A</span> <span class="nes-btn">←</span> Left
</div>
<div class="control">
<span class="nes-btn">S</span> <span class="nes-btn">↓</span> Bottom
</div>
<div class="control">
<span class="nes-btn">D</span> <span class="nes-btn">→</span> Right
</div>
<div class="control">
<span class="nes-btn">M</span> Music
</div>
</div>
</div>
</div>
<script src="./bootstrap.js"></script>
</body>
</html>