Boilerplate

This commit is contained in:
Kai Vogelgesang
2020-04-16 17:15:17 +02:00
parent c4ffa25b33
commit e8900515bb
3 changed files with 62 additions and 37 deletions

46
ui.html
View File

@@ -3,39 +3,25 @@
<head>
<title>leafblade Minecraft Server</title>
<meta charset="UTF-8" />
<style type="text/css">
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#map {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
@media (max-width:768px) {
#overlay { width: 100% }
}
</style>
<script type="text/javascript">
</script>
<meta charset="UTF-8"/>
</head>
<body>
<div id="container"></div>
this is the UI
</div>
this is the UI
<button id="test_api">Test API</button>
<script src="/static/renderer.js"></script>
<script>
document.getElementById("test_api").onclick = async function (e) {
let data = {foo: 'bar'};
await fetch('api', {
method: 'POST',
body: JSON.stringify(data),
})
};
</script>
</body>
</html>