-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
64 lines (51 loc) · 1.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
<style>
#title-text {
margin-left: 15%;
}
body {
margin-top: 0.5%;
margin-left: 1%
}
#terminal {
width: 675px;
margin: auto;
}
#footer-text {
text-align: right;
margin-top: 1%;
margin-right: 10%;
}
</style>
<!doctype html>
<html>
<head>
<link
rel="stylesheet"
href="https://unpkg.com/xterm/css/xterm.css"
/>
<script src="https://unpkg.com/xterm/lib/xterm.js"></script>
<!-- import scripts used for in-game logic -->
<script src="./game/startupAnimation.js"></script>
<script src="./game/singleBlock.js"></script>
<!-- import main game file -->
<script src="./game/main.js"></script>
</head>
<h1 id="title-text">xtermtris</h1>
<body>
<div id="terminal"></div>
<script>
var xterm = new Terminal();
xterm.open(document.getElementById('terminal'));
xterm.resize(73, 26);
xterm.write("\x1B[0;32m"); // Note: colors dictated by ANSI scheme: https://bixense.com/clicolors/
main(xterm);
</script>
</body>
<p id="footer-text">
Tetris, built from scratch using Xterm.js
<br>
Built by Winston Zhang
<br>
Work in progress!
</p>
</html>