Files
Richard Feldman 3453035ffd Fix index.html
2018-08-14 02:12:19 -04:00

43 lines
1.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Elm Workshop</title>
<!-- Favicon -->
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<!-- Import Ionicon icons & Google Fonts our Bootstrap theme relies on -->
<link href="//code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css">
<link href="/fonts.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/main.css">
<!-- We'll use localForage as a JavaScript interop example in part9! -->
<script src="/assets/localForage.js"></script>
<script src="elm.js"></script>
</head>
<body>
<script>
// 👋 Hi there!
//
// If you're working on the JS interop exercise for part9,
// all the info you need on the JS side is in this <script> right here.
//
// On the Elm side, you'll need to make changes to `part9/src/Session.elm`.
localforage.getItem("session", function(err, session) {
var app = Elm.Main.init({flags: session});
app.ports.storeSession.subscribe(function(newSession) {
localforage.setItem("session", newSession, function() {
app.ports.onSessionChange.send(newSession);
});
});
});
</script>
</body>
</html>