ZDDC/bootstrap/level2.html.tmpl
ZDDC c95f07966d feat(tools,build): in-flight HTML-tool reworks and build-infra updates
Bundles a stretch of in-progress work across the SPA tools so the
tree returns to a coherent shippable state ahead of cutting a new
zddc-server stable image:

- landing: substantial rework of the project picker (sortable/filterable
  table, presets refactor, ?projects= filter, ?v= channel propagation,
  loading/error states)
- archive: presets cleanup, source.js refactor, filtering/url-state
  alignment with the landing page
- mdedit: file-system module split, resizer, file-tree improvements,
  base/toc styling tweaks
- transmittal/classifier: small template touch-ups for shared chrome
- shared: build-lib.sh helpers, new favicon.svg
- bootstrap, build.sh: pick up the channel-aware install/track zip
  generation
- tests: new landing.spec.js, expanded archive/mdedit/build-label specs
- docs: CLAUDE.md picks up the zddc-server section and freshens the
  alpha-build exception note
- regenerated artifacts: install.zip, track-{alpha,beta,stable}.zip,
  *_alpha.html — these are produced by `sh build.sh` and per project
  convention are committed alongside the source changes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 12:52:27 -05:00

51 lines
1.9 KiB
Cheetah

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Loading {{TOOL_TITLE}}…</title>
<link rel="icon" type="image/svg+xml" href="{{FAVICON}}">
<style>html,body{margin:0;font:14px system-ui,sans-serif;color:#666;padding:1rem}</style>
</head>
<body>
Loading…
<script>
// Level-2 bootstrap. Fetches {{TOOL}} from zddc.varasys.io and
// document.write()s it in place. The default upstream is the
// {{CHANNEL}} channel; the URL parameter ?v= overrides it:
//
// ?v=alpha|beta|stable switches to that channel
// ?v=0.0.4 (or v0.0.4) pins to that exact stable version
// (none) uses the {{CHANNEL}} default
//
// Requires zddc.varasys.io to serve Access-Control-Allow-Origin: *.
(async function () {
const params = new URLSearchParams(location.search);
const v = params.get('v');
const tool = '{{TOOL}}';
const defaultChannel = '{{CHANNEL}}';
const channels = { alpha: '_alpha', beta: '_beta', stable: '_stable' };
function suffixFor(value) {
if (!value) return '_' + defaultChannel;
if (value in channels) return channels[value];
const ver = value.startsWith('v') ? value.slice(1) : value;
return '_v' + ver;
}
const upstream = 'https://zddc.varasys.io/releases/' + tool + suffixFor(v) + '.html';
try {
const resp = await fetch(upstream, { cache: 'no-cache', credentials: 'omit' });
if (!resp.ok) throw new Error(resp.status + ' ' + resp.statusText);
const html = await resp.text();
document.open();
document.write(html);
document.close();
} catch (err) {
document.body.textContent = 'Failed to load from ' + upstream + ': ' + err.message;
}
})();
</script>
</body>
</html>