-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
204 lines (173 loc) · 4.77 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Rounded</title>
<link rel="stylesheet" href="css/tachyons.min.css">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#357edd">
<meta name="theme-color" content="#357edd">
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
a {
color: inherit;
text-decoration: none;
}
button {
background: none;
border: none;
}
input,
button {
font-family: inherit;
color: inherit;
}
h1,
h2,
h3,
p {
margin: 0;
}
input[type=range] {
-webkit-appearance: none; /* Hides the slider so that custom slider can be made */
background: transparent; /* Otherwise white in Chrome */
/*transform: rotate(-90deg);*/
}
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
}
input[type=range]:focus {
outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */
}
input[type=range]::-ms-track {
width: 100%;
cursor: pointer;
/* Hides the slider so custom styles can be added */
background: transparent;
border-color: transparent;
color: transparent;
}
input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none;
height: 2rem;
width: 2rem;
border-radius: 50%;
background: #357edd;
cursor: pointer;
margin-top: -14px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
}
/* All the same stuff for Firefox */
input[type=range]::-moz-range-thumb {
height: 2rem;
width: 2rem;
border-radius: 50%;
background: #357edd;
cursor: pointer;
}
/* All the same stuff for IE */
input[type=range]::-ms-thumb {
height: 2rem;
width: 2rem;
border-radius: 50%;
background: #357edd;
cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
width: 100%;
height: 0.5rem;
cursor: pointer;
background: #999;
border-radius: 0.125rem;
}
input[type=range]:focus::-webkit-slider-runnable-track {
background: #367ebd;
}
input[type=range]::-moz-range-track {
width: 100%;
height: 0.5rem;
cursor: pointer;
background: #999;
border-radius: 0.125rem;
}
input[type=range]::-ms-track {
width: 100%;
height: 0.5rem;
cursor: pointer;
background: #999;
border-radius: 0.125rem;
}
.flex-1 {
flex: 1;
}
.vertical-slider {
position: absolute;
width: 40vh;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(270deg);
}
.vh-40 {
height: 40vh;
}
.top-50 {
top: 50%;
}
.left-3 {
left: 3rem;
}
.left--3 {
left: -3rem;
}
.ml-auto {
margin-left: auto;
}
.br4--top-right {
border-top-right-radius: 1rem;
}
.br4--bottom-left {
border-bottom-left-radius: 1rem;
}
.vh {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap;
}
</style>
</head>
<body class="helvetica dark-gray">
<div id="app"></div>
<script src="js/app.js"></script>
<script>
var node = document.getElementById('app');
var model = localStorage.getItem('model');
var startingModel = model ? JSON.parse(model) : null;
var app = Elm.Main.embed(node, startingModel);
app.ports.setStorage.subscribe(function(state) {
localStorage.setItem('model', JSON.stringify(state));
});
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register('/js/service-worker.js')
.then(() => {
console.log('Service worker registered');
})
.catch(err => {
console.log('Service worker registration failed: ' + err);
});
}
</script>
</body>
</html>