SmartestHome/digest-engine/render/templates/full.html

73 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Digest</title>
<link rel="stylesheet" href="digest-canvas-sdk/glow.css">
<style>
/*
* Full view: the thin client's kiosk Firefox workspace (Phase 11 step 5).
* Multi-column grid so the globe and several windows sit side by side; globe
* windows take a double-width cell because a 260px globe is unreadable across
* a room.
*/
html, body {
margin: 0;
padding: 0;
background: var(--digest-bg);
}
#canvas {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
grid-auto-rows: minmax(12rem, auto);
gap: 1.1rem;
padding: 1.4rem;
min-height: 100vh;
font-size: 1.05rem;
}
#canvas .digest-window-globe {
grid-column: span 2;
grid-row: span 2;
}
@media (max-width: 60rem) {
#canvas .digest-window-globe {
grid-column: span 1;
}
}
#canvas .digest-canvas-raw {
grid-column: 1 / -1;
margin: 0;
}
</style>
</head>
<body>
<div id="canvas" class="digest-canvas"></div>
<script src="digest-canvas-sdk/window-chrome.js"></script>
<script src="digest-canvas-sdk/globe.js"></script>
<script src="digest-canvas-sdk/render.js"></script>
<script>
// digest-web serves the shared output volume under /output/; run.py rewrites
// output/latest.json at the end of every run, so this URL is always current
// and no coordination with the scheduler is needed. Change it if you mount
// the output volume at the server root instead.
var DIGEST_URL = 'output/latest.json';
var REFRESH_MS = 5 * 60 * 1000;
var canvas = document.getElementById('canvas');
function load() {
DigestRender.load(canvas, DIGEST_URL, { detailLevel: 'full' });
}
load();
setInterval(load, REFRESH_MS);
</script>
</body>
</html>