-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
145 lines (129 loc) · 4.76 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Google fonts -->
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;700&family=Poppins:wght@300;400;700&display=swap"
rel="stylesheet"
/>
<!-- Font awesome CDN -->
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.15.3/css/all.css"
integrity="sha384-SZXxX4whJ79/gErwcOYf+zWLeJdY/qpuqC4cAa9rOGUstPomtqpuNWT9wdPEn2fk"
crossorigin="anonymous"
/>
<!-- 2048 shortcut icon -->
<link
rel="shortcut icon"
href="https://upload.wikimedia.org/wikipedia/commons/8/8a/2048_logo.png"
/>
<!-- Internal stylesheet -->
<link rel="stylesheet" href="./styles/setup.css" />
<link rel="stylesheet" href="./styles/styles.css" />
<title>2048 🐯</title>
</head>
<body>
<header>
<div class="title">
<h1>2048</h1>
</div>
<div class="instructions-btn-container">
<button class="instructions-btn btn">
Instructions on how to play
</button>
</div>
<div class="header-container">
<div class="score-board">
<h2 class="score-label">Score</h2>
<h2 class="score-current">0</h2>
</div>
<button class="new-game-btn btn"><h2>New game</h2></button>
</div>
</header>
<main>
<div class="container flex-center-center">
<div class="game-board">
<div class="row row-0">
<div class="box row-0 col-0"></div>
<div class="box row-0 col-1"></div>
<div class="box row-0 col-2"></div>
<div class="box row-0 col-3"></div>
</div>
<div class="row row-1">
<div class="box row-1 col-0"></div>
<div class="box row-1 col-1"></div>
<div class="box row-1 col-2"></div>
<div class="box row-1 col-3"></div>
</div>
<div class="row row-2">
<div class="box row-2 col-0"></div>
<div class="box row-2 col-1"></div>
<div class="box row-2 col-2"></div>
<div class="box row-2 col-3"></div>
</div>
<div class="row row-3">
<div class="box row-3 col-0"></div>
<div class="box row-3 col-1"></div>
<div class="box row-3 col-2"></div>
<div class="box row-3 col-3"></div>
</div>
</div>
</div>
<!-- Game over dialog box -->
<div class="game-over-container dialogue-outter hide-container">
<div class="game-over-inner dialogue flex-center-center">
<div class="game-over-content">
<h3 class="game-over-label">Game over!</h3>
<p class="game-over-score">Score: 0</p>
<div>
<button class="game-over-btn btn"><h2>Reset game</h2></button>
</div>
</div>
</div>
</div>
<!-- Game instructions dialog box -->
<div class="instructions-container dialogue-outter hide-container">
<div class="instructions-inner dialogue flex-center-center">
<div class="instructions-content">
<div>
<button class="close-instructions-btn btn">
<i class="fas fa-times"></i>
</button>
</div>
<h3 class="instructions-title">How to play?</h3>
<div class="desktop-instructions">
<h4 class="instructions-subtitle">Desktop</h4>
<p class="instructions">
Use arrow keys
<span><i class="fas fa-long-arrow-alt-up"></i></span>
<span><i class="fas fa-long-arrow-alt-down"></i></span>
<span><i class="fas fa-long-arrow-alt-left"></i></span>
<span><i class="fas fa-long-arrow-alt-right"></i></span>
to move the tiles. Tiles of the same value will collapse and
increase your score.
</p>
</div>
<div class="mobile-instructions">
<h4 class="instructions-subtitle">Tablet and mobile</h4>
<p class="instructions">
Swipe up, down, left, right to move the tiles. Tiles of the same
value will collapse and increase your score.
</p>
</div>
</div>
</div>
</div>
</main>
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"
></script>
<script src="./script.js"></script>
</body>
</html>