-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (62 loc) · 2.07 KB
/
index.html
File metadata and controls
62 lines (62 loc) · 2.07 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hyphon</title>
<script src="https://cdn.jsdelivr.net/pyodide/v0.26.1/full/pyodide.js"></script>
<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=Orbitron:wght@400;700&family=Roboto+Mono:wght@400;500&display=swap"
rel="stylesheet"
/>
<style>
body {
font-family: 'Roboto Mono', monospace;
background-color: #111827;
color: #e5e7eb;
overflow-x: hidden;
}
.font-orbitron {
font-family: 'Orbitron', sans-serif;
}
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #1f2937;
}
::-webkit-scrollbar-thumb {
background: #4b5563;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #6b7280;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type='number'] {
-moz-appearance: textfield;
}
</style>
</head>
<body>
<div id="root"></div>
<script type="module">
// Use Vite's ?url import to get the path to the public asset, then import it dynamically
// We use new Function to bypass Vite's import transformation which adds ?import and fails on public assets
import moduleUrl from '/hyphon_native.js?url';
const importModule = new Function('url', 'return import(url)');
const { default: Module } = await importModule(moduleUrl);
window.Module = await Module();
</script>
<!-- Pyodide initialization is now automatic from hyphon_native.js -->
<script type="module" src="/src/main.tsx"></script>
</body>
</html>