-
Notifications
You must be signed in to change notification settings - Fork 2
/
dev.html
48 lines (46 loc) · 1.66 KB
/
dev.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Curling I/O - Results</title>
<link rel="icon" href="data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAAC">
<script src="dev.js"></script>
</head>
<body>
<!-- <div style="width: 100px; height: 100px; background-color: black; z-index: 100; position: absolute; top: 10px; left: 200px;"></div> -->
<div style="background-color: white;">
<div id="cio_results"></div>
</div>
<script>
var cio_results = Elm.Results.init(
{
node: document.getElementById("cio_results"),
flags: {
subdomain: "demo",
fullScreenToggle: true,
section: "competitions",
registration: false,
showWaiversForTeams: false,
eventId: 3742, // 2024 Canadian Mixed Doubles Curling Championship
excludeEventSections: ["details", "registrations", "spares"],
defaultEventSection: "draws",
// lang: "fr",
// loggedInCurlerIds: [42014] // To simulate having a curler logged in when this is being hosted in Curling I/O itself (dogfooding)
// host: "demo.curling.io", // to pull in the demo server data
host: document.location.host,
hash: document.location.hash,
}
}
)
cio_results.ports.navigateTo.subscribe(function(newHash) {
// console.log("navigate to", newHash)
document.location.hash = newHash
})
addEventListener("hashchange", (event) => {
// console.log("navigated to", newHash)
cio_results.ports.hashChangeReceiver.send(location.hash)
})
</script>
</body>
</html>