-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
79 lines (66 loc) · 2.05 KB
/
index.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
68
69
70
71
72
73
74
75
76
77
78
79
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Go Viewer</title>
<script type="importmap">
{
"imports": {
"tslib": "./node_modules/tslib/tslib.es6.js",
"@joist/di": "./node_modules/@joist/di/target/lib.js",
"@joist/element": "./node_modules/@joist/element/target/lib.js"
}
}
</script>
</head>
<body>
<style>
body {
margin: 0.5rem;
}
go-board {
max-height: calc(100vh - 1rem);
background-image: url(public/textures/kaya.jpg);
}
:not(:defined) {
visibility: hidden;
}
</style>
<form action="/save-game">
<go-board name="board" sfx="/public/sfx">
<!-- <go-marker slot="D4">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
fill="green"
style="background: rgba(255, 255, 255, 0.75); border-radius: 50%"
>
<path
d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z"
/>
</svg>
</go-marker> -->
</go-board>
</form>
<script type="module">
import { DOMInjector } from "@joist/di";
import { ConsoleDebug, Debug } from "./target/lib/debug.js";
const app = new DOMInjector([
{
provide: Debug,
factory(i) {
const search = new URLSearchParams(window.location.search);
if (search.has("debug")) {
return i.inject(ConsoleDebug);
}
return new Debug();
},
},
]);
app.attach(document.body);
</script>
<script src="./target/register.js" type="module"></script>
</body>
</html>