-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
402 lines (353 loc) · 10.7 KB
/
Copy pathindex.html
File metadata and controls
402 lines (353 loc) · 10.7 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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="mobile-web-app-capable" content="yes">
<title>ADS-Bit - Retro Flight Tracker</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
html, body {
width: 100%;
height: 100%;
overflow: hidden;
position: fixed;
-webkit-overflow-scrolling: touch;
}
body {
background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
color: #fcfcfc;
font-family: 'Courier New', monospace;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#header {
text-align: center;
padding: 8px;
font-size: clamp(18px, 5vw, 28px);
color: #fcd444;
text-shadow: 2px 2px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000;
letter-spacing: 1px;
font-weight: bold;
flex-shrink: 0;
}
#main-content {
display: flex;
flex: 1;
width: 100%;
max-width: 1600px;
gap: 10px;
padding: 10px;
overflow: hidden;
}
#canvas-container {
position: relative;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
min-width: 0;
}
#pixel-canvas {
image-rendering: pixelated;
image-rendering: crisp-edges;
border: 4px solid #34495e;
border-radius: 8px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4),
inset 0 0 0 2px #5c94fc;
background: #000;
width: 100%;
height: auto;
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
/* Aircraft Sidebar */
#aircraft-sidebar {
width: 200px;
flex-shrink: 0;
background: rgba(52, 73, 94, 0.9);
border: 3px solid #5c94fc;
border-radius: 8px;
padding: 8px;
overflow-y: auto;
max-height: 100%;
}
#sidebar-header {
font-family: 'Press Start 2P', monospace;
font-size: 10px;
color: #fcd444;
text-align: center;
padding: 8px 4px;
border-bottom: 2px solid #5c94fc;
margin-bottom: 8px;
}
.sidebar-aircraft {
padding: 6px 8px;
margin-bottom: 4px;
background: rgba(0, 0, 0, 0.4);
border-radius: 4px;
border-left: 3px solid #54fc54;
cursor: pointer;
transition: all 0.15s ease;
}
.sidebar-aircraft:hover {
background: rgba(92, 148, 252, 0.3);
border-left-color: #fcd444;
}
.sidebar-aircraft.selected {
background: rgba(252, 212, 68, 0.3);
border-left-color: #fcd444;
border-left-width: 5px;
}
.sidebar-aircraft.selected .sidebar-callsign {
color: #fcd444;
}
.sidebar-callsign {
display: block;
font-family: 'Press Start 2P', monospace;
font-size: 9px;
color: #fcfcfc;
margin-bottom: 2px;
}
.sidebar-info {
display: block;
font-family: 'Courier New', monospace;
font-size: 11px;
color: #b4d4ec;
}
.sidebar-empty {
font-family: 'Press Start 2P', monospace;
font-size: 8px;
color: #888;
text-align: center;
padding: 20px 8px;
}
#stats {
text-align: center;
padding: 8px;
font-size: clamp(11px, 2.5vw, 15px);
color: #fcfcfc;
text-shadow: 1px 1px 0px #000;
font-weight: bold;
flex-shrink: 0;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
}
#stats span {
background: rgba(52, 73, 94, 0.7);
padding: 5px 10px;
border-radius: 4px;
border: 2px solid #5c94fc;
white-space: nowrap;
}
#weather-info {
text-align: center;
padding: 6px;
font-size: clamp(10px, 2.2vw, 14px);
color: #fcfcfc;
text-shadow: 1px 1px 0px #000;
font-weight: bold;
flex-shrink: 0;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 6px;
}
#weather-info span {
background: rgba(52, 73, 94, 0.7);
padding: 4px 8px;
border-radius: 4px;
border: 2px solid #5c94fc;
white-space: nowrap;
}
#datetime-display {
color: #b4d4ec;
}
#weather-display {
color: #fcd444;
}
#sun-times {
color: #fc9c54;
}
#connection-status {
color: #54fc54;
}
#aircraft-count {
color: #fcd444;
}
#range-display {
color: #fc9c54;
}
.blink {
animation: blink 1s linear infinite;
}
@keyframes blink {
0%, 49% { opacity: 1; }
50%, 100% { opacity: 0.3; }
}
/* View direction controls */
.view-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 50px;
height: 80px;
background: rgba(52, 73, 94, 0.8);
border: 3px solid #5c94fc;
border-radius: 8px;
color: #fcd444;
font-size: 28px;
font-family: 'Press Start 2P', monospace;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.15s ease;
z-index: 10;
user-select: none;
-webkit-user-select: none;
}
.view-arrow:hover {
background: rgba(92, 148, 252, 0.6);
transform: translateY(-50%) scale(1.1);
}
.view-arrow:active {
background: rgba(92, 148, 252, 0.9);
transform: translateY(-50%) scale(0.95);
}
#view-left {
left: 15px;
}
#view-right {
right: 15px;
}
#compass-direction {
color: #54fc54;
font-family: 'Press Start 2P', monospace;
}
/* Mobile responsive - move sidebar below viewer */
@media (max-width: 768px) {
#main-content {
flex-direction: column;
padding: 5px;
gap: 5px;
}
#aircraft-sidebar {
width: 100%;
max-height: 150px;
flex-direction: row;
flex-wrap: wrap;
display: flex;
align-content: flex-start;
padding: 5px;
}
#sidebar-header {
width: 100%;
padding: 5px;
margin-bottom: 5px;
font-size: 9px;
}
.sidebar-list {
display: flex;
flex-wrap: wrap;
gap: 4px;
width: 100%;
overflow-y: auto;
max-height: 100px;
}
.sidebar-aircraft {
flex: 0 0 auto;
padding: 4px 8px;
margin-bottom: 0;
white-space: nowrap;
}
.sidebar-callsign {
font-size: 8px;
display: inline;
margin-right: 5px;
}
.sidebar-info {
font-size: 9px;
display: inline;
}
.sidebar-empty {
width: 100%;
padding: 10px;
}
#stats {
padding: 4px;
gap: 4px;
}
#stats span {
padding: 3px 6px;
font-size: 10px;
}
#weather-info {
padding: 4px;
gap: 4px;
}
#weather-info span {
padding: 3px 6px;
font-size: 9px;
}
.view-arrow {
width: 40px;
height: 60px;
font-size: 20px;
}
#view-left {
left: 5px;
}
#view-right {
right: 5px;
}
}
</style>
</head>
<body>
<div id="header">
★ <span id="site-title">ADS-Bit</span> ★
</div>
<div id="main-content">
<div id="canvas-container">
<button id="view-left" class="view-arrow">◄</button>
<canvas id="pixel-canvas" width="800" height="600"></canvas>
<button id="view-right" class="view-arrow">►</button>
</div>
<div id="aircraft-sidebar">
<div id="sidebar-header">AIRCRAFT IN VIEW</div>
<div class="sidebar-list"></div>
</div>
</div>
<div id="stats">
<span id="connection-status" class="blink">CONNECTING...</span>
<span id="compass-direction">VIEWING: NORTH</span>
<span id="aircraft-count">AIRCRAFT: 0</span>
<span id="range-display">RANGE: 0 NM</span>
</div>
<div id="weather-info">
<span id="datetime-display">Loading...</span>
<span id="weather-display">--°F</span>
<span id="sun-times">☀ --:-- / 🌙 --:--</span>
</div>
<script src="ads-bit.js?v=48"></script>
</body>
</html>