-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
336 lines (284 loc) · 8.77 KB
/
index.html
File metadata and controls
336 lines (284 loc) · 8.77 KB
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- disable pinch-zoom on mobile to remove events delays -->
<meta name="viewport" content="width=device-width,user-scalable=no">
<link rel="icon" href="static/favicon.png">
<title>EngineZ -- Game Engine</title>
</head>
<body>
<div class="container">
<canvas id="canvas"></canvas>
<div id="ui">
<template id="city-header-template">
<style>
:host {
display: block;
}
.header {
padding: 20px;
text-align: center;
}
.header .resources, .header .population {
box-sizing: border-box;
padding: 0.8rem;
color: #ffffff;
background-color: #555555;
}
.header div, .resources div, .population div {
display: inline-block;
}
</style>
<div class="header">
<div class="resources">
<!--
<div class="food">
<span class="icon">Food</span>
<span class="value">100</span>
</div>
-->
</div>
<div class="population">
<div class="workers">0</div>
/
<div class="total">0</div>
</div>
</div>
</template>
<template id="building-template">
<style>
:host {
display: block;
}
.navigation {
text-align: center;
}
.navigation div {
display: inline-block;
}
.navigation .arrow {
padding: 0 16px;
margin: 0 2px;
border: solid 1px #777777;
}
.close {
background-color: #eeeeee;
padding: 4px 8px;
border-radius: 100%;
position: absolute;
right: 0;
top: 0;
margin: 2px;
}
.click, .navigation div {
border: solid 1px transparent;
}
.click:hover, .navigation div:hover {
cursor: pointer;
}
.click:active, .navigation div:active {
cursor: pointer;
border-color: red;
}
.menu {
width: 30%;
background-color: #ffffff;
height: 100%;
position: absolute;
top: 0;
right: 0;
}
.menu .img {
width: 100%;
height: 15%;
background-color: #eee;
}
.menu .title, .menu .content, .menu ul {
padding: 0 20px;
}
.item {
display: table-row;
}
.item img {
max-width: 40px;
}
.item span {
display: table-cell;
vertical-align: middle;
padding: 0 0.6rem;
}
.size-2 {
font-size: 1.2rem;
}
.size-4 {
font-size: 0.8rem;
font-family: 'Hind Light', sans-serif;
}
.hide {
display: none;
}
</style>
<div id="building" class="menu">
<div class="navigation">
<div class="close">X</div>
</div>
<div class="title size-2 name">Lorem Ipsum</div>
<div class="img picture"></div>
<div class="row">
<div class="title size-2">Description</div>
<div class="content size-4 description">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
</div>
<div class="row info">
<div class="title size-2">Info</div>
<div class="content size-4">
<ul>
<!--<li>Lorem Ipsum</li>-->
</ul>
</div>
</div>
<div class="row abilities">
<div class="title size-2">Ability</div>
<div class="content size-4">
<!--
<div class="item click">
<img class="icon" src="/static/favicon.png">
<span class="text">Lorem Ipsum</span>
</div>
-->
</div>
</div>
<div class="row">
<div class="title size-2">Workers</div>
<div class="content size-4">
<div class="row navigation workers">
<div class="arrow add"> + </div>
<span class="current">x</span>
/
<span class="max">y</span>
<div class="arrow remove"> - </div>
</div>
</div>
</div>
</div>
</template>
<template id="buildings-template">
<style>
:host {
display: block;
}
.menu {
position: absolute;
box-sizing: border-box;
left: 0;
bottom: 0;
width:100%;
background-color: white;
padding: 8px 20px;
}
.navigation {
text-align: center;
}
.navigation div {
display: inline-block;
}
.navigation .arrow {
padding: 0 16px;
margin: 0 2px;
border: solid 1px #777777;
}
.close {
background-color: #eeeeee;
padding: 4px 8px;
border-radius: 100%;
position: absolute;
right: 0;
top: 0;
margin: 2px;
}
.card {
border-color: #444;
}
.card-header {
word-break: break-all;
padding: 0.2rem;
}
.card-header, .card-body,.card-footer {
text-align: center;
}
.card-body img {
max-width: 100%;
}
.card-footer .resources div {
}
.click, .navigation div {
border: solid 1px transparent;
}
.click:hover, .navigation div:hover {
cursor: pointer;
}
.click:active, .navigation div:active {
cursor: pointer;
border-color: red;
}
.list-item {
width: 15%;
list-style-type: none;
display: inline-block;
}
.invert {
color: #ffffff;
background-color: #555555;
}
.size-3 {
font-size: 1rem;
font-weight: 600;
letter-spacing: 0.02rem;
}
.size-4 {
font-size: 0.8rem;
font-family: 'Hind Light', sans-serif;
}
</style>
<div id="buildings" class="menu">
<div class="row navigation">
<div class="arrow prev"> < </div>
<div class="arrow next"> > </div>
<div class="close">X</div>
</div>
<div class="row">
<ul class="list">
<!--
<li class="list-item">
<div class="click card">
<div class="card-header size-3">Building #1</div>
<div class="card-body">
<img src="/static/favicon.png">
</div>
<div class="card-footer">
<div class="resources invert">
<div class="food">
<span class="icon">F</span>
<span class="value size-4">25</span>
</div>
<div class="wood">
<span class="icon">W</span>
<span class="value size-4">25</span>
</div>
<div class="rock">
<span class="icon">R</span>
<span class="value size-4">25</span>
</div>
</div>
</div>
</div>
</li>
-->
</ul>
</div>
</div>
</template>
</div>
</div>
</body>
</html>