62 lines
1.7 KiB
HTML
62 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Admin canvas</title>
|
|
<link rel="stylesheet" href="canvas-sdk/glow.css">
|
|
<style>
|
|
/*
|
|
* The thin client's admin workspace (docs/project-plan.md Phase 13, workspace
|
|
* 4:admin). Sibling of digest-engine/render/templates/full.html's #canvas grid —
|
|
* no detail-level toggle here, and no globe double-width special case.
|
|
*/
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background: var(--admin-bg);
|
|
}
|
|
|
|
#canvas {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
|
|
grid-auto-rows: minmax(10rem, auto);
|
|
gap: 1.1rem;
|
|
padding: 1.4rem;
|
|
min-height: 100vh;
|
|
font-size: 1.05rem;
|
|
}
|
|
|
|
#canvas .admin-canvas-raw {
|
|
grid-column: 1 / -1;
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="canvas" class="admin-canvas"></div>
|
|
|
|
<script src="canvas-sdk/window-chrome.js"></script>
|
|
<script src="canvas-sdk/render.js"></script>
|
|
<script>
|
|
// admin-web serves the shared output volume under /output/; admin-canvas's
|
|
// server.py rewrites output/latest.json on every POST /show, so this URL is
|
|
// always current — no coordination with the caller is needed beyond that write.
|
|
var ADMIN_URL = 'output/latest.json';
|
|
// Shorter than the digest's 5-minute poll: this canvas is meant to feel closer to
|
|
// live (a stat pushed moments ago should show up moments later), and its content
|
|
// is far smaller (one screen's worth of windows, no globe/section payload).
|
|
var REFRESH_MS = 15 * 1000;
|
|
|
|
var canvas = document.getElementById('canvas');
|
|
|
|
function load() {
|
|
AdminRender.load(canvas, ADMIN_URL);
|
|
}
|
|
|
|
load();
|
|
setInterval(load, REFRESH_MS);
|
|
</script>
|
|
</body>
|
|
</html>
|