Last active
December 9, 2016 18:51
-
-
Save stormont/36ec80599fc15c8b44c06be3d0bdb8c2 to your computer and use it in GitHub Desktop.
Index page for use with elm-make
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<!-- Put the path to your styles here --> | |
<link rel="stylesheet" href="/static/styles.css"> | |
</head> | |
<body> | |
<div id="my-app"></div> | |
</body> | |
<!-- Your source after making --> | |
<script type="text/javascript" src="/elm.js"></script> | |
<!-- Removes splash and starts elm app. --> | |
<script type="text/javascript"> | |
var node = document.getElementById('my-app'); | |
if (typeof Elm.Main !== 'undefined') { | |
Elm.Main.embed(node); | |
} else { | |
node.innerHTML = 'Elm.Main is not defined; did you compile the correct module?'; | |
} | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment