-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
127 lines (122 loc) · 5.21 KB
/
index.html
File metadata and controls
127 lines (122 loc) · 5.21 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="dark light" />
<style>
/* Prevent slow color/fill/stroke fades on first paint (iOS Safari) */
html.preload *, html.preload *::before, html.preload *::after { transition: none !important; }
</style>
<script>
(function () {
try {
var ua = navigator.userAgent || '';
var isSafari = /safari/i.test(ua) && !/chrome|chromium|android|crios|fxios|edgios/i.test(ua);
var isIOSWebKit = /iPad|iPhone|iPod/.test(ua) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
if (isIOSWebKit) {
document.documentElement.classList.add('ios-webkit');
}
var zoomResetTimer = null;
var getViewportScale = function () {
var vv = window.visualViewport;
if (!vv) return 1;
var scale = Number(vv.scale || 1);
return Number.isFinite(scale) ? scale : 1;
};
var isActivelyZoomed = function () {
return Math.abs(getViewportScale() - 1) > 0.01;
};
var setZooming = function (isZooming) {
if (isZooming && zoomResetTimer) {
clearTimeout(zoomResetTimer);
zoomResetTimer = null;
}
document.documentElement.classList.toggle('zooming', !!isZooming);
if (isSafari) {
document.documentElement.classList.toggle('safari-zooming', !!isZooming);
}
};
var scheduleZoomEnd = function () {
if (zoomResetTimer) clearTimeout(zoomResetTimer);
zoomResetTimer = setTimeout(function () {
zoomResetTimer = null;
setZooming(false);
}, 220);
};
var onViewportChange = function () {
// Enter lightweight mode only when scale actually differs from 100%.
if (isActivelyZoomed()) {
setZooming(true);
scheduleZoomEnd();
} else {
if (zoomResetTimer) {
clearTimeout(zoomResetTimer);
zoomResetTimer = null;
}
setZooming(false);
}
};
if (window.visualViewport && window.visualViewport.addEventListener) {
window.visualViewport.addEventListener('resize', onViewportChange, { passive: true });
}
if (isSafari) {
document.documentElement.classList.add('safari');
// Fallback hooks for iOS Safari gesture events.
window.addEventListener('gesturestart', function () { setZooming(true); }, { passive: true });
window.addEventListener('gesturechange', function () { setZooming(true); scheduleZoomEnd(); }, { passive: true });
window.addEventListener('gestureend', function () { scheduleZoomEnd(); }, { passive: true });
}
var saved = localStorage.getItem('theme');
var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
var theme = saved || (prefersDark ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', theme);
document.documentElement.classList.add('preload');
// Set immediate baseline colors to avoid initial black flash
if (theme === 'dark') {
document.documentElement.style.backgroundColor = '#0a0a0f';
document.documentElement.style.color = '#f8fafc';
} else {
document.documentElement.style.backgroundColor = '#fafafa';
document.documentElement.style.color = '#1e293b';
}
} catch (e) {}
})();
</script>
<title>Superhero.com – The All‑in‑One Social + Crypto App</title>
<link rel="icon" type="image/svg+xml" href="/src/svg/favicon.svg" />
</head>
<body>
<div id="root"></div>
<script>
// Synchronous runtime configuration injected at container start via envsubst
window.__SUPERCONFIG__ = {
BACKEND_URL: '$BACKEND_URL',
SUPERHERO_API_URL: '$SUPERHERO_API_URL',
NODE_URL: '$NODE_URL',
WALLET_URL: '$WALLET_URL',
MIDDLEWARE_URL: '$MIDDLEWARE_URL',
DEX_BACKEND_URL: '$DEX_BACKEND_URL',
MAINNET_DEX_BACKEND_URL: '$MAINNET_DEX_BACKEND_URL',
TESTNET_DEX_BACKEND_URL: '$TESTNET_DEX_BACKEND_URL',
CONTRACT_V3_ADDRESS: '$CONTRACT_V3_ADDRESS',
POPULAR_FEED_ENABLED: '$POPULAR_FEED_ENABLED',
JITSI_DOMAIN: '$JITSI_DOMAIN',
GOVERNANCE_API_URL: '$GOVERNANCE_API_URL',
GOVERNANCE_CONTRACT_ADDRESS: '$GOVERNANCE_CONTRACT_ADDRESS',
EXPLORER_URL: '$EXPLORER_URL',
};
</script>
<script type="module" src="/src/main.tsx"></script>
<script>
// Re-enable transitions after first paint
window.addEventListener('load', function () {
requestAnimationFrame(function () {
document.documentElement.classList.remove('preload');
document.documentElement.style.backgroundColor = '';
document.documentElement.style.color = '';
});
});
</script>
</body>
</html>