-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
90 lines (74 loc) · 2.32 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
80
81
82
83
84
85
86
87
88
89
90
<!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">
<go-source src="https://online-go.com/api/v1/games/73208439/sgf"></go-source>
<go-sfx src="/public/sfx/"></go-sfx>
<!-- <go-stone color="black" slot="R17"></go-stone>
<go-stone color="white" slot="R18"></go-stone>
<go-stone color="black" slot="Q18"></go-stone>
<go-stone color="white" slot="S18"></go-stone>
<go-stone color="black" slot="S17"></go-stone>
<go-stone color="white" slot="R19"></go-stone>
<go-stone color="black" slot="Q19"></go-stone>
<go-stone color="white" slot="T18"></go-stone>
<go-stone color="black" slot="T17"></go-stone>
<go-stone color="white" slot="Q16"></go-stone>
<go-stone color="black" slot="S19"></go-stone>
<go-stone color="white" slot="T19"></go-stone>
<go-stone color="black" slot="S19"></go-stone> -->
</go-board>
</form>
<script type="module">
import { DOMInjector } from "@joist/di";
import { ConsoleDebug, Debug } from "./target/lib/services/debug.js";
const app = new DOMInjector({
providers: [
[
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/define.js" type="module"></script>
<!-- <script src="./public/go-board.min.js" type="module"></script> -->
</body>
</html>