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