feat(prototype): add wf160 cold turkey contract render
Adds the #160 prototype HTML under ref/prototypes/: an interactive render of the Cold Turkey focus-mode surfaces (arm-bar, progress readout, completion note, save-failure edge) with the 2026-11-04 rulings baked in and toggleable, so the ruled contract can be reviewed without building the feature.
This commit is contained in:
1 parent
e3195d68fd
commit
96e8b5e0e5
1 file changed
+437
@@ -0,0 +1,437 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Museion — Cold Turkey contract render (#160)</title>
|
||||
<style>
|
||||
/* PROTOTYPE #160 — CONTRACT (ruled 2026-11-04, map #158). The Cold Turkey
|
||||
surfaces in the editorial two-color chrome. Rulings: seat = BARE mono text on
|
||||
the focus ground (no chip box), progress = text + 2px hairline, piece title =
|
||||
absent (numerals only), completion note = fades ~6s, near-goal = terracotta
|
||||
numerals @80% (rec stood, unobjected), presence = persistent dot tucked in
|
||||
the BOTTOM-RIGHT corner of focus (label on hover, click arms; menu item
|
||||
stays as the second path). Palette law: DesignTokens only. Voice:
|
||||
mono-10/.08em/upper labels, terracotta = accent AND danger. */
|
||||
:root {
|
||||
--bg: #FAF9F3; /* DesignTokens.background — chrome + focus ground */
|
||||
--surface: #FFFEFB; /* DesignTokens.surface — page + chip fill */
|
||||
--fg: #1a1916;
|
||||
--muted: #6b6964;
|
||||
--border: #e8e5df;
|
||||
--accent: #c96442; /* terracotta — primary AND danger */
|
||||
--fg-soft: rgba(26,25,22,.06);
|
||||
--serif: 'Iowan Old Style', Charter, Georgia, serif;
|
||||
--sans: -apple-system, system-ui, sans-serif;
|
||||
--mono: ui-monospace, 'SF Mono', Menlo, monospace;
|
||||
--radius: 10px;
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html, body { height: 100%; margin: 0; }
|
||||
body { font: 13px/1.45 var(--sans); color: var(--fg); background: var(--bg);
|
||||
display: flex; overflow: hidden; }
|
||||
|
||||
/* ===== demo harness (NOT the contract) ============================== */
|
||||
.harness { display: flex; height: 100vh; width: 100%; }
|
||||
|
||||
/* context = the focused editor: centered serif measure on the focus ground */
|
||||
.context { flex: 1; min-width: 200px; display: flex; flex-direction: column;
|
||||
align-items: center; justify-content: center; position: relative;
|
||||
padding: 40px 6vw; background: var(--bg); }
|
||||
.measure { width: 100%; max-width: 66ch; font: 16px/1.7 var(--serif);
|
||||
color: var(--fg); }
|
||||
.measure h1 { font: 600 22px/1.3 var(--serif); margin: 0 0 18px; }
|
||||
.measure p { margin: 0 0 16px; }
|
||||
.measure .caret { display: inline-block; width: 1.5px; height: 1.05em;
|
||||
background: var(--accent); vertical-align: -0.18em; }
|
||||
.caption { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center;
|
||||
font: 10px var(--mono); letter-spacing: .06em; text-transform: uppercase;
|
||||
color: var(--muted); opacity: .7; padding: 0 20px; }
|
||||
.caption b { color: var(--accent); font-weight: 400; opacity: 1; }
|
||||
|
||||
.stage { display: flex; flex-direction: column; border-left: 1px solid var(--border);
|
||||
background: var(--bg); }
|
||||
.tabs { display: flex; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--border);
|
||||
background: #1a1916; flex-wrap: wrap; }
|
||||
.tabs button { font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
color: rgba(250,249,243,.55); background: none; border: none;
|
||||
padding: 5px 9px; border-radius: 6px; cursor: pointer; }
|
||||
.tabs button.on { color: #faf9f3; background: rgba(250,249,243,.14); }
|
||||
|
||||
/* ===== the Cold Turkey surfaces (the contract) ====================== */
|
||||
|
||||
/* -- surface 0 · persistent dot (presence ruling: "always", bottom-right):
|
||||
the quiet always-there affordance in plain focus — muted 6px dot, label on
|
||||
hover, click arms. Only exists when the ruling says "always"; menu-invoked
|
||||
shows nothing. Ruled 2026-11-04: tucked in the right corner, not center. */
|
||||
.ct-dot { position: absolute; bottom: 18px; right: 20px;
|
||||
display: flex; align-items: center; gap: 8px; cursor: pointer;
|
||||
background: none; border: none; padding: 6px; }
|
||||
.ct-dot .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
|
||||
transition: background .15s; }
|
||||
.ct-dot .lbl { font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
color: var(--muted); opacity: 0; transition: opacity .15s; }
|
||||
.ct-dot:hover .pip { background: var(--accent); }
|
||||
.ct-dot:hover .lbl { opacity: .85; }
|
||||
|
||||
/* -- surface 1 · arm-bar: quiet bottom-center, no modal.
|
||||
Arrives via menu (Focus ▸ Start Cold Turkey…) or the persistent dot,
|
||||
dismissed by Esc or blur-of-intent (Start is the only commit). */
|
||||
.armbar { position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%);
|
||||
background: rgba(255,254,251,.96); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 12px 16px 10px;
|
||||
box-shadow: 0 6px 18px rgba(26,25,22,.08);
|
||||
display: flex; flex-direction: column; gap: 9px; align-items: center; }
|
||||
.armbar .selector { display: flex; gap: 14px; }
|
||||
.armbar .selector button { font: 10px var(--mono); letter-spacing: .08em;
|
||||
text-transform: uppercase; background: none; border: none;
|
||||
padding: 3px 0 5px; cursor: pointer; color: var(--muted);
|
||||
border-bottom: 2px solid transparent; }
|
||||
.armbar .selector button.on { color: var(--fg); border-bottom-color: var(--accent); }
|
||||
.armbar .row { display: flex; align-items: center; gap: 10px; }
|
||||
.step { font: 11px var(--mono); color: var(--fg); background: var(--surface);
|
||||
border: 1px solid var(--border); border-radius: 6px; width: 26px; height: 26px;
|
||||
cursor: pointer; line-height: 1; }
|
||||
.value { font: 13px var(--mono); color: var(--fg); min-width: 86px; text-align: center;
|
||||
letter-spacing: .04em; }
|
||||
.btn { font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase;
|
||||
height: 28px; padding: 0 16px; border-radius: 6px; cursor: pointer;
|
||||
border: 1px solid transparent; }
|
||||
.btn-primary { background: var(--accent); color: #fffefb; }
|
||||
.armbar .hint { font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
color: var(--muted); opacity: .7; }
|
||||
|
||||
/* -- surface 2 · progress readout: the arm-bar shrunk to its numeral state.
|
||||
Bottom-center, same seat as the arm-bar — one lineage, not two chrome sites. */
|
||||
.readout { position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%);
|
||||
background: rgba(255,254,251,.96); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 8px 16px 9px;
|
||||
box-shadow: 0 6px 18px rgba(26,25,22,.08);
|
||||
display: flex; flex-direction: column; align-items: center; gap: 3px;
|
||||
pointer-events: none; }
|
||||
.readout .piece { font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
color: var(--muted); opacity: .85; max-width: 60vw; overflow: hidden;
|
||||
text-overflow: ellipsis; white-space: nowrap; }
|
||||
.readout .num { font: 13px var(--mono); letter-spacing: .05em; color: var(--fg); }
|
||||
.readout .num .unit { font-size: 10px; letter-spacing: .08em; color: var(--muted);
|
||||
margin-left: 7px; }
|
||||
/* near-goal ruling: numerals flip terracotta inside the last 20% */
|
||||
.readout.near .num { color: var(--accent); }
|
||||
/* progress-hairline ruling (off = text only) */
|
||||
.readout .track { display: none; width: 148px; height: 2px; border-radius: 1px;
|
||||
background: var(--fg-soft); overflow: hidden; margin-top: 2px; }
|
||||
.hairline .readout .track { display: block; }
|
||||
.readout .track .fill { height: 100%; background: var(--accent); width: 0; }
|
||||
|
||||
/* -- surface 3 · completion note: quiet return to focus. Small mono line in
|
||||
the readout's seat; the fade ruling governs how long it stays. */
|
||||
.done { position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%);
|
||||
font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
color: var(--muted); pointer-events: none; }
|
||||
.done .tick { color: var(--accent); margin-right: 8px; }
|
||||
.done.faded { opacity: 0; transition: opacity 1.2s ease .3s; }
|
||||
|
||||
/* -- edge state · save-failure while locked: the focusChip save cue floats
|
||||
TOP-center (its own seat — never collides with the readout below). */
|
||||
.savechip { position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
|
||||
background: rgba(255,254,251,.96); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 7px 14px;
|
||||
display: flex; align-items: center; gap: 7px;
|
||||
font: 12px var(--sans); color: var(--accent); pointer-events: none; }
|
||||
.savechip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
|
||||
|
||||
/* ===== rulings panel (demo chrome) ================================== */
|
||||
.rulings { width: 268px; flex: none; background: #1a1916; color: #faf9f3;
|
||||
padding: 14px 16px; overflow-y: auto; }
|
||||
.rulings h1 { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase;
|
||||
margin: 0 0 4px; opacity: .9; }
|
||||
.rulings .sub { font: 10px/1.5 var(--mono); opacity: .55; margin: 0 0 14px; }
|
||||
.ruling { margin-bottom: 13px; }
|
||||
.ruling .name { font: 10px var(--mono); letter-spacing: .06em; text-transform: uppercase;
|
||||
opacity: .6; margin-bottom: 5px; display: flex; gap: 6px; flex-wrap: wrap; }
|
||||
.ruling .name .rec { color: var(--accent); opacity: 1; }
|
||||
.ruling .opts { display: flex; flex-wrap: wrap; gap: 4px; }
|
||||
.ruling .opts button { font: 10px var(--mono); background: none; color: rgba(250,249,243,.6);
|
||||
border: 1px solid rgba(250,249,243,.25); border-radius: 6px;
|
||||
padding: 4px 8px; cursor: pointer; }
|
||||
.ruling .opts button.on { color: #1a1916; background: #faf9f3; border-color: #faf9f3; }
|
||||
.rulings .locked { margin-top: 16px; padding-top: 12px;
|
||||
border-top: 1px solid rgba(250,249,243,.15);
|
||||
font: 10px/1.7 var(--mono); opacity: .55; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="harness">
|
||||
|
||||
<!-- context: the focused editor — measure on the focus ground -->
|
||||
<div class="context" id="context">
|
||||
<div class="measure">
|
||||
<h1>The expected value of showing up</h1>
|
||||
<p>The first concrete image lands in paragraph three, and everything before it is weather. Cut to the image — the reader was already there, waiting.</p>
|
||||
<p>I kept arriving at the page with an argument already load<span class="caret"></span></p>
|
||||
</div>
|
||||
|
||||
<!-- edge · save-failure while locked (its own top seat) -->
|
||||
<div class="savechip" data-state="savefail" style="display:none">
|
||||
<span class="dot"></span> Save failed
|
||||
</div>
|
||||
|
||||
<!-- surface 0 · persistent dot (presence ruling: "always") -->
|
||||
<button class="ct-dot" id="ctDot" style="display:none" title="Start Cold Turkey">
|
||||
<span class="pip"></span><span class="lbl">Cold Turkey</span>
|
||||
</button>
|
||||
|
||||
<!-- surface 1 · arm-bar -->
|
||||
<div class="armbar" data-state="arm" style="display:none">
|
||||
<div class="selector" id="goalSel">
|
||||
<button data-kind="minutes">Minutes</button>
|
||||
<button data-kind="words" class="on">Words</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<button class="step" id="minus">−</button>
|
||||
<div class="value" id="value">500 WORDS</div>
|
||||
<button class="step" id="plus">+</button>
|
||||
<button class="btn btn-primary" id="start">Start</button>
|
||||
</div>
|
||||
<div class="hint">esc dismisses · nothing armed yet</div>
|
||||
</div>
|
||||
|
||||
<!-- surface 2 · progress readout -->
|
||||
<div class="readout" id="readout" style="display:none">
|
||||
<div class="piece" id="rPiece">The expected value of showing up</div>
|
||||
<div class="num" id="rNum">212 / 500<span class="unit">words</span></div>
|
||||
<div class="track"><div class="fill" id="rFill"></div></div>
|
||||
</div>
|
||||
|
||||
<!-- surface 3 · completion note -->
|
||||
<div class="done" id="done" style="display:none">
|
||||
<span class="tick">●</span>500 words · 14:02
|
||||
</div>
|
||||
|
||||
<div class="caption" id="caption"></div>
|
||||
</div>
|
||||
|
||||
<div class="stage">
|
||||
<div class="tabs" id="tabs">
|
||||
<button data-state="focus" class="on">focus · quiet</button>
|
||||
<button data-state="arm">arm-bar</button>
|
||||
<button data-state="lockedw">locked · words</button>
|
||||
<button data-state="lockedwnear">locked · near</button>
|
||||
<button data-state="lockedm">locked · minutes</button>
|
||||
<button data-state="complete">complete</button>
|
||||
<button data-state="savefail">edge · save fail</button>
|
||||
</div>
|
||||
<div style="flex:1"></div>
|
||||
</div>
|
||||
|
||||
<!-- rulings: the open calls, each with the recommendation marked ● -->
|
||||
<div class="rulings" id="rulings">
|
||||
<h1>Rulings</h1>
|
||||
<p class="sub">#160 open calls — pick per row; the surfaces update live</p>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Seat <span class="rec">● bare text — ruled</span></div>
|
||||
<div class="opts" data-ruling="seat">
|
||||
<button data-v="chip">bottom chip</button>
|
||||
<button data-v="plain" class="on">bare mono, no chip</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Progress <span class="rec">● + hairline — ruled</span></div>
|
||||
<div class="opts" data-ruling="prog">
|
||||
<button data-v="text">text only</button>
|
||||
<button data-v="hairline" class="on">text + 2px hairline</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Piece title <span class="rec">● absent — ruled</span></div>
|
||||
<div class="opts" data-ruling="title">
|
||||
<button data-v="show">mono-10 above</button>
|
||||
<button data-v="hide" class="on">numerals only</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Near-goal <span class="rec">● terracotta @ 80% — ruled</span></div>
|
||||
<div class="opts" data-ruling="near">
|
||||
<button data-v="accent" class="on">terracotta numerals</button>
|
||||
<button data-v="none">no shift</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Completion note <span class="rec">● fades ~6s — ruled</span></div>
|
||||
<div class="opts" data-ruling="fade">
|
||||
<button data-v="fade" class="on">fade after ~6s</button>
|
||||
<button data-v="stay">stays until focus exits</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ruling">
|
||||
<div class="name">Arm-bar presence <span class="rec">● persistent dot, bottom-right — ruled</span></div>
|
||||
<div class="opts" data-ruling="presence">
|
||||
<button data-v="menu">menu-invoked only</button>
|
||||
<button data-v="always" class="on">persistent dot, bottom-right</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="locked">
|
||||
ruled 2026-11-04 (map #158):<br>
|
||||
· seat = bare mono on focus ground<br>
|
||||
· progress = text + 2px hairline<br>
|
||||
· piece title absent · fades ~6s<br>
|
||||
settled at charting:<br>
|
||||
· no modal — sits in the page<br>
|
||||
· one goal: words OR minutes<br>
|
||||
· hover zones suppressed while locked<br>
|
||||
· ⌘S armed · drafts allowed<br>
|
||||
· terracotta = accent AND danger<br>
|
||||
· chrome mono-10 · .08em · upper<br>
|
||||
· preset chips = fog (post-calibration)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
// innerHTML sites below set only hardcoded CAPTIONS/numeral constants from this
|
||||
// file — no user or remote input ever reaches them (prototype, not shipped UI).
|
||||
const context = document.getElementById('context');
|
||||
const readout = document.getElementById('readout');
|
||||
const done = document.getElementById('done');
|
||||
const armbar = document.querySelector('.armbar');
|
||||
const caption = document.getElementById('caption');
|
||||
const CAPTIONS = {
|
||||
focus: null, // built per-call — presence-aware
|
||||
arm: 'arm-bar open — arrived via <b>focus ▸ start cold turkey…</b> or the corner dot · esc dismisses',
|
||||
lockedw: 'fullscreen lock · menu bar suppressed · ⌘tab refused · library+mentor hidden',
|
||||
lockedwnear: 'same lock, 82% of goal — the near-goal ruling fires',
|
||||
lockedm: 'minutes goal · countdown never pauses (idle, hidden, refused — nothing pauses it)',
|
||||
complete: 'goal met — quiet return to focus · window restored · typing never interrupted',
|
||||
savefail: 'edge: save failed mid-lock — the top cue floats, readout keeps its seat',
|
||||
};
|
||||
|
||||
let kind = 'words', val = 500, doneTimer = null;
|
||||
const fmt = () => kind === 'words' ? val + ' WORDS' : val + ' MIN';
|
||||
const rulingValue = r =>
|
||||
document.querySelector(`[data-ruling="${r}"] .on`).dataset.v;
|
||||
function syncArm() {
|
||||
document.getElementById('value').textContent = fmt();
|
||||
document.querySelectorAll('#goalSel button').forEach(b =>
|
||||
b.classList.toggle('on', b.dataset.kind === kind));
|
||||
}
|
||||
|
||||
function setState(st) {
|
||||
document.querySelectorAll('#tabs button').forEach(b =>
|
||||
b.classList.toggle('on', b.dataset.state === st));
|
||||
context.dataset.state = st;
|
||||
const focusCaption = rulingValue('presence') === 'always'
|
||||
? 'focus mode · nothing armed — quiet corner dot, the only cold turkey chrome'
|
||||
: 'focus mode · nothing armed — plain focus, cold turkey chrome absent';
|
||||
caption.innerHTML = st === 'focus' ? focusCaption : CAPTIONS[st];
|
||||
|
||||
// surface visibility
|
||||
armbar.style.display = st === 'arm' ? '' : 'none';
|
||||
readout.style.display = st.startsWith('locked') || st === 'savefail' ? '' : 'none';
|
||||
document.querySelector('.savechip').style.display = st === 'savefail' ? '' : 'none';
|
||||
// persistent dot: present only in plain focus, and only under the "always" ruling
|
||||
document.getElementById('ctDot').style.display =
|
||||
st === 'focus' && rulingValue('presence') === 'always' ? '' : 'none';
|
||||
|
||||
// readout contents per state
|
||||
const near = rulingValue('near') === 'accent';
|
||||
if (st === 'lockedw' || st === 'savefail') {
|
||||
readout.classList.toggle('near', false);
|
||||
document.getElementById('rNum').innerHTML = '212 / 500<span class="unit">words</span>';
|
||||
document.getElementById('rFill').style.width = '42%';
|
||||
} else if (st === 'lockedwnear') {
|
||||
readout.classList.toggle('near', near);
|
||||
document.getElementById('rNum').innerHTML = '412 / 500<span class="unit">words</span>';
|
||||
document.getElementById('rFill').style.width = '82%';
|
||||
} else if (st === 'lockedm') {
|
||||
readout.classList.toggle('near', near);
|
||||
document.getElementById('rNum').innerHTML = '13:27<span class="unit">left</span>';
|
||||
document.getElementById('rFill').style.width = '55%';
|
||||
}
|
||||
|
||||
// completion note + fade ruling
|
||||
clearTimeout(doneTimer);
|
||||
if (st === 'complete') {
|
||||
done.style.display = '';
|
||||
done.classList.remove('faded');
|
||||
if (rulingValue('fade') === 'fade')
|
||||
doneTimer = setTimeout(() => done.classList.add('faded'), 6000);
|
||||
} else {
|
||||
done.style.display = 'none';
|
||||
done.classList.remove('faded');
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('tabs').addEventListener('click', e => {
|
||||
const btn = e.target.closest('button'); if (!btn) return;
|
||||
setState(btn.dataset.state);
|
||||
});
|
||||
|
||||
// arm-bar interactivity: selector, steppers, Start commits to a word lock
|
||||
document.getElementById('goalSel').addEventListener('click', e => {
|
||||
const btn = e.target.closest('button'); if (!btn) return;
|
||||
kind = btn.dataset.kind; val = kind === 'words' ? 500 : 30; syncArm();
|
||||
});
|
||||
document.getElementById('minus').onclick = () => {
|
||||
val = Math.max(kind === 'words' ? 50 : 5, val - (kind === 'words' ? 50 : 5)); syncArm(); };
|
||||
document.getElementById('plus').onclick = () => {
|
||||
val = Math.min(kind === 'words' ? 5000 : 180, val + (kind === 'words' ? 50 : 5)); syncArm(); };
|
||||
document.getElementById('start').onclick = () =>
|
||||
setState(kind === 'words' ? 'lockedw' : 'lockedm');
|
||||
|
||||
// rulings: seat / progress / title flip classes live
|
||||
const GROUPS = { seat: ['chip','plain'], prog: ['text','hairline'] };
|
||||
document.querySelectorAll('.ruling .opts').forEach(group => {
|
||||
group.addEventListener('click', e => {
|
||||
const btn = e.target.closest('button'); if (!btn) return;
|
||||
group.querySelectorAll('button').forEach(b => b.classList.toggle('on', b === btn));
|
||||
const v = btn.dataset.v, r = group.dataset.ruling;
|
||||
if (r === 'seat') {
|
||||
context.classList.toggle('plain', v === 'plain');
|
||||
[armbar, readout].forEach(el => {
|
||||
el.style.background = v === 'plain' ? 'transparent' : '';
|
||||
el.style.border = v === 'plain' ? 'none' : '';
|
||||
el.style.boxShadow = v === 'plain' ? 'none' : '';
|
||||
});
|
||||
} else if (r === 'prog') {
|
||||
context.classList.toggle('hairline', v === 'hairline');
|
||||
} else if (r === 'title') {
|
||||
document.getElementById('rPiece').style.display = v === 'show' ? '' : 'none';
|
||||
} else if (r === 'near') {
|
||||
if (context.dataset.state === 'lockedwnear' || context.dataset.state === 'lockedm')
|
||||
readout.classList.toggle('near', v === 'accent');
|
||||
} else if (r === 'fade') {
|
||||
if (context.dataset.state === 'complete') setState('complete');
|
||||
} else if (r === 'presence') {
|
||||
// dot visibility is state-dependent — re-run the current state
|
||||
setState(context.dataset.state);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// esc dismisses the arm-bar (edge state: back to quiet focus)
|
||||
document.addEventListener('keydown', e => {
|
||||
if (e.key === 'Escape' && context.dataset.state === 'arm') setState('focus');
|
||||
});
|
||||
|
||||
// persistent dot opens the arm-bar
|
||||
document.getElementById('ctDot').onclick = () => setState('arm');
|
||||
|
||||
// apply the baked rulings (seat=plain, prog=hairline, title=hide), then start
|
||||
context.classList.add('plain', 'hairline');
|
||||
document.getElementById('rPiece').style.display = 'none';
|
||||
[armbar, readout].forEach(el => {
|
||||
el.style.background = 'transparent';
|
||||
el.style.border = 'none';
|
||||
el.style.boxShadow = 'none';
|
||||
});
|
||||
setState('focus');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user