-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
42 lines (40 loc) · 1.43 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
<!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, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="public/manifest.json">
<link rel="shortcut icon" href="public/favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<link href="https://use.fontawesome.com/releases/v5.0.4/css/all.css" rel="stylesheet">
<link rel="stylesheet" href="src/main.css">
<script type="text/javascript" src="build/elm.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Faker/3.1.0/faker.js"></script>
<title>Elm App</title>
</head>
<body>
<script>
var getNames = function(count) {
var names = [];
for(i=0; i < count; i++) {
var name = faker.name.firstName();
names.push(name);
}
return names;
};
var app = Elm.Main.fullscreen({initialNames: getNames(13)});
app.ports.getNames.subscribe(function(count) {
app.ports.provideNames.send(getNames(count));
});
</script>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
</body>
</html>