mirror of
https://github.com/Orasund/elm-ui-widgets.git
synced 2024-09-11 14:35:37 +03:00
26 lines
519 B
HTML
26 lines
519 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Main</title>
|
|
<style>body { padding: 0; margin: 0; }</style>
|
|
<script src="/main.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<script>
|
|
(function(){
|
|
var settings = localStorage.getItem("settings");
|
|
const app = Elm.Main.init({
|
|
flags: {
|
|
settings: settings
|
|
}
|
|
});
|
|
app.ports.saveSettings.subscribe(function(settings){
|
|
localStorage.setItem("settings", settings);
|
|
});
|
|
}());
|
|
</script>
|
|
</body>
|
|
</html>
|