-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (89 loc) · 2.49 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
<html>
<head>
<title>Tetris</title>
<meta charset="utf-8" />
<link
href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap"
rel="stylesheet"
/>
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #819595;
}
#wrapper {
width: 600px;
height: 800px;
margin: 40px auto;
text-align: center;
font-size: 12;
font-family: 'Press Start 2P', cursive;
}
#board {
float: left;
position: relative;
width: 320px;
}
#main_canvas {
background: #f5f8ea;
border: 0;
position: relative;
}
#side_bar {
position: relative;
float: right;
}
#next_block_canvas {
border: 2px solid #363946;
background: #f5f8ea;
}
#pause {
width: 800px;
height: 12px;
background: #e07a5f;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 10;
margin: auto;
opacity: 0.9;
text-align: center;
padding: 30px 0;
color: #fff;
font-size: 12;
font-family: 'Press Start 2P', cursive;
border: 3px solid #363946;
}
</style>
</head>
<body>
<div id="pause">PAUSE</div>
<div id="wrapper">
<p>
Use LEFT, RIGHT, UP and DOWN arrow keys to play. Press P to
Pause.
</p>
<br>
<br>
<div id="board">
<canvas id="main_canvas"></canvas>
</div>
<div id="side_bar">
<h1>Next block</h1>
<canvas id="next_block_canvas"></canvas>
<br />
<br />
<h1 id="score">Score: 0</h1>
<br />
<h1 id="best_score"></h1>
</div>
</div>
</body>
<script type="module" src="js/main.js"></script>
</html>