This repository was archived by the owner on Mar 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
85 lines (80 loc) · 2.48 KB
/
index.html
File metadata and controls
85 lines (80 loc) · 2.48 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🦀 Crypto Chart - Leptos + WebGPU</title>
<link rel="icon" type="image/svg+xml" href="res/favicon.svg">
<link rel="icon" type="image/png" href="res/favicon.png">
<link data-trunk rel="copy-dir" href="res" />
<style>
body {
margin: 0;
padding: 0;
background: #283547;
color: #ffffff;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#loading {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
color: #4ade80;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid #34495e;
border-top: 4px solid #4ade80;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 15px;
}
#build-info {
position: fixed;
top: 0;
left: 50%;
transform: translateX(-50%);
background: #34495e;
color: #4ade80;
padding: 4px 8px;
z-index: 1000;
font-size: 14px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div id="build-info"></div>
<!-- Loading screen -->
<div id="loading">
<div class="spinner"></div>
<div>
<h2>🦀 Loading Crypto Chart...</h2>
<p>WebGPU + WebSocket + Leptos</p>
</div>
</div>
<!-- Trunk will attach the WASM here automatically -->
<link data-trunk rel="rust" data-wasm-opt="z" />
<script>
async function loadBuildInfo() {
try {
const [commitRes, timeRes] = await Promise.all([
fetch('version'),
fetch('build_time'),
]);
const commit = (await commitRes.text()).trim();
const time = (await timeRes.text()).trim();
document.getElementById('build-info').textContent = `Build: ${commit} (${time})`;
} catch (e) {
console.error('Failed to load build info', e);
}
}
loadBuildInfo();
</script>
</body>
</html>