-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
216 lines (210 loc) · 9.86 KB
/
index.html
File metadata and controls
216 lines (210 loc) · 9.86 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
<!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">
<title>Satvisor</title>
<link rel="icon" type="image/png" href="/textures/ui/sat_icon.png">
<link rel="preload" id="preload-earth" as="image" crossorigin="anonymous">
<script>var f='%VITE_TEXTURE_QUALITY%';var lite=f?(f==='lite'):localStorage.getItem('satvisor_lite_mode')==='true';document.getElementById('preload-earth').href=lite?'/textures/earth/color.lite.webp':'/textures/earth/color.webp';</script>
<meta name="description" content="3D satellite tracker with pass predictions, antenna rotator control, sky view, and Doppler analysis. Free, open source, runs in your browser.">
<meta property="og:title" content="Satvisor">
<meta property="og:description" content="3D satellite tracker with pass predictions, antenna rotator control, sky view, and Doppler analysis. Free, open source, runs in your browser.">
<meta property="og:image" content="https://satvisor.com/og.jpg">
<meta property="og:type" content="website">
<meta property="og:url" content="https://satvisor.com/">
<meta name="twitter:card" content="summary_large_image">
<meta name="theme-color" content="#101010">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="/textures/icons/icon-192.png">
<style>
/* Loading screen — must render before JS */
@font-face {
font-family: 'Overpass Mono';
src: url('/textures/ui/overpass-mono.ttf') format('truetype');
font-weight: 400;
font-display: swap;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
width: 100%; height: 100%; overflow: hidden;
background: var(--bg, #000);
font-family: 'Overpass Mono', 'Courier New', monospace;
color: var(--text, #fff);
}
#loading-screen {
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
display: flex; flex-direction: column; align-items: center; justify-content: center;
background: var(--bg, #000); z-index: 1000;
}
#loading-screen .bar-outer { width: 400px; height: 30px; border: 2px solid var(--text, #fff); }
#loading-screen .bar-inner {
height: 100%; width: 0%; background: var(--text-muted, #ccc); transition: width 0.15s;
margin: 4px; height: calc(100% - 8px);
}
#loading-screen .msg { margin-bottom: 16px; font-size: 18px; color: var(--text, #fff); }
#loading-screen .mode-hint {
margin-top: 8px; font-size: 11px; color: var(--warning, #e8a735);
cursor: pointer; opacity: 0; transition: opacity 0.5s;
}
#loading-screen .mode-hint.visible { opacity: 1; }
#loading-screen .mode-hint .hint-link { text-decoration: underline; text-underline-offset: 3px; }
#loading-screen .mode-hint:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
#loading-screen .bar-outer { width: 80%; max-width: 280px; height: 22px; }
#loading-screen .msg { font-size: 15px; }
}
/* Legacy loading screen */
html[data-theme-style="legacy"] #loading-screen .bar-outer {
border: none;
box-shadow:
inset 1px 1px 0 0 #808080,
inset -1px -1px 0 0 #ffffff,
inset 2px 2px 0 0 #000000,
inset -2px -2px 0 0 #dfdfdf;
}
html[data-theme-style="legacy"] #loading-screen .bar-inner {
background: #000080;
}
/* RGB loading screen */
@property --rgb-angle {
syntax: '<angle>';
inherits: true;
initial-value: 0deg;
}
html[data-theme-style="rgb"] {
animation: rgb-rotate 4s linear infinite;
}
html[data-theme-style="rgb"] #loading-screen .bar-outer {
border: 2px solid;
border-image: conic-gradient(from var(--rgb-angle, 0deg), #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff0088, #ff0000) 1;
box-shadow: 0 0 12px rgba(100,0,255,0.15), 0 0 30px rgba(0,100,255,0.08);
}
html[data-theme-style="rgb"] #loading-screen .bar-inner {
background: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff0088);
}
@keyframes rgb-rotate {
to { --rgb-angle: 360deg; }
}
/* Neon loading screen */
html[data-theme-style="neon"] #loading-screen .bar-outer {
border: 1px solid rgba(255,0,180,0.4);
box-shadow: 0 0 8px rgba(255,0,180,0.25), 0 0 24px rgba(0,200,255,0.12);
animation: neon-bar-pulse 3s ease-in-out infinite alternate;
}
html[data-theme-style="neon"] #loading-screen .bar-inner {
background: linear-gradient(90deg, #ff00b4, #00ccff);
}
/* CRT loading screen */
html[data-theme-style="crt"] #loading-screen .bar-outer {
border: 1px solid rgba(50,255,100,0.3);
box-shadow: 0 0 8px rgba(50,255,100,0.1);
}
html[data-theme-style="crt"] #loading-screen .bar-inner {
background: #22aa44;
}
html[data-theme-style="crt"] #loading-screen {
animation: crt-flicker-screen 0.1s infinite;
}
@keyframes crt-flicker-screen {
0%, 100% { opacity: 1; }
50% { opacity: 0.985; }
}
@keyframes neon-bar-pulse {
0% { box-shadow: 0 0 8px rgba(255,0,180,0.25), 0 0 24px rgba(0,200,255,0.12); }
100% { box-shadow: 0 0 12px rgba(0,200,255,0.30), 0 0 30px rgba(255,0,180,0.15); }
}
</style>
<script>
// Apply saved theme before first paint to prevent flash
(function() {
try {
var id = localStorage.getItem('satvisor_theme_active');
if (!id || id === 'dark') return;
var vars = null;
var minimal = {
'high-contrast': { '--bg': '#000000', '--ui-bg': '#000000', '--text': '#ffffff', '--text-muted': '#dddddd' },
'light': { '--bg': '#e8e8e8', '--ui-bg': '#dcdcdc', '--text': '#0a0a0a', '--text-muted': '#444444' },
'lavender': { '--bg': '#0e0b14', '--ui-bg': '#13101a', '--text': '#e8e0f0', '--text-muted': '#a898c0' },
'tlescope': { '--bg': '#101010', '--ui-bg': '#202020', '--text': '#ffffff', '--text-muted': '#d3d3d3' },
'everforest': { '--bg': '#272e33', '--ui-bg': '#2e383c', '--text': '#d3c6aa', '--text-muted': '#9da9a0' },
'tokyo-night': { '--bg': '#1a1b26', '--ui-bg': '#292e42', '--text': '#c0caf5', '--text-muted': '#9aa5ce' },
'dracula': { '--bg': '#282a36', '--ui-bg': '#363848', '--text': '#f8f8f2', '--text-muted': '#bfc0c0' },
'redshift': { '--bg': '#0a0000', '--ui-bg': '#120000', '--text': '#cc8866', '--text-muted': '#995544' },
'neon': { '--bg': '#06000a', '--ui-bg': '#0a0012', '--text': '#eeddff', '--text-muted': '#9977bb' },
'crt': { '--bg': '#020a02', '--ui-bg': '#051005', '--text': '#44dd66', '--text-muted': '#22aa44' },
'legacy': { '--bg': '#c0c0c0', '--ui-bg': '#c0c0c0', '--text': '#000000', '--text-muted': '#222222', '--border': '#808080', '--warning': '#cc6600' },
'ggez': { '--bg': '#050505', '--ui-bg': '#0a0a0a', '--text': '#ffffff', '--text-muted': '#bbbbbb' },
};
if (minimal[id]) {
vars = minimal[id];
} else {
var raw = localStorage.getItem('satvisor_themes_custom');
var customs = raw ? JSON.parse(raw) : [];
var match = customs.find(function(t) { return t.id === id; });
if (match && match.vars) vars = match.vars;
}
if (vars) {
var root = document.documentElement;
for (var k in vars) {
if (vars.hasOwnProperty(k)) root.style.setProperty(k, vars[k]);
}
}
if (vars && vars['--bg']) {
var m = document.querySelector('meta[name="theme-color"]');
if (m) m.setAttribute('content', vars['--bg']);
}
if (id === 'light' || id === 'legacy' || (vars && vars['--bg'] && parseInt(vars['--bg'].replace('#','').slice(0,2), 16) > 128)) {
document.documentElement.style.setProperty('color-scheme', 'light');
}
var styles = { 'legacy': 'legacy', 'ggez': 'rgb', 'neon': 'neon', 'crt': 'crt' };
if (styles[id]) {
document.documentElement.dataset.themeStyle = styles[id];
}
} catch(e) {}
})();
</script>
</head>
<body>
<div id="loading-screen">
<div class="msg" id="loading-msg">Initializing...</div>
<div class="bar-outer"><div class="bar-inner" id="loading-bar"></div></div>
<div class="mode-hint" id="loading-slow-hint"> </div>
<script>
(function() {
var forced = '%VITE_TEXTURE_QUALITY%';
if (forced === 'lite' || forced === 'full') return;
var lite = localStorage.getItem('satvisor_lite_mode') === 'true';
if (lite) return; // In lite mode: indicator shown in main UI instead
var hint = document.getElementById('loading-slow-hint');
var switchToLite = function() {
localStorage.setItem('satvisor_lite_mode', 'true');
location.reload();
};
var slow = false;
var conn = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
if (conn && conn.effectiveType && conn.effectiveType !== '4g') slow = true;
if (conn && typeof conn.downlink === 'number' && conn.downlink < 2) slow = true;
var showHint = function(prefix, suffix) {
hint.innerHTML = prefix + '<span class="hint-link">lite mode</span>' + suffix;
hint.classList.add('visible');
hint.onclick = switchToLite;
};
if (slow) {
showHint('Slow connection detected \u2014 switch to ', '? (~15x smaller)');
} else {
setTimeout(function() {
var bar = document.getElementById('loading-bar');
var pct = bar ? parseFloat(bar.style.width) : 0;
if (!(pct > 40)) {
showHint('Loading slowly? Switch to ', ' (~15x smaller)');
}
}, 8000);
}
})();
</script>
</div>
<div id="svelte-ui"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>