Skip to content

Instantly share code, notes, and snippets.

@stormont
Last active December 9, 2016 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stormont/36ec80599fc15c8b44c06be3d0bdb8c2 to your computer and use it in GitHub Desktop.
Save stormont/36ec80599fc15c8b44c06be3d0bdb8c2 to your computer and use it in GitHub Desktop.
Index page for use with elm-make
<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