-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (75 loc) · 2.09 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
docEl.style.fontSize = 20 * (clientWidth / 375) + 'px';
};
recalc();
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
})(document, window);
</script>
<link rel="stylesheet" href="./style/style.css">
</head>
<body>
<header>
<h1>2048</h1>
</header>
<div class="game-container">
<div class="wrap" id="wrap">
<div class="row">
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
</div>
<div class="row">
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
</div>
<div class="row">
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
</div>
<div class="row">
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
</div>
</div>
<div class="tile-container">
</div>
</div>
<div class="foot">
<div class="score side">SCORE:<span id="score">0</span></div>
<div class="best side">BEST:<span id="best">0</span></div>
<button class="newGame" id="newGame">New Game</button>
</div>
<div class="over">
<p>Game Over!</p>
<button class="overButton">Try again</button>
</div>
<footer>
<p>by:lin</p>
<p>email:<address>[email protected]</address></p>
</footer>
<script type="module">
import application from './js/application.js'
application()
</script>
</body>
</html>