Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
161f2f8
Build the site on a Cloudflare Worker
claude Nov 28, 2026
92798c3
Say copied only when the clipboard took it
claude Nov 28, 2026
b1eac29
Merge branch 'claude/adoring-goldberg-9ylfry' of https://github.com/h…
claude Nov 28, 2026
2e6d0be
Preview each pull request at priv.hbx.sh
claude Nov 28, 2026
6fad2ca
Merge branch 'claude/adoring-goldberg-9ylfry' of https://github.com/h…
claude Nov 28, 2026
e43cc03
Write the copy and code one thing at a time
claude Nov 28, 2026
9aacac9
Merge branch 'claude/adoring-goldberg-9ylfry' of https://github.com/h…
claude Nov 28, 2026
09d5448
Apply the copy review to the site
claude Nov 28, 2026
b3c306e
Merge branch 'claude/adoring-goldberg-9ylfry' of https://github.com/h…
claude Nov 28, 2026
f62fdba
Merge remote-tracking branch 'origin/main' into claude/adoring-goldbe…
claude Nov 28, 2026
47402c0
Serve the site at hermitbox.dev and www
claude Nov 28, 2026
6320fb9
Link the agent targets to the docs agents page
claude Nov 28, 2026
0cd98ce
Point desktop downloads at the desktop key
claude Nov 28, 2026
07a2871
Tidy the front page's headings and copy
claude Nov 28, 2026
b7f99c7
Fix the agents page's headings and fences
claude Nov 28, 2026
1753951
Fix the download page's headings and copy
claude Nov 28, 2026
452acb5
Tighten llms.txt's summary and install line
claude Nov 28, 2026
a29d7f4
Fix footer and 404 headings
claude Nov 28, 2026
3452f71
Link the README's repositories and explain steps
claude Nov 28, 2026
44f39be
Merge branch 'audit-site' into claude/adoring-goldberg-9ylfry
claude Nov 28, 2026
2592826
Format and lint with Biome 2.4.8
claude Nov 29, 2026
1440e2e
Reformat the tree with Biome
claude Nov 29, 2026
9fccd72
Fix the Biome findings
claude Nov 29, 2026
e228009
Run the check in every Preview job
claude Nov 29, 2026
2ca9936
Put the visitor's machine first on /download/
claude Nov 29, 2026
206935b
Merge the merged branch history
claude Nov 29, 2026
1263609
Set Biome's line width to 80
claude Nov 29, 2026
b66057d
Reformat the tree at 80 columns
claude Nov 29, 2026
f400785
Move to the newest toolchain
claude Nov 29, 2026
b84e519
Link the docs' new pages and check every link
claude Nov 29, 2026
fb6796f
Merge the merged branch history
claude Nov 29, 2026
97b630c
Make every site claim true and check it
claude Nov 29, 2026
872c0cd
Merge the merged branch history
claude Nov 29, 2026
5abdbd0
Bound the release and manifest lookups
claude Nov 29, 2026
7c56e0d
Send downloads straight to dl.hbx.sh
claude Nov 29, 2026
4cdd6da
Merge the merged branch history
claude Nov 29, 2026
fade275
Open the front page at the surface
claude Nov 30, 2026
8d41531
Merge the merged branch history
claude Nov 30, 2026
6f27400
Refit the scenes when the width crosses 560px
claude Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions design-system.lock.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"source": "https://claude.ai/artifact/UEdfq9j15HrdpbhCy3Aexf",
"version": "1795865510-b0d4",
"read": "2026-11-28",
"version": "1796062599-6325",
"read": "2026-11-30",
"note": "Vendored unchanged from the design system's project/ folder. Never edited here: refresh all files from a newer version and update these digests together.",
"files": {
"components/bundle.css": "119a1ccf8b02168a48da2389c5a73bd0beaada5640d3931fda95d59322d8f44e",
"components/bundle.js": "c74faecb4ac7b74cf8840e40ea23bfab48d6de1261fcfea92c858f4679b17d1b",
"components/bundle.css": "42c23153f76cf595ad175a154c9f3c537976071f35f5f81070eca4993ca66206",
"components/bundle.js": "a09497025f62edd177184bd55a3603f3a8698b336ed26a849b39283a535c6557",
"fonts/DepartureMono-Regular.woff2": "5b4fed1daa90708aa9c6ee1190abca9dc22164a1c1def0020386e46b61038cfb",
"fonts/Redaction20-Bold.woff2": "5cf9fd819449b70c87f14652eab477246256a0596252a45256beec4870aa5a8e",
"fonts/Redaction20-Regular.woff2": "2d97de61b090a66ee20b9650a3361705a6cfd40910a4b9541a230b57be2b72a1",
Expand Down
2 changes: 2 additions & 0 deletions docs/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Each line records one choice hermitbox.dev made and why.
- VS Code's target stays the documented `code --add-mcp` command; the note that VS Code documents no install link was wrong (it documents `vscode:mcp/install`), so it is removed, and a link waits until hermitbox's docs carry one.
- Each agent dialog's "All agents" link goes to `/agents/`, the page with every agent's steps, rather than that one agent's docs page, which covers an install on another machine.
- Every download link (the nav's Download, the home page's Desktop app button, the footer and llms.txt) goes straight to https://dl.hbx.sh, Hermitbox Desktop's one download page; the site keeps no copy of it, and `scripts/check-build.ts` fails if a built page links a `/download/` of its own.
- The front page opens at the surface, as the design system's landing page does: a full-bleed `surface` beach starts at the top of the window behind the top bar (`Page`'s `surface` prop), the words sit on its sky, the install panel and buttons are solid navy on top, the crabs stay on the sand beside them (`data-keep-out`) and clouds stay off the headline (`data-cloud-clear`); the close comes back up to the surface with the crabs awake. The hero's sky reaches to half the scene (`data-sky="0.5"`, the shore at 0.6) so the last line of the intro stays at 4.5:1 or better on it.
- A scene's `data-narrow` holds the options it takes below 560px, applied by `Page` before the scenes mount: on a phone the words fill the sky, so the hero's beach runs on under them to a strip of sand with its crab above the install panel, the close puts its sand below the panel, and both drop the sun, which would sit on the text.
231 changes: 230 additions & 1 deletion public/design-system/components/bundle.css

Large diffs are not rendered by default.

108 changes: 102 additions & 6 deletions public/design-system/components/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
shallow: '#4A65C8', foam: '#C9D6FF', wet: '#121D62', sand: '#16236E', sandDark: '#0F1958', sandLight: '#24348C',
sun: '#E8EEFF', halo: '#8FA5F0', cloud: '#6A84D8', cloudShade: '#4660C0', glint: '#C9D6FF', shell: '#5E78D2', star: null, foot: '#0B1450', streak: true
},
// surface: the top of the water in full light. Same single blue family as deep, lifted: cobalt sky with streak clouds,
// a white horizon glow, bright water. For the landing hero, which dissolves down into deep.
surface: {
sky: ['#1C2890', '#1F2D98', '#2333A2', '#2839AC', '#2E40B6', '#3749C0', '#4659C8', '#6377D4', '#A6B6EE', '#DDE4FF'], sea: ['#C3CEF6', '#8A9EE6', '#5E76D6', '#4560C8', '#3550BA'],
shallow: '#7E94E2', foam: '#F4F6FF', wet: '#2A3BA6', sand: '#2E40AE', sandDark: '#2535A0', sandLight: '#4257C0',
sun: '#FFFFFF', halo: '#C9D3FF', cloud: '#C2CDF5', cloudShade: '#8EA1E6', glint: '#FFFFFF', shell: '#C3CEF6', star: null, foot: '#1E2C92', streak: true
},
day: {
sky: ['#3FB4FF', '#6CCBFF', '#9BDCFF', '#C8EEFF'], sea: ['#0A55D9', '#0B6FE6', '#1192F2', '#22B4FA', '#5ACDFF'],
shallow: '#8FE0FF', foam: '#FFFFFF', wet: '#E9AE45', sand: '#FFE49C', sandDark: '#F2BE57', sandLight: '#FFF6D2',
Expand Down Expand Up @@ -160,6 +167,10 @@
labels: opts.labels != null ? opts.labels : ('labels' in d),
sun: opts.sun != null ? +opts.sun : (d.sun != null ? +d.sun : 0.78),
clouds: +(opts.clouds != null ? opts.clouds : (d.clouds != null ? d.clouds : 4)),
// cloudClear: 'x0,y0,x1,y1' as fractions of the scene; clouds dissolve out of that rectangle (keep them off a headline)
// keepOut: 'x0,y0,x1,y1' as fractions; crabs are placed and wander outside that box (keep them out from behind a panel)
keepOut: opts.keepOut || (d.keepOut ? d.keepOut.split(',').map(Number) : null),
cloudClear: opts.cloudClear || (d.cloudClear ? d.cloudClear.split(',').map(Number) : null),
seed: +(opts.seed || d.seed || 7),
hint: opts.hint != null ? opts.hint : ('hint' in d),
max: +(opts.max || d.max || 9),
Expand All @@ -172,6 +183,9 @@
wander: opts.wander != null ? opts.wander : !('nowander' in d),
names: opts.names || (d.names ? d.names.split(',').map(function (n) { return n.trim(); }).filter(Boolean) : null)
};
// fade colour 'page' = the page background (--bg), so one scene works in Deep and Paper
var pageBg = function (v) { if (v !== 'page') return v; var c = getComputedStyle(el).getPropertyValue('--bg').trim(); return c || '#0A1150'; };
this.o.fade = this.o.fade && pageBg(this.o.fade); this.o.fadeTop = this.o.fadeTop && pageBg(this.o.fadeTop);
this.pal = upal(TIMES[this.o.time] || TIMES.deep); this.streak = !!(TIMES[this.o.time] || {}).streak;
this.rand = mulberry(this.o.seed);
this.crabs = []; this.parts = []; this.t = 0; this.listeners = []; this.nextId = 1;
Expand All @@ -195,7 +209,9 @@
var self = this;
if (window.ResizeObserver) { this.ro = new ResizeObserver(function () { self.resize(); }); this.ro.observe(el); }
var n0 = this.o.names && opts.crabs == null && d.crabs == null ? this.o.names.length : this.o.crabs;
for (var i = 0; i < n0; i++) { var c0 = this.add((i + 0.5 + (this.rand() - 0.5) * 0.4) * this.w / n0, this.sandY(), { mode: 'idle', quiet: true, name: this.o.names ? this.o.names[i] : null }); if (this.o.asleep) { c0.mode = 'sleep'; c0.z = this.rand() * 1.2; } }
var ko = this.o.keepOut, kx0 = ko ? Math.max(0, ko[0] * this.w - 18) : 0, kx1 = ko ? Math.min(this.w, ko[2] * this.w + 18) : 0, freeW = this.w - (kx1 - kx0);
for (var i = 0; i < n0; i++) { var fx = (i + 0.5 + (this.rand() - 0.5) * 0.4) * freeW / n0, sy0 = this.sandY(); if (ko && fx > kx0 && this.blocked(kx0 + 1, sy0)) fx += kx1 - kx0;
var c0 = this.add(fx, sy0, { mode: 'idle', quiet: true, name: this.o.names ? this.o.names[i] : null }); if (this.o.asleep) { c0.mode = 'sleep'; c0.z = this.rand() * 1.2; } }
if (this.o.interactive) this.bind();
this.step(0.016); this.draw();
if (!(this.o.still || this.reduced)) this.loop();
Expand Down Expand Up @@ -228,23 +244,37 @@
for (var i = 0; i < n; i++) blobs.push([i * s * 1.3 - n * s * 0.6, -R() * s * 0.6, s * (0.7 + R() * 0.6)]);
return { x: x, y: 2 + R() * Math.max(2, this.skyH * 0.55), v: 0.6 + R() * 1.2, b: blobs };
};
// is a crab standing at (x, y) inside keepOut? (sprite is 36 wide, 26 tall, feet at y)
Scene.prototype.blocked = function (x, y) {
var k = this.o.keepOut; if (!k) return false;
return x + 18 > k[0] * this.w && x - 18 < k[2] * this.w && y > k[1] * this.h && y - 26 < k[3] * this.h;
};
// may a cloud pixel be drawn here? false inside cloudClear, dithered over an 8-pixel edge
Scene.prototype.cloudOK = function (x, y) {
var c = this.o.cloudClear; if (!c) return true;
var x0 = c[0] * this.w, y0 = c[1] * this.h, x1 = c[2] * this.w, y1 = c[3] * this.h, e = 8;
var dx = Math.max(x0 - x, 0, x - x1), dy = Math.max(y0 - y, 0, y - y1), d = Math.max(dx, dy);
return d >= e || (d > 0 && d / e > bayer(x, y));
};
Scene.prototype.sandX = function () { return 22 + this.rand() * Math.max(10, this.w - 44); };
Scene.prototype.sandY = function () { var top = this.shoreY + 30, bot = this.h - 3 - (this.o.fade ? Math.round(this.o.fadeRows * 0.75) : 0); if (bot < top) bot = top; return top + this.rand() * Math.max(1, bot - top); };
// the emptiest patch of sand: best of 12 tries, scored by distance to the nearest crab
Scene.prototype.free = function () {
var best = null, bd = -1, self = this;
var best = null, bd = -2, self = this;
for (var k = 0; k < 12; k++) {
var x = this.sandX(), y = this.sandY(), md = 1e9;
this.crabs.forEach(function (o) { md = Math.min(md, Math.hypot((o.x - x) / 40, (o.y - y) / 12)); });
if (this.blocked(x, y)) md = -1;
if (md > bd) { bd = md; best = [x, y]; }
}
return best;
};
Scene.prototype.spot = function (c, nearShore) {
var best = null, bd = -1, self = this;
var best = null, bd = -2, self = this;
for (var k = 0; k < 8; k++) {
var x = Math.max(18, Math.min(this.w - 18, c.x + (this.rand() - 0.5) * 140)), y = nearShore ? this.shoreY + 24 + this.rand() * 4 : this.sandY();
var md = 1e9; this.crabs.forEach(function (o) { if (o !== c) md = Math.min(md, Math.hypot((o.x - x) / 40, (o.y - y) / 10)); });
if (this.blocked(x, y)) md = -1;
if (md > bd) { bd = md; best = [x, y]; }
}
return best;
Expand Down Expand Up @@ -540,7 +570,7 @@
for (var j2 = 0; j2 < sc.b.length; j2++) {
var sb = sc.b[j2], sy0 = Math.round(sc.y + sb[1] * 0.6 + j2 * 2), half2 = sb[2] * 3.2, sx0 = sc.x + sb[0] * 1.6;
if (sy0 < 0 || sy0 >= skyH) continue;
for (x = Math.floor(sx0 - half2); x <= sx0 + half2; x++) { if (x < 0 || x >= W) continue; var edge = Math.abs(x - sx0) / half2; if (edge > 0.6 && edge - 0.6 > bayer(x, sy0) * 0.4) continue; b[sy0 * W + x] = j2 % 2 ? P.cloudShade : P.cloud; }
for (x = Math.floor(sx0 - half2); x <= sx0 + half2; x++) { if (x < 0 || x >= W) continue; var edge = Math.abs(x - sx0) / half2; if (edge > 0.6 && edge - 0.6 > bayer(x, sy0) * 0.4) continue; if (!this.cloudOK(x, sy0)) continue; b[sy0 * W + x] = j2 % 2 ? P.cloudShade : P.cloud; }
}
}
if (!this.streak) for (i = 0; i < cl.length; i++) {
Expand All @@ -549,6 +579,7 @@
var bl = c.b[j], cx = c.x + bl[0], cy = c.y + bl[1], r = bl[2];
for (y = Math.floor(cy - r); y <= cy + r; y++) for (x = Math.floor(cx - r * 1.6); x <= cx + r * 1.6; x++) {
if (x < 0 || x >= W || y < 0 || y >= skyH) continue;
if (!this.cloudOK(x, y)) continue;
var q = ((x - cx) / 1.6) * ((x - cx) / 1.6) + (y - cy) * (y - cy);
if (q <= r * r && y <= c.y + 1) b[y * W + x] = (y > c.y - 1) ? P.cloudShade : P.cloud;
}
Expand Down Expand Up @@ -671,12 +702,77 @@
});
});
}
// tabs: <div data-hb-tabs> with [role=tab][aria-controls] buttons and [role=tabpanel] panels
function bindTabs(root) {
Array.prototype.forEach.call(root.querySelectorAll('[data-hb-tabs]'), function (box) {
if (box._hbt) return; box._hbt = 1;
var tabs = box.querySelectorAll('[role="tab"]');
Array.prototype.forEach.call(tabs, function (t) {
t.addEventListener('click', function () {
Array.prototype.forEach.call(tabs, function (u) { var on = u === t; u.setAttribute('aria-selected', on); var pnl = document.getElementById(u.getAttribute('aria-controls')); if (pnl) pnl.hidden = !on; });
var cp = box.querySelector('[data-copy-from]'); if (cp) { var pn = document.getElementById(t.getAttribute('aria-controls')); if (pn) cp.setAttribute('data-copy', pn.textContent.replace(/^\$ /gm, '')); }
});
});
});
}
// docs depth gauge: <nav class="hb-depth" data-hb-depth> … <div class="hb-depth__track"><ol>…</ol><i class="hb-pip hb-depth__crab" data-state="running"></i></div>
// Marks the section you are reading, moves the crab to it, and fills empty depth labels (1 m per 48 px of page).
// Returns a handle { nav, mark(i), destroy() }. Calling depth() again on the same nav returns the same handle.
// destroy() removes the window scroll and resize listeners and the link listeners. A page swap without a reload
// must call it for the old page's gauge before removing it: Hermitbox.depth(oldNav).destroy().
function depth(nav, o) {
if (nav._hbd) return nav._hbd; o = o || {};
var links = Array.prototype.slice.call(nav.querySelectorAll('a[href^="#"]')), crab = nav.querySelector('.hb-depth__crab'), track = nav.querySelector('.hb-depth__track') || nav;
var heads = links.map(function (a) { return document.getElementById(decodeURIComponent(a.getAttribute('href').slice(1))); });
var top0 = heads[0] ? heads[0].getBoundingClientRect().top + scrollY : 0;
links.forEach(function (a, i) { var d = a.querySelector('.d'); if (d && !d.textContent && heads[i]) d.textContent = Math.max(0, Math.round((heads[i].getBoundingClientRect().top + scrollY - top0) / 48)) + ' m'; });
function mark(i) {
links.forEach(function (a, j) { if (j === i) a.setAttribute('aria-current', 'true'); else a.removeAttribute('aria-current'); });
if (crab && links[i]) { var r = links[i].getBoundingClientRect(), t = track.getBoundingClientRect(); crab.style.transform = 'translateY(' + Math.round(r.top - t.top + r.height / 2 - 7) + 'px)'; }
}
function current() { return Math.max(0, links.findIndex(function (a) { return a.getAttribute('aria-current') === 'true'; })); }
function spy() {
var off = (o.offset || 96), cur = 0;
heads.forEach(function (h, i) { if (h && h.getBoundingClientRect().top - off <= 0) cur = i; });
if (innerHeight + scrollY >= document.documentElement.scrollHeight - 2) cur = heads.length - 1;
mark(cur);
}
function onResize() { mark(current()); }
var clicks = links.map(function (a, i) { var f = function () { setTimeout(function () { mark(i); }, 0); }; a.addEventListener('click', f); return f; });
var start = links.findIndex(function (a) { return a.getAttribute('aria-current') === 'true'; });
if (start >= 0) mark(start); else spy();
var spying = !o.static && !nav.hasAttribute('data-static');
if (spying) addEventListener('scroll', spy, { passive: true });
addEventListener('resize', onResize);
var handle = {
nav: nav, mark: mark,
destroy: function () {
if (spying) removeEventListener('scroll', spy, { passive: true });
removeEventListener('resize', onResize);
links.forEach(function (a, i) { a.removeEventListener('click', clicks[i]); });
if (nav._hbd === handle) nav._hbd = null;
}
};
nav._hbd = handle;
return handle;
}
// docs theme switch: <div class="hb-dtheme"><button>deep</button><button>paper</button><button>auto</button></div>
// Reflects and sets data-theme on <html> (dark = deep, light = paper; auto follows the system).
function bindTheme(root) {
Array.prototype.forEach.call(root.querySelectorAll('.hb-dtheme'), function (g) {
if (g._hbth) return; g._hbth = 1; var bs = g.querySelectorAll('button'), de = document.documentElement;
function show() { var t = de.getAttribute('data-theme-choice') || (de.getAttribute('data-theme') === 'light' ? 'paper' : 'deep'); Array.prototype.forEach.call(bs, function (b) { b.setAttribute('aria-pressed', b.textContent.trim() === t); }); }
Array.prototype.forEach.call(bs, function (b) { b.addEventListener('click', function () { var w = b.textContent.trim(); de.setAttribute('data-theme-choice', w); de.setAttribute('data-theme', w === 'paper' ? 'light' : w === 'deep' ? 'dark' : (matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark')); show(); }); });
show();
});
}
function mount(root) {
root = root || document; var out = []; bindCopy(root);
root = root || document; var out = []; bindCopy(root); bindTabs(root); bindTheme(root);
Array.prototype.forEach.call(root.querySelectorAll('[data-hb-depth]'), function (el) { depth(el); });
Array.prototype.forEach.call(root.querySelectorAll('[data-hb-scene]'), function (el) { if (!el._hb) { el._hb = new Scene(el); out.push(el._hb); } });
Array.prototype.forEach.call(root.querySelectorAll('[data-hb-anim]'), function (el) { if (!el._hb) el._hb = Player(el, el.dataset.hbAnim, { px: +(el.dataset.px || 4), ground: el.dataset.ground, foot: el.dataset.foot }); });
return out;
}

window.Hermitbox = { Scene: Scene, Player: Player, mount: mount, bindCopy: bindCopy, ANIM: ANIM, TIMES: TIMES, SPRITE: SP, frame: frame, version: '3.1.0' };
window.Hermitbox = { Scene: Scene, Player: Player, mount: mount, bindCopy: bindCopy, bindTabs: bindTabs, bindTheme: bindTheme, depth: depth, ANIM: ANIM, TIMES: TIMES, SPRITE: SP, frame: frame, version: '3.1.0' };
})();
39 changes: 34 additions & 5 deletions src/layouts/Page.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ interface Props {
title: string
description: string
path: string
/** The page opens on a surface scene that starts behind the top bar. */
surface?: boolean
}
const { title, description, path } = Astro.props
const { title, description, path, surface = false } = Astro.props
const canonical = new URL(path, 'https://hermitbox.dev').href
---
<!doctype html>
Expand All @@ -36,20 +38,47 @@ const canonical = new URL(path, 'https://hermitbox.dev').href
</head>
<body class="hb">
<a class="skip" href="#main">Skip to content</a>
<div class="mk">
<div class:list={["mk", { "mk--surface": surface }]}>
<TopNav current={path} />
<main id="main"><slot /></main>
<Footer />
</div>
<AgentDialogs />
<script is:inline src="/design-system/components/bundle.js"></script>
<script is:inline>
// At most one crab per 240px of a scene's width (the design system's rule), then start the art.
for (const el of document.querySelectorAll('[data-hb-scene][data-crabs]')) {
// Fits every scene to its width before it starts. A scene's data-narrow (JSON) holds the options
// it takes on a phone (site.css's 560px rule); crossing that width, as a phone does when it
// turns, remounts the scenes that have one with the options for the new width. And at most one
// crab per 240px of a scene's width (the design system's rule).
const phone = matchMedia('(max-width: 560px)')
const scenes = Array.from(document.querySelectorAll('[data-hb-scene]'), (el) => {
const narrow = el.dataset.narrow ? JSON.parse(el.dataset.narrow) : {}
const wide = {}
for (const key of Object.keys(narrow)) wide[key] = el.dataset[key]
return { el, narrow, wide, crabs: el.dataset.crabs }
})
const fit = ({ el, narrow, wide, crabs }) => {
for (const [key, value] of Object.entries(phone.matches ? narrow : wide)) {
if (value === undefined) delete el.dataset[key]
else el.dataset[key] = value
}
if (crabs === undefined) return
const most = Math.max(1, Math.floor(el.clientWidth / 240))
if (Number(el.dataset.crabs) > most) el.dataset.crabs = String(most)
el.dataset.crabs = String(Math.min(Number(crabs), most))
}
for (const scene of scenes) fit(scene)
window.Hermitbox && window.Hermitbox.mount()
phone.addEventListener('change', () => {
if (!window.Hermitbox) return
for (const scene of scenes) {
if (!scene.el._hb || !Object.keys(scene.narrow).length) continue
scene.el._hb.destroy()
scene.el.replaceChildren()
delete scene.el._hb
fit(scene)
}
window.Hermitbox.mount()
})
</script>
<script src="../scripts/copy.js"></script>
<slot name="scripts" />
Expand Down
Loading
Loading