-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
75 lines (75 loc) · 2.19 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Tetris</title>
<link rel="shortcut icon" href="favicon.ico">
<script src="compiled/tetris.js"></script>
<style>
body {
font-family: Menlo, Consolas, Monaco, Lucida Console,
Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono,
Courier New, monospace, serif;
text-align: center;
}
h1 {
color: #272822;
margin-bottom: 0;
}
.author {
font-size: 0.5em;
}
p {
font-size: 0.7em;
margin-top: 0.4em;
}
canvas {
background: #272822;
border: 2px solid #272822;
border-bottom-width: 0;
border-right-width: 0;
display: block;
}
#tetris {
float: left;
margin-left: 11em;
}
#sidekick {
float: right;
}
.wrapper {
margin: 0 auto;
overflow: hidden;
width: 38.4em;
}
.instructions {
float: right;
font-size: 1.1em;
margin-top: 1em;
text-align: left;
width: 156px;
}
.key {
display: inline-block;
width: 3em;
}
</style>
</head>
<body>
<h1>Tetris<span class="author"> by David Sawyer</span></h1>
<p>Color scheme inspired by the <br>Monokai theme for Sublime Text</p>
<div class="wrapper">
<canvas id="tetris" height="520" width="260"></canvas>
<canvas id="sidekick" height="260" width= "156"></canvas>
<div class="instructions">
<p><span class="key">left</span> → shift left</p>
<p><span class="key">right</span> → shift right</p>
<p><span class="key">down</span> → shift down</p>
<p><span class="key">space</span> → hard drop</p>
<p><span class="key">X</span> → rotate CW</p>
<p><span class="key">Z</span> → rotate CCW</p>
<p><span class="key">P</span> → pause</p>
</div>
</div>
</body>
</html>