-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
47 lines (43 loc) · 1.83 KB
/
index.html
File metadata and controls
47 lines (43 loc) · 1.83 KB
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
<!DOCTYPE HTML>
<html>
<!-- this html is as close to identical to what's produced by the
elm compiler's '--output index.html' as possible.
two seemingly subtle things that seem like they shouldn't matter but
are required to get things to load at all:
(1) the tag must be <script></script> rather than <script/>
(2) the inline script that invokes elm must be in the body, not the
head.-->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
<meta name="theme-color" content="#000000"/>
<meta name="msapplication-navbutton-color" content="#000000"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<title>Album Loading</title>
<style>
html,head,body {
padding:0; margin:0;
background: black;
}
body {
font-family: calibri, helvetica, arial, sans-serif;
color: white;
}
</style>
<script type="text/javascript" src="elbum.js"></script>
</head>
<body>
<script type="text/javascript">
// cribbed from https://github.com/lazd/iNoBounce/blob/master/inobounce.js
// Enable by default if the browser supports -webkit-overflow-scrolling
// Test this by setting the property with JavaScript on an element that exists in the DOM
// Then, see if the property is reflected in the computed style
var testDiv = document.createElement('div');
document.documentElement.appendChild(testDiv);
testDiv.style.WebkitOverflowScrolling = 'touch';
var scrollSupport = 'getComputedStyle' in window && window.getComputedStyle(testDiv)['-webkit-overflow-scrolling'] === 'touch';
document.documentElement.removeChild(testDiv);
var app = Elm.Main.init({flags:{scrollSupport: scrollSupport}});
</script>
</body>
</html>