40 lines
1.1 KiB
HTML
40 lines
1.1 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Elm UI Website</title>
|
|
<style>
|
|
@font-face {
|
|
font-family: "Courier Prime";
|
|
src: url("assets/CourierPrime-Regular.ttf") format("truetype");
|
|
font-weight: normal;
|
|
font-style: normal;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="elm"></div>
|
|
<script src="elm.min.js"></script>
|
|
<script src="ports.websocket.js"></script>
|
|
<script>
|
|
var app = Elm.Main.init({
|
|
node: document.getElementById("elm"),
|
|
});
|
|
initSockets(app);
|
|
const allowedKeys = ["l", "d"];
|
|
document.addEventListener("keydown", (event) => {
|
|
if (
|
|
event.ctrlKey &&
|
|
allowedKeys.includes(event.key.toLowerCase())
|
|
) {
|
|
event.preventDefault();
|
|
}
|
|
|
|
if (event.key === "Tab") {
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|