| index b517f5d..9a30b5b 100644 |
| --- a/docs/superpowers/specs/2026-11-17-presenter-mockup.html |
| +++ b/docs/superpowers/specs/2026-11-17-presenter-mockup.html |
| @@ -3,78 +3,134 @@ |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| -<title>Slides: the presenter window, copied from the HalfStack deck (mockup 3)</title> |
| +<title>Slides: the presenter window (mockup 5)</title> |
| <style> |
| - /* Values are the deck's own (engine/deck.css, "presenter view"). */ |
| - :root { --bg: #0b0b0f; --ink: #efefec; --ink-2: #c4c4cc; --muted: #9a9aa6; --accent: #ffb454; --panel: #111118; --border: #26262f; |
| - --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; --paper: #faf6ee; --paper-ink: #1c2230; } |
| + /* The palette and the proportions are the HalfStack deck's presenter view. */ |
| + :root { |
| + --bg: #0b0b0f; --ink: #efefec; --ink-2: #c4c4cc; --muted: #9a9aa6; --faint: #6c6c78; --accent: #ffb454; |
| + --panel: #111118; --raised: #181820; --border: #26262f; --paper: #faf6ee; --paper-ink: #1c2230; |
| + --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; |
| + --ease: cubic-bezier(0.16, 1, 0.3, 1); |
| + } |
| * { box-sizing: border-box; } |
| html, body { margin: 0; block-size: 100%; } |
| - body { background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, sans-serif; } |
| - button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; } |
| + body { background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, sans-serif; -webkit-font-smoothing: antialiased; } |
| + ::selection { background: rgb(255 180 84 / 0.3); color: var(--ink); } |
| + * { scrollbar-width: thin; scrollbar-color: #3a3a46 transparent; } |
| + button, input { font: inherit; color: inherit; } |
| + button { cursor: pointer; background: none; border: 0; } |
| + :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } |
| [hidden] { display: none !important; } |
| - #presenter { min-block-size: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 20px 32px; padding: 20px 28px 24px; } |
| - #phead { grid-column: 1 / 3; display: flex; align-items: baseline; gap: 32px; font-family: var(--mono); font-size: 26px; color: var(--muted); padding-block-end: 14px; border-block-end: 1px solid var(--border); position: relative; } |
| - #ppos { color: var(--ink); padding: 4px 12px; border-radius: 4px; } |
| - #ppos:hover, #pelapsed:hover { background: var(--panel); } |
| - #pblack { color: var(--accent); letter-spacing: 0.14em; border: 1px solid var(--accent); padding: 0 12px; border-radius: 4px; } |
| - #pelapsed { margin-inline-start: auto; color: var(--ink); font-size: 34px; padding: 4px 12px; border-radius: 4px; } |
| - #pclock { color: var(--muted); } |
| - #pmore { align-self: center; inline-size: 40px; block-size: 40px; border-radius: 8px; color: var(--muted); font-size: 26px; line-height: 1; } |
| - #pmore:hover, #pmore[aria-expanded="true"] { background: var(--panel); color: var(--ink); } |
| - #pmenu { position: absolute; z-index: 3; inset-block-start: 52px; inset-inline-end: 0; min-inline-size: 260px; padding: 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); display: grid; gap: 2px; font: 18px/1.5 system-ui, sans-serif; } |
| - #pmenu button { padding: 10px 14px; border-radius: 6px; text-align: start; color: var(--ink-2); } |
| - #pmenu button:hover { background: #1b1b24; color: var(--ink); } |
| + svg { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; } |
| + |
| + #presenter { min-block-size: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 24px 32px; padding: 16px 28px 24px; } |
| + |
| + /* ---- header ---- */ |
| + #phead { grid-column: 1 / 3; display: flex; align-items: center; gap: 16px; padding-block-end: 16px; border-block-end: 1px solid var(--border); position: relative; font-family: var(--mono); font-variant-numeric: tabular-nums; } |
| + #ppos { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 8px; font-size: 24px; line-height: 1.2; color: var(--ink); transition: background-color 0.2s var(--ease); } |
| + #ppos:hover, #ppos[aria-expanded="true"] { background: var(--raised); } |
| + #ppos small { font-size: 24px; color: var(--faint); } |
| + #ppos svg { color: var(--faint); } |
| + #pmode { padding: 4px 12px; border-radius: 999px; background: var(--raised); color: var(--ink-2); font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; } |
| + #pblack { padding: 4px 12px; border-radius: 4px; border: 1px solid var(--accent); color: var(--accent); font-size: 16px; letter-spacing: 0.14em; } |
| + #pelapsed { margin-inline-start: auto; padding: 4px 14px; border-radius: 8px; font-size: 40px; line-height: 1.1; color: var(--ink); transition: background-color 0.2s var(--ease); } |
| + #pelapsed:hover { background: var(--raised); } |
| + #pclock { font-size: 22px; color: var(--muted); } |
| + .iconbtn { inline-size: 40px; block-size: 40px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); transition: background-color 0.2s var(--ease), color 0.2s var(--ease); } |
| + .iconbtn:hover, .iconbtn[aria-expanded="true"], .iconbtn[aria-pressed="true"] { background: var(--raised); color: var(--ink); } |
| + .iconbtn[aria-pressed="true"] { color: var(--accent); } |
| + .pop { position: absolute; z-index: 4; inset-block-start: calc(100% + 8px); border-radius: 12px; background: var(--panel); border: 1px solid var(--border); box-shadow: 0 12px 16px rgb(0 0 0 / 0.5); font-family: system-ui, sans-serif; } |
| + #pmenu { inset-inline-end: 0; min-inline-size: 280px; padding: 8px; display: grid; gap: 2px; font-size: 17px; } |
| + #pmenu button { padding: 10px 14px; border-radius: 8px; text-align: start; color: var(--ink-2); } |
| + #pmenu button:hover { background: var(--raised); color: var(--ink); } |
| #pmenu hr { inline-size: 100%; border: 0; border-block-start: 1px solid var(--border); margin: 4px 0; } |
| - #pleft { min-inline-size: 0; display: flex; flex-direction: column; gap: 12px; } |
| - .pframe { inline-size: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper); color: var(--paper-ink); border: 1px solid var(--border); flex: none; display: grid; align-content: center; gap: 6%; padding: 6% 8%; } |
| + |
| + /* ---- jump to any slide ---- */ |
| + #pjump { inset-inline-start: 0; inline-size: min(calc(100vw - 56px), 880px); padding: 16px; display: grid; gap: 12px; } |
| + #jfield { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); } |
| + #jq { flex: 1; min-inline-size: 0; background: none; border: 0; font-size: 18px; color: var(--ink); } |
| + #jq::placeholder { color: var(--muted); } |
| + #jq:focus { outline: none; } |
| + #jfield:focus-within { border-color: var(--accent); } |
| + #jcount { font: 14px/1.5 var(--mono); color: var(--muted); } |
| + #jgrid { max-block-size: min(58vh, 520px); overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px 10px; padding: 2px; } |
| + .jt { display: grid; gap: 6px; inline-size: 100%; min-inline-size: 0; padding: 6px; border-radius: 8px; text-align: start; color: var(--muted); font-size: 14px; line-height: 1.35; } |
| + .jt > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } |
| + .jt:hover { background: var(--raised); color: var(--ink); } |
| + .jt b { font: 600 14px/1.35 var(--mono); color: var(--ink-2); margin-inline-end: 6px; } |
| + .jt .pic { inline-size: 100%; aspect-ratio: 16 / 9; border-radius: 3px; background: var(--paper); display: grid; align-content: center; justify-items: center; gap: 3px; padding: 8px; } |
| + .jt .pic i { display: block; block-size: 3px; border-radius: 2px; background: #c9c2b4; inline-size: 56%; } |
| + .jt .pic i:first-child { block-size: 5px; inline-size: 68%; background: #5b5347; } |
| + .jt[aria-current="true"] { background: var(--raised); color: var(--ink); } |
| + .jt[aria-current="true"] .pic { outline: 2px solid var(--accent); outline-offset: 2px; } |
| + .jt.full .pic { background: #d9d3c6; } |
| + .jt.parked .pic { background: #2a2a33; } |
| + .jt.parked .pic i { background: #4a4a57; } |
| + .jt em { font-style: normal; color: var(--faint); } |
| + |
| + /* ---- left: now and next ---- */ |
| + #pleft { min-inline-size: 0; display: flex; flex-direction: column; gap: 14px; } |
| + .pframe { inline-size: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper); color: var(--paper-ink); border-radius: 4px; box-shadow: 0 8px 16px rgb(0 0 0 / 0.45); flex: none; display: grid; align-content: center; gap: 6%; padding: 6% 8%; } |
| .pframe.blacked { background: #000; } |
| .pframe.blacked > * { visibility: hidden; } |
| - #pnext { inline-size: 50%; } |
| - .pframe h2 { margin: 0; font: 700 2.4em/1.2 Georgia, serif; } |
| + .pframe h2 { margin: 0; font: 700 2.4em/1.2 Georgia, serif; text-wrap: balance; } |
| .pframe ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 0.5em; font-size: 1.25em; line-height: 1.4; } |
| + .pframe li { transition: opacity 0.35s var(--ease); } |
| + .pframe li.off { opacity: 0; } |
| #pcur { font-size: clamp(11px, 1.35vw, 22px); } |
| - #pnext { font-size: clamp(7px, 0.68vw, 12px); } |
| - .pframe li.off { visibility: hidden; } |
| - .pframe.end { background: var(--bg); color: var(--muted); justify-items: center; font-family: var(--mono); } |
| - #pnext-label { font-family: var(--mono); font-size: 22px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); } |
| - #pnotes { min-inline-size: 0; overflow: hidden; font-size: 32px; line-height: 1.45; color: var(--ink-2); white-space: pre-line; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 24px 28px; } |
| - #hint { grid-column: 1 / 3; color: var(--muted); font-size: 16px; } |
| - #psteps { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 20px; color: var(--muted); } |
| - #psteps i { inline-size: 14px; block-size: 14px; border-radius: 50%; border: 2px solid var(--muted); } |
| - #psteps i.done { background: var(--accent); border-color: var(--accent); } |
| - #pright { min-inline-size: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; } |
| - #ptools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; font: 16px/1.5 system-ui, sans-serif; } |
| - #ptools button { min-block-size: 36px; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border); color: var(--ink-2); } |
| - #ptools button[aria-pressed="true"] { background: var(--panel); color: var(--ink); border-color: var(--muted); } |
| - #pnotes.scroll { overflow: auto; } |
| - #pgrid { position: absolute; z-index: 3; inset-block-start: 52px; inset-inline-start: 0; inline-size: min(92vw, 560px); padding: 16px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; font: 16px/1.5 system-ui, sans-serif; } |
| - #pgrid button { display: grid; gap: 6px; padding: 8px; border-radius: 6px; color: var(--ink-2); text-align: start; } |
| - #pgrid button:hover, #pgrid button[aria-current="true"] { background: #1b1b24; color: var(--ink); } |
| - #pgrid span { display: block; aspect-ratio: 16 / 9; background: var(--paper); border-radius: 2px; } |
| - #pgrid button.parkedslide span { background: #3a3a44; } |
| - .arranging .pframe, .arranging #pnotes { outline: 2px dashed var(--accent); outline-offset: 4px; resize: both; overflow: auto; cursor: move; } |
| - #parrange { grid-column: 1 / 3; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 8px; color: var(--ink-2); font-size: 18px; } |
| - #parrange button { min-block-size: 36px; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--border); color: var(--ink); } |
| - @media (max-width: 800px) { #presenter { grid-template-columns: 1fr; } #phead, #hint, #parrange { grid-column: 1; flex-wrap: wrap; gap: 8px 20px; } } |
| + #pnext { inline-size: 50%; font-size: clamp(7px, 0.68vw, 12px); opacity: 0.92; } |
| + #psteps { display: flex; align-items: center; gap: 14px; } |
| + #ptrack { flex: 1; display: flex; gap: 6px; max-inline-size: 320px; } |
| + #ptrack i { flex: 1; block-size: 6px; border-radius: 3px; background: #2c2c36; overflow: hidden; position: relative; } |
| + #ptrack i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.45s var(--ease); } |
| + #ptrack i.done::after { transform: scaleX(1); } |
| + #pstepstext { font: 16px/1.5 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; } |
| + #pstepstext b { color: var(--ink); font-weight: 600; } |
| + #pnext-label { display: flex; align-items: center; gap: 8px; margin-block-start: 6px; font: 16px/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); } |
| + |
| + /* ---- right: notes ---- */ |
| + #pright { min-inline-size: 0; display: grid; grid-template-rows: minmax(0, 1fr); position: relative; } |
| + #pnotes { min-inline-size: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 60px 32px 28px; font-size: 32px; line-height: 1.45; color: var(--ink-2); } |
| + #pnotes.scroll { overflow-y: auto; } |
| + #pnotes p { margin: 0; max-inline-size: 30em; transition: color 0.3s var(--ease); } |
| + #pnotes section { padding-block: 0.35em; } |
| + #pnotes section + section { border-block-start: 1px solid var(--border); margin-block-start: 0.5em; padding-block-start: 0.6em; } |
| + #pnotes section.past p, #pnotes section.later p { color: var(--faint); } |
| + #pnotes section.now p { color: var(--ink); } |
| + #ptools { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: rgb(24 24 32 / 0.92); border: 1px solid var(--border); opacity: 0.55; transition: opacity 0.2s var(--ease); } |
| + #pright:hover #ptools, #ptools:focus-within { opacity: 1; } |
| + #ptools .iconbtn { inline-size: 36px; block-size: 36px; } |
| + #ptools hr { inline-size: 1px; block-size: 20px; align-self: center; border: 0; background: var(--border); margin: 0 4px; } |
| + |
| + /* ---- arranging ---- */ |
| + .arranging .pframe, .arranging #pnotes { outline: 2px dashed var(--accent); outline-offset: 6px; resize: both; overflow: auto; cursor: move; } |
| + #parrange { grid-column: 1 / 3; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 10px; background: var(--raised); color: var(--ink-2); font-size: 17px; } |
| + #parrange span { margin-inline-end: auto; } |
| + #parrange button { min-block-size: 36px; padding: 6px 16px; border-radius: 8px; border: 1px solid var(--border); color: var(--ink); } |
| + #parrange button:hover { background: var(--panel); } |
| + #hint { grid-column: 1 / 3; color: var(--muted); font-size: 15px; max-inline-size: 110ch; } |
| + @media (max-width: 820px) { #presenter { grid-template-columns: 1fr; } #phead, #hint, #parrange { grid-column: 1; flex-wrap: wrap; } #pelapsed { font-size: 32px; } } |
| + @media (prefers-reduced-motion: reduce) { * { transition: none !important; } } |
| </style> |
| </head> |
| <body> |
| <div id="presenter"> |
| <div id="phead"> |
| - <button type="button" id="ppos" title="Click, or type a number and Enter, to go to a slide">2 / 4 · core</button> |
| - <div id="pgrid" hidden> |
| - <button type="button"><span></span>1 · Welcome</button> |
| - <button type="button" aria-current="true"><span></span>2 · Three reasons</button> |
| - <button type="button" class="parkedslide"><span></span>Parked · The old opening</button> |
| - <button type="button"><span></span>3 · A longer story (full)</button> |
| - <button type="button"><span></span>4 · Links</button> |
| - </div> |
| + <button type="button" id="ppos" aria-expanded="false" aria-controls="pjump" title="Go to a slide"><span id="pposn">31</span><small>/ 105</small><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></button> |
| + <span id="pmode">core</span> |
| <span id="pblack" hidden>BLACK</span> |
| <button type="button" id="pelapsed" title="Click to reset">12:41</button> |
| <span id="pclock">14:32</span> |
| - <button type="button" id="pmore" aria-expanded="false" aria-controls="pmenu" title="More">⋯</button> |
| - <div id="pmenu" hidden> |
| + <button type="button" class="iconbtn" id="pmore" aria-expanded="false" aria-controls="pmenu" aria-label="More"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/></svg></button> |
| + |
| + <div class="pop" id="pjump" hidden> |
| + <label id="jfield"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg> |
| + <input id="jq" type="text" autocomplete="off" placeholder="A slide number, or words from its title" aria-label="Go to a slide"> |
| + <span id="jcount">105 slides</span></label> |
| + <div id="jgrid"></div> |
| + </div> |
| + |
| + <div class="pop" id="pmenu" hidden> |
| <button type="button">Pair a phone as a remote…</button> |
| <button type="button">Open the slide window</button> |
| <button type="button">Switch to full</button> |
| @@ -84,75 +140,109 @@ |
| <button type="button">End presenting</button> |
| </div> |
| </div> |
| - <div id="parrange" hidden>Arranging: drag a panel to move it, drag its corner to resize it. <button type="button" id="areset">Reset to the default</button><button type="button" id="adone">Done</button></div> |
| + |
| + <div id="parrange" hidden><span>Drag a panel to move it; drag its corner to resize it.</span><button type="button" id="areset">Reset to the default</button><button type="button" id="adone">Done</button></div> |
| + |
| <div id="pleft"> |
| <div class="pframe" id="pcur"><h2 id="curh">Three reasons it worked</h2> |
| <ul id="curl"><li>The deck was data, so it could change overnight</li><li>Every slide was rehearsed where it was written</li><li>Nothing needed the network</li></ul></div> |
| - <div id="psteps" aria-label="Presses on this slide"><i></i><i></i><i></i><span id="pstepstext">press 1 of 3</span></div> |
| - <div id="pnext-label">Next step</div> |
| + <div id="psteps"><div id="ptrack" aria-hidden="true"><i></i><i></i><i></i></div><span id="pstepstext" role="status"></span></div> |
| + <div id="pnext-label"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12h14"/><path d="m13 6 6 6-6 6"/></svg><span id="pnexttext">Next step</span></div> |
| <div class="pframe" id="pnext"><h2 id="nxth">Three reasons it worked</h2> |
| <ul id="nxtl"><li>The deck was data, so it could change overnight</li><li>Every slide was rehearsed where it was written</li><li>Nothing needed the network</li></ul></div> |
| </div> |
| - <div id="pright"><div id="ptools"><button type="button" id="nfit" aria-pressed="true">Fit</button><button type="button" id="nscroll" aria-pressed="false">Scroll</button><button type="button" id="nsmaller" aria-label="Smaller notes">A−</button><button type="button" id="nlarger" aria-label="Larger notes">A+</button></div> |
| - <div id="pnotes">Three reasons. Take them slowly, one press each. |
| - |
| -(Press.) |
| - |
| -First: the deck was data. A string changed at midnight was on the slide by breakfast. |
| |
| -(Press.) |
| - |
| -Second: every slide was rehearsed where it was written. |
| - |
| -(Press.) |
| + <div id="pright"> |
| + <div id="pnotes"> |
| + <section><p>Three reasons. Take them slowly, one press each.</p></section> |
| + <section><p>First: the deck was data. A string changed at midnight was on the slide by breakfast.</p></section> |
| + <section><p>Second: every slide was rehearsed where it was written.</p></section> |
| + <section><p>Third: nothing needed the network. Both windows stayed together on the laptop with the Wi-Fi off, which is the only reason the talk survived the venue.</p></section> |
| + </div> |
| + <div id="ptools" role="toolbar" aria-label="Notes"> |
| + <button type="button" class="iconbtn" id="nfit" aria-pressed="true" aria-label="Fit the notes to the panel" title="Fit the notes to the panel"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 9h5V4"/><path d="M20 9h-5V4"/><path d="M4 15h5v5"/><path d="M20 15h-5v5"/></svg></button> |
| + <button type="button" class="iconbtn" id="nscroll" aria-pressed="false" aria-label="Scroll the notes" title="Scroll the notes"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4v16"/><path d="m8 8 4-4 4 4"/><path d="m8 16 4 4 4-4"/></svg></button> |
| + <hr> |
| + <button type="button" class="iconbtn" id="nsmaller" aria-label="Smaller notes" title="Smaller notes"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m4 18 4.5-11L13 18"/><path d="M5.6 14h5.8"/><path d="M16 12h5"/></svg></button> |
| + <button type="button" class="iconbtn" id="nlarger" aria-label="Larger notes" title="Larger notes"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m4 18 4.5-11L13 18"/><path d="M5.6 14h5.8"/><path d="M16 12h5"/><path d="M18.5 9.5v5"/></svg></button> |
| + </div> |
| + </div> |
| |
| -Third: nothing needed the network. Both windows stayed together on the laptop with the Wi-Fi off, which is the only reason the talk survived the venue.</div></div> |
| - <div id="hint">Mockup: → or Space steps forward, ← back, B blacks the screen. Click the position for the slide grid. Fit, Scroll, A− and A+ work. Arrange is in the ⋯ menu.</div> |
| + <p id="hint">Mockup. Arrow keys or Space step; B blacks the screen. Click 31 / 105 for the slide picker, then type "42" or "links". The four notes buttons work. Arrange is in the menu at the end of the header.</p> |
| </div> |
| + |
| <script> |
| const $ = id => document.getElementById(id); |
| let step = 1, black = false; |
| - const cur = [...$('curl').children], nxt = [...$('nxtl').children]; |
| + const cur = [...$('curl').children], nxt = [...$('nxtl').children], secs = [...document.querySelectorAll('#pnotes section')], track = [...$('ptrack').children]; |
| function paint() { |
| cur.forEach((li, i) => li.classList.toggle('off', i >= step)); |
| const last = step >= 3; |
| - $('pnext-label').textContent = last ? 'Next' : 'Next step'; |
| + $('pnexttext').textContent = last ? 'Next slide' : 'Next step'; |
| $('nxth').textContent = last ? 'Links' : 'Three reasons it worked'; |
| $('nxtl').hidden = last; |
| nxt.forEach((li, i) => li.classList.toggle('off', i > step)); |
| - [...$('psteps').querySelectorAll('i')].forEach((d, i) => d.classList.toggle('done', i < step)); |
| - $('pstepstext').textContent = step === 0 ? 'before the first press' : 'press ' + step + ' of 3'; |
| + track.forEach((d, i) => d.classList.toggle('done', i < step)); |
| + $('pstepstext').innerHTML = step === 0 ? 'before the first press' : '<b>' + step + '</b> of 3 presses'; |
| + secs.forEach((s, i) => { s.classList.toggle('past', i < step); s.classList.toggle('now', i === step); s.classList.toggle('later', i > step); }); |
| $('pcur').classList.toggle('blacked', black); |
| $('pblack').hidden = !black; |
| + fit(); |
| } |
| - addEventListener('keydown', e => { |
| - if (e.key === 'ArrowRight' || e.key === ' ') { step = Math.min(3, step + 1); black = false; e.preventDefault(); } |
| - else if (e.key === 'ArrowLeft') { step = Math.max(0, step - 1); black = false; } |
| - else if (e.key === 'b' || e.key === 'B' || e.key === '.') { black = !black; } |
| - else return; |
| - paint(); |
| - }); |
| - $('pmore').addEventListener('click', e => { e.stopPropagation(); const on = $('pmenu').hidden; $('pmenu').hidden = !on; $('pmore').setAttribute('aria-expanded', String(on)); }); |
| - addEventListener('click', () => { $('pmenu').hidden = true; $('pmore').setAttribute('aria-expanded', 'false'); $('pgrid').hidden = true; }); |
| - $('ppos').addEventListener('click', e => { e.stopPropagation(); $('pgrid').hidden = !$('pgrid').hidden; }); |
| + // ---- notes: fit or scroll, and a size |
| let size = 32, mode = 'fit'; |
| - function notes() { |
| + function fit() { |
| const n = $('pnotes'); n.classList.toggle('scroll', mode === 'scroll'); |
| $('nfit').setAttribute('aria-pressed', String(mode === 'fit')); $('nscroll').setAttribute('aria-pressed', String(mode === 'scroll')); |
| let px = size; n.style.fontSize = px + 'px'; |
| if (mode === 'fit') while (n.scrollHeight > n.clientHeight && px > 16) { px -= 1; n.style.fontSize = px + 'px'; } |
| + if (mode === 'scroll') { const now = n.querySelector('.now'); if (now) now.scrollIntoView({ block: 'nearest' }); } |
| + } |
| + const stop = f => e => { e.stopPropagation(); f(); }; |
| + $('nfit').addEventListener('click', stop(() => { mode = 'fit'; fit(); })); |
| + $('nscroll').addEventListener('click', stop(() => { mode = 'scroll'; fit(); })); |
| + $('nsmaller').addEventListener('click', stop(() => { size = Math.max(16, size - 4); mode = 'scroll'; fit(); })); |
| + $('nlarger').addEventListener('click', stop(() => { size = Math.min(60, size + 4); mode = 'scroll'; fit(); })); |
| + // ---- jump: 105 slides, some full only, some parked |
| + const words = ['Welcome', 'Who I am', 'The plan', 'Rails, once', 'Then came AI', 'A cookie wall', 'What we built', 'Eleven', 'Fast, really fast', 'Sizes compared', 'Native apps', 'The suite', 'Docs', 'Slides', 'Sheets', 'The framework', 'Rules for builders', 'Deploy flow', 'One command', 'What broke', 'What held', 'Agents at work', 'Reviews', 'The spec', 'No excuses', 'Links']; |
| + const slides = Array.from({ length: 105 }, (_, i) => ({ n: i + 1, title: i === 30 ? 'Three reasons it worked' : words[i % words.length] + (i >= words.length ? ' ' + (Math.floor(i / words.length) + 1) : ''), kind: i % 17 === 9 ? 'full' : (i % 23 === 14 ? 'parked' : '') })); |
| + function draw(q) { |
| + const g = $('jgrid'); g.textContent = ''; |
| + const t = q.trim().toLowerCase(); |
| + const hit = slides.filter(s => !t || String(s.n).startsWith(t) || s.title.toLowerCase().includes(t)); |
| + $('jcount').textContent = t ? hit.length + ' of 105' : '105 slides'; |
| + for (const s of hit) { |
| + const b = document.createElement('button'); b.type = 'button'; b.className = 'jt ' + s.kind; if (s.n === 31) b.setAttribute('aria-current', 'true'); |
| + b.title = s.n + ' · ' + s.title; b.innerHTML = '<span class="pic"><i></i><i></i></span><span><b>' + s.n + '</b>' + s.title + (s.kind ? ' <em>· ' + (s.kind === 'full' ? 'full only' : 'parked') + '</em>' : '') + '</span>'; |
| + b.addEventListener('click', e => { e.stopPropagation(); $('pposn').textContent = s.n; jump(false); }); |
| + g.append(b); |
| + } |
| + const here = g.querySelector('[aria-current]'); if (here) here.scrollIntoView({ block: 'center' }); |
| } |
| - $('nfit').addEventListener('click', e => { e.stopPropagation(); mode = 'fit'; notes(); }); |
| - $('nscroll').addEventListener('click', e => { e.stopPropagation(); mode = 'scroll'; notes(); }); |
| - $('nsmaller').addEventListener('click', e => { e.stopPropagation(); size = Math.max(16, size - 4); mode = 'scroll'; notes(); }); |
| - $('nlarger').addEventListener('click', e => { e.stopPropagation(); size = Math.min(56, size + 4); mode = 'scroll'; notes(); }); |
| + function jump(on) { $('pjump').hidden = !on; $('ppos').setAttribute('aria-expanded', String(on)); if (on) { $('jq').value = ''; draw(''); $('jq').focus(); } } |
| + $('ppos').addEventListener('click', stop(() => jump($('pjump').hidden))); |
| + $('pjump').addEventListener('click', e => e.stopPropagation()); |
| + $('jq').addEventListener('input', () => draw($('jq').value)); |
| + $('jq').addEventListener('keydown', e => { e.stopPropagation(); if (e.key === 'Enter') { const f = $('jgrid').querySelector('.jt'); if (f) f.click(); } if (e.key === 'Escape') jump(false); }); |
| + // ---- menu and arranging |
| + $('pmore').addEventListener('click', stop(() => { const on = $('pmenu').hidden; $('pmenu').hidden = !on; $('pmore').setAttribute('aria-expanded', String(on)); })); |
| + addEventListener('click', () => { $('pmenu').hidden = true; $('pmore').setAttribute('aria-expanded', 'false'); jump(false); }); |
| function arrange(on) { $('presenter').classList.toggle('arranging', on); $('parrange').hidden = !on; } |
| $('marrange').addEventListener('click', () => arrange(true)); |
| - $('adone').addEventListener('click', e => { e.stopPropagation(); arrange(false); }); |
| - $('areset').addEventListener('click', e => { e.stopPropagation(); document.querySelectorAll('.pframe, #pnotes').forEach(el => { el.style.width = ''; el.style.height = ''; }); }); |
| - addEventListener('resize', notes); notes(); |
| + $('adone').addEventListener('click', stop(() => arrange(false))); |
| + $('areset').addEventListener('click', stop(() => document.querySelectorAll('.pframe, #pnotes').forEach(el => { el.style.width = ''; el.style.height = ''; }))); |
| + // ---- keys |
| + addEventListener('keydown', e => { |
| + if (e.key === 'ArrowRight' || e.key === ' ') { step = Math.min(3, step + 1); black = false; e.preventDefault(); } |
| + else if (e.key === 'ArrowLeft') { step = Math.max(0, step - 1); black = false; } |
| + else if (e.key === 'b' || e.key === 'B' || e.key === '.') { black = !black; } |
| + else return; |
| + paint(); |
| + }); |
| $('pleft').addEventListener('click', () => { if ($('presenter').classList.contains('arranging')) return; step = Math.min(3, step + 1); black = false; paint(); }); |
| + addEventListener('resize', fit); |
| paint(); |
| + if (location.hash === '#jump') jump(true); |
| </script> |
| </body> |
| </html> |