<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>drawbar</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1, user-scalable=no"
/>
<style>
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
background: #161719;
color: #cfd2d6;
font-family: ui-sans-serif, system-ui, sans-serif;
}
canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
}
#status {
position: absolute;
top: 50%;
left: 0;
width: 100%;
text-align: center;
transform: translateY(-50%);
font-size: 0.95rem;
letter-spacing: 0.02em;
}
#toosmall {
display: none;
position: absolute;
inset: 0;
z-index: 1;
box-sizing: border-box;
padding: 0 16px;
background: #161719;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
#toosmall p {
margin: 0 0 8px;
max-width: 32rem;
}
#toosmall .head {
font-size: 1.15rem;
font-weight: 600;
}
#toosmall a {
color: #e05040;
}
@media (width < 660px), (height < 430px) {
#toosmall {
display: flex;
}
}
</style>
</head>
<body>
<canvas id="drawbar"></canvas>
<div id="status">loading drawbar…</div>
<div id="toosmall">
<p class="head">drawbar needs a larger screen</p>
<p>It is a desktop application: its panels need more room than a phone or a narrow window has. Open it on a larger screen, or make this window wider.</p>
<p><a href="docs/">User guide</a></p>
</div>
<script type="module">
import init, { start } from "./pkg/drawbar.js";
const status = document.getElementById("status");
try {
await init();
await start(document.getElementById("drawbar"));
status.remove();
} catch (e) {
status.textContent = `drawbar failed to start: ${e}`;
throw e;
}
</script>
</body>
</html>