This repository has been archived by the owner on Aug 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
page.html
77 lines (67 loc) · 1.92 KB
/
page.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="./node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
<script src="./node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
<link rel="stylesheet" type="text/css" href="demo.css">
</head>
<script src="bundle.js"></script>
<body class="notDefined">
<div id="main"></div>
<script src="demo.js"></script>
<style>
body {
font-family: Google sans, sans-serif;
transform: opacity 0.2s;
}
body.notDefined {
opacity: 0;
}
.group {
display: flex;
}
.group > * {
margin: 8px;
}
.light {
--mdc-theme-on-primary: black;
--mdc-theme-primary: white;
--mdc-theme-on-secondary: black;
--mdc-theme-secondary: white;
}
.special {
--mdc-theme-on-primary: white;
--mdc-theme-primary: #e9437a;
--mdc-theme-on-secondary: white;
--mdc-theme-secondary: #e9437a;
}
.light-icon {
color: gray;
}
.special-icon {
color: #e9437a;
}
</style>
<script>
addEventListener('WebComponentsReady', () => {
var app = Elm.Main.fullscreen();
document.body.classList.remove('notDefined');
app.ports.snackbarUnsafe.subscribe(function(msg) {
if (msg.action === 'show') {
if (typeof msg.snack === 'undefined') {
return;
}
snackbar = document.getElementById(msg.id);
if (typeof snackbar === 'undefined') {
return;
}
snackbar.dismissesOnAction = msg.snack.dismissesOnAction;
snackbar.show(msg.snack);
}
});
})
</script>
</body>
</html>