-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.new.html
67 lines (58 loc) · 1.65 KB
/
index.new.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>fiug.dev</title>
<meta charset="utf-8" />
<meta name="description" content="" />
<meta name="author" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<link rel="stylesheet" href="./layout/layout.css" />
</head>
<style>
@media (prefers-color-scheme: dark) {
html {
background: #2a2a2a;
color: white;
}
}
html,
body {
overscroll-behavior: none;
}
</style>
<body>
<div id="layout"></div>
</body>
<script type="module">
//import Layout from "/fiugd/beta/dist/layout.js";
import Layout from "./layout/layout.js";
import Menus from "/fiugd/beta/dist/menus.js";
import Operations from "/fiugd/beta/dist/operations.js";
const layout = await Layout();
const menus = Menus();
document.body.append(Menus());
await Operations();
window.addEventListener("message", (event) => {
if(event.source === window)
return;
const { triggerEvent, subscribe, type: eventType } = event.data;
const type = triggerEvent
? triggerEvent.type
: eventType;
const layoutHandler = layout.eventHandlers[type];
if(layoutHandler)
return layoutHandler(layout, event);
if (subscribe)
return /*console.log(`request to subscribe: ${subscribe}`)*/;
//console.log(event.data);
});
// <a href="web+fiug:/github/fiugd/layout">open repo in fiug</a>
// navigator.registerProtocolHandler(
// "web+fiug",
// "https://beta.fiug.dev/?repo=%s",
// "Handle fiug.dev links"
// );
</script>
</html>