diff --git a/site/index.html b/site/index.html index 73ee096..c75eaf6 100644 --- a/site/index.html +++ b/site/index.html @@ -23,9 +23,9 @@ - + - + @@ -77,12 +77,8 @@
- +
-
-

Store screenshots, every size, every language

-

One command rendered 200 store-ready images: 6 device sizes plus the Play feature graphic, 4 languages, an A/B variant. Then checked them against both stores' specs: 0 errors.

-

$ storebound shots render --variants

diff --git a/site/main.js b/site/main.js index ac9665f..3a771b4 100644 --- a/site/main.js +++ b/site/main.js @@ -58,44 +58,33 @@ } const reduce = matchMedia('(prefers-reduced-motion: reduce)'); - // Hero demo: four scenes of real CLI output, each under a plain-language headline. Auto-cycles while the hero is on - // screen and the page is visible, pauses on hover; a picked tab stops the cycle. Every scene holds its final frame - // for HOLD_MS. Reduced motion: no animation, the tabs show each final frame. - // Steps: [data-s] elements appear in order (data-o overrides document order); data-s="type" types a command, - // a number is the pause after it in ms. data-flip="id ..." marks checklist rows fixed, data-pill sets the pill. + // Hero demo: four scenes of real CLI output. Auto-cycles while the hero is on screen and the page is visible, + // pauses on hover; a picked tab stops the cycle. Reduced motion: no animation, the tabs show each final frame. const demo = document.querySelector('[data-demo]'); if (demo) { const tabs = [...demo.querySelectorAll('[role="tab"]')]; const panels = tabs.map(t => document.getElementById(t.getAttribute('aria-controls'))); const cwd = demo.querySelector('[data-cwd]'); - const HOLD_MS = 3400, START_MS = 250, CHAR_MS = 30, AFTER_TYPE_MS = 220; + const SCENE_MS = [5200, 5600, 5800, 4800]; const motion = !reduce.matches; let cur = 0, auto = motion, visible = false, hovered = false, run = 0; const shown = () => visible && !document.hidden; const live = () => shown() && !hovered; const sync = () => demo.classList.toggle('is-held', !live()); const STOP = {}; - // a wait that only counts down while the demo is on screen (and, while cycling, not hovered); throws when a newer run started - const wait = (ms, token) => new Promise((done, fail) => { + // a wait that only counts down while the demo is on screen (hold: and not hovered); throws when a newer run started + const wait = (ms, token, hold) => new Promise((done, fail) => { let left = ms; const tick = () => { const step = Math.min(left, 40); setTimeout(() => { if (token !== run) return fail(STOP); - if (auto ? live() : shown()) left -= step; + if (hold ? live() : shown()) left -= step; if (left <= 0) done(); else tick(); }, step); }; if (token !== run) fail(STOP); else if (ms <= 0) done(); else tick(); }); - const steps = p => { - const els = [...p.querySelectorAll('[data-s]')]; - return els.map((el, i) => ({ el, i, o: el.dataset.o ? Number(el.dataset.o) : i })).sort((a, b) => a.o - b.o || a.i - b.i).map(x => x.el); - }; - const stepMs = el => el.dataset.s === 'type' - ? el.querySelector('span').textContent.length * CHAR_MS + AFTER_TYPE_MS - : el.dataset.s === '' ? 22 : Number(el.dataset.s); - const sceneMs = panels.map(p => START_MS + steps(p).reduce((n, el) => n + stepMs(el), 0) + HOLD_MS); const countUp = el => { const to = Number(el.dataset.count), t0 = performance.now(), dur = 700; const f = now => { @@ -114,37 +103,39 @@ panels[k].hidden = !on; }); cwd.textContent = panels[i].dataset.cwd; - demo.style.setProperty('--sc-ms', sceneMs[i] + 'ms'); + demo.style.setProperty('--sc-ms', SCENE_MS[i] + 'ms'); if (focus) tabs[i].focus(); }; - // plays one scene from empty to its final frame + // plays one scene from empty to its final frame; returns how long it took (live time) const play = async (i, token) => { const p = panels[i]; - const items = steps(p); + const items = [...p.querySelectorAll('[data-s]')]; for (const el of items) el.classList.remove('on', 'typing'); - for (const el of p.querySelectorAll('.fixed')) el.classList.remove('fixed'); for (const c of p.querySelectorAll('[data-count]')) c.textContent = '0'; delete p.dataset.pill; p.classList.add('is-anim'); demo.classList.add('is-ready'); - await wait(START_MS, token); + let spent = 200; + await wait(200, token); for (const el of items) { - if (el.dataset.s === 'type') { + const s = el.dataset.s; + if (s === 'type') { const n = el.querySelector('span').textContent.length; el.style.setProperty('--n', '0'); el.classList.add('typing', 'on'); - for (let k = 1; k <= n; k++) { el.style.setProperty('--n', String(k)); await wait(CHAR_MS, token); } - await wait(AFTER_TYPE_MS, token); + for (let k = 1; k <= n; k++) { el.style.setProperty('--n', String(k)); const ms = 12 + Math.random() * 14; spent += ms; await wait(ms, token); } + spent += 180; await wait(180, token); el.classList.remove('typing'); } else { el.classList.add('on'); if (el.dataset.pill) p.dataset.pill = el.dataset.pill; - for (const id of (el.dataset.flip ?? '').split(' ').filter(Boolean)) document.getElementById(id)?.classList.add('fixed'); const c = el.matches('[data-count]') ? el : el.querySelector('[data-count]'); if (c) countUp(c); - await wait(stepMs(el), token); + const ms = s === '' ? 22 : Number(s); + spent += ms; await wait(ms, token); } } + return spent; }; const restartBar = () => { demo.classList.remove('is-auto'); void demo.offsetWidth; if (auto) demo.classList.add('is-auto'); }; const cycle = async () => { @@ -153,8 +144,8 @@ for (;;) { select(cur, false); restartBar(); - await play(cur, token); - await wait(HOLD_MS, token); + const spent = await play(cur, token); + await wait(SCENE_MS[cur] - spent, token, true); cur = (cur + 1) % tabs.length; } } catch (e) { if (e !== STOP) throw e; } diff --git a/site/style.css b/site/style.css index b39d423..57dff57 100644 --- a/site/style.css +++ b/site/style.css @@ -285,9 +285,8 @@ h1 .hl { color: var(--accent); } .install-note { margin-top: 10px; font-size: 13.5px; color: var(--muted); } .install-note a { color: inherit; } -/* hero demo: four real CLI scenes in a dark window (same in both themes). Each scene opens with a plain-language - headline and outcome, then the proof. Without JS (or with reduced motion) every scene shows its final frame; - main.js adds .is-anim to play them and cycles the tabs while the hero is on screen. */ +/* hero demo: four real CLI scenes in a dark window (same in both themes). Without JS every scene shows its final + frame; main.js adds .is-anim to play them and cycles the tabs while the hero is on screen. */ .demo { margin: 0; min-width: 0; position: relative; } .demo::before { content: ""; position: absolute; inset: 8% -4% -6% 6%; z-index: -1; border-radius: 40px; background: color-mix(in srgb, var(--accent) 28%, transparent); filter: blur(60px); opacity: .55; } .demo-win { background: #0b1222; color: #e2e8f0; border: 1px solid rgb(148 163 184 / .18); border-radius: 14px; overflow: hidden; @@ -304,59 +303,45 @@ h1 .hl { color: var(--accent); } padding: 11px 10px 12px; cursor: pointer; border-radius: 8px 8px 0 0; white-space: nowrap; transition: color .15s ease, background-color .15s ease; } .sc-tabs button:hover { color: #e2e8f0; } .sc-tabs button[aria-selected="true"] { color: #fff; background: rgb(255 255 255 / .05); } -/* progress: the selected tab's underline fills over the scene's time (play + hold) */ -.sc-tabs button::before { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: rgb(129 140 248 / .22); opacity: 0; } .sc-tabs button::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: #818cf8; transform: scaleX(0); transform-origin: left; } .sc-tabs button[aria-selected="true"]::after { transform: none; } -.demo.is-auto .sc-tabs button::before { opacity: 1; } .sc-tabs button:focus-visible { outline: 2px solid #a5b4fc; outline-offset: -3px; } .demo.is-auto .sc-tabs button[aria-selected="true"]::after { animation: sc-bar var(--sc-ms, 6s) linear forwards; } .demo.is-auto.is-held .sc-tabs button[aria-selected="true"]::after { animation-play-state: paused; } @keyframes sc-bar { from { transform: scaleX(0); } to { transform: none; } } -.sc-stage { position: relative; height: 548px; } -.sc { position: absolute; inset: 0; padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 0; overflow: hidden; +.sc-stage { position: relative; height: 404px; } +.sc { position: absolute; inset: 0; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 0; overflow: hidden; font: 12px/1.65 var(--mono); color: #cbd5e1; outline: none; } .sc[hidden] { display: none; } -.sc > * { flex-shrink: 0; } .sc:focus-visible { box-shadow: inset 0 0 0 2px #a5b4fc; } .sc p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sc .t-wrap { white-space: normal; overflow-wrap: anywhere; } - -/* the plain-language part: what storebound just did for you */ -.sc-head { flex: none; margin: -14px -16px 12px; padding: 13px 16px 12px; background: linear-gradient(rgb(129 140 248 / .10), rgb(129 140 248 / .04)); border-bottom: 1px solid rgb(129 140 248 / .18); } -.sc .sc-head p { white-space: normal; overflow: visible; } -.sc-h { font: 700 16.5px/1.3 var(--font); letter-spacing: -.012em; color: #fff; text-wrap: balance; } -.sc-out { margin-top: 5px; font: 13.5px/1.5 var(--font); color: #aab6ca; text-wrap: pretty; } -.sc-out b { color: #fff; font-weight: 650; } -.sc-hand { margin-top: auto; padding-top: 10px; font: 12.5px/1.45 var(--font); color: #8391a7; white-space: normal !important; } -.sc-hand span { display: inline-block; font: 700 10.5px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: #cbd5e1; background: rgb(148 163 184 / .14); padding: 4px 7px; border-radius: 5px; margin-right: 7px; vertical-align: 1px; } - .t-cmd { color: #f8fafc; margin-top: 8px; } -.t-cmd:first-child, .sc-head + .t-cmd { margin-top: 0; } +.t-cmd:first-child, .sc-pill + .t-cmd { margin-top: 0; } .t-cmd i { font-style: normal; color: #818cf8; } .t-cmd span { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; } .t-out, .t-ok, .t-bad, .t-err, .t-note { padding-left: 2ch; } .t-out { color: #94a3b8; } .sc b { font-weight: 400; color: #64748b; } -.sc .sc-out b { font-weight: 650; color: #fff; } .t-ok { color: #86efac; } .t-ok b { color: #4ade80; } .t-strong { font-weight: 700; } .t-bad { color: #fca5a5; } .t-err { color: #f87171; font-weight: 600; } -.t-note { color: #7c8aa3; font-style: italic; } -.sc-foot { margin-top: 10px; font: 13px/1.4 var(--font); color: #94a3b8; white-space: normal !important; } +.t-note { color: #64748b; font-style: italic; } +.sc-foot { margin-top: 10px; font: 13px/1.4 var(--font); color: #94a3b8; } .sc-foot .big { font-weight: 700; color: #fff; font-size: 15px; letter-spacing: -.01em; } .sc-foot .big span { font-variant-numeric: tabular-nums; color: #a5b4fc; } .sc-foot .sep { color: #475569; margin: 0 2px; } +.sc-foot code { background: rgb(148 163 184 / .14); color: #e2e8f0; padding: .05em .35em; border-radius: 4px; font-size: 12px; } /* streaming log: newest line at the bottom, older lines scroll off the top */ -.tick { display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; height: calc(2 * 1.65em); margin: 2px 0 10px; padding-left: 2ch; color: #64748b; flex: none; - -webkit-mask-image: linear-gradient(transparent, #000 60%); mask-image: linear-gradient(transparent, #000 60%); } +.tick { display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; height: calc(3 * 1.65em); margin: 2px 0 10px; padding-left: 2ch; color: #64748b; flex: none; + -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); } .tick p { flex: none; padding-left: 0; } .tick b { color: #475569; } -.tick-csv { height: calc(9 * 1.6em); font-size: 11px; line-height: 1.6; margin: 6px 0 4px; padding: 6px 10px; border-radius: 8px; background: rgb(148 163 184 / .06); -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); } +.tick-csv { height: calc(7 * 1.6em); font-size: 11px; line-height: 1.6; margin: 6px 0 4px; padding: 6px 10px; border-radius: 8px; background: rgb(148 163 184 / .06); -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); } .tick-csv p { color: #64748b; } .tick-csv em { font-style: normal; color: #4ade80; font-weight: 700; } .tick-csv .lbl { color: #94a3b8; } @@ -366,45 +351,23 @@ h1 .hl { color: var(--accent); } .tick-ic .kb { color: #64748b; } /* screenshots */ -.shot-grid { list-style: none; margin: 0; padding: 0; max-width: 480px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; } +.shot-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; } .shot-grid li { position: relative; aspect-ratio: 1320 / 2868; border-radius: 6px; overflow: hidden; background: #1e293b; box-shadow: 0 0 0 1px rgb(255 255 255 / .06); } .shot-grid img { width: 100%; height: 100%; object-fit: cover; } .shot-grid li span { position: absolute; left: 3px; bottom: 3px; font: 700 8.5px/1 var(--font); letter-spacing: .04em; color: #0f172a; background: rgb(255 255 255 / .88); padding: 2px 3px; border-radius: 3px; } -/* pre-flight: a checklist of what `storebound check` verified; the terminal strip above it shows the commands */ -.pf-strip { position: relative; flex: none; display: flex; align-items: flex-end; gap: 10px; padding: 7px 10px 6px; margin-bottom: 8px; border-radius: 8px; background: rgb(0 0 0 / .28); box-shadow: inset 0 0 0 1px rgb(148 163 184 / .1); } -.tick-pf { flex: 1; min-width: 0; margin: 0; padding-left: 0; height: calc(2 * 1.65em); } -.tick-pf .t-cmd { margin-top: 0; } -.tick-pf .t-out, .tick-pf .t-ok, .tick-pf .t-err, .tick-pf .t-note { padding-left: 2ch; } -.sc-pill { flex: none; font: 700 11px/1 var(--font); letter-spacing: .02em; overflow: visible; align-self: center; } -.sc-pill span { display: none; padding: 5px 9px; border-radius: 999px; white-space: nowrap; } +/* pre-flight */ +.sc-pill { position: absolute; top: 12px; right: 14px; font: 700 11px/1 var(--font); letter-spacing: .02em; overflow: visible; } +.sc-pill span { display: none; padding: 5px 9px; border-radius: 999px; } .sc.is-anim .sc-pill span { animation: pop .3s cubic-bezier(.2, .9, .3, 1.3); } .pill-bad { color: #fecaca; background: rgb(239 68 68 / .2); box-shadow: inset 0 0 0 1px rgb(239 68 68 / .45); } .pill-good { color: #bbf7d0; background: rgb(34 197 94 / .2); box-shadow: inset 0 0 0 1px rgb(34 197 94 / .5); } .sc:not(.is-anim) .pill-good, .sc[data-pill="bad"] .pill-bad, .sc[data-pill="good"] .pill-good { display: inline-block; } @keyframes pop { from { transform: scale(.6); opacity: 0; } } -.pf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font: 12.5px/1.3 var(--font); } -.pf-row { display: grid; grid-template-columns: 18px minmax(0, 16em) minmax(0, 1fr); align-items: center; gap: 2px 10px; padding: 3px 8px; border-radius: 7px; background: rgb(148 163 184 / .045); transition: background-color .3s ease; } -.pf-ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 800 11px/1 var(--font); color: #052e16; background: #4ade80; } -.pf-ic::before { content: "✓"; } -.pf-what { color: #e2e8f0; font-weight: 600; min-width: 0; } -.pf-what small { display: block; font: 400 10px/1.3 var(--mono); color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.pf-det { color: #b4c0d3; min-width: 0; } -.pf-det code { white-space: nowrap; font-size: 11px; background: rgb(148 163 184 / .16); color: #f1f5f9; padding: .05em .35em; border-radius: 4px; } -.pf-det em { display: inline-block; margin-left: 4px; font: 600 10px/1 var(--font); font-style: normal; letter-spacing: .02em; color: #fcd34d; background: rgb(251 191 36 / .12); box-shadow: inset 0 0 0 1px rgb(251 191 36 / .3); padding: 3px 6px; border-radius: 999px; vertical-align: 1px; white-space: nowrap; } -.d-bad { display: none; } -.pf-na .pf-ic { background: #334155; color: #94a3b8; } -.pf-na .pf-ic::before { content: "–"; } -.pf-na .pf-what, .pf-na .pf-det { color: #64748b; } -/* while playing, a [data-bad] row shows the problem and its fix until the re-check flips it (.fixed) */ -.sc.is-anim .pf-row[data-bad]:not(.fixed) { background: rgb(239 68 68 / .1); box-shadow: inset 2px 0 0 #f87171; } -.sc.is-anim .pf-row[data-bad]:not(.fixed) .pf-ic { background: #f87171; color: #450a0a; } -.sc.is-anim .pf-row[data-bad]:not(.fixed) .pf-ic::before { content: "✗"; } -.sc.is-anim .pf-row[data-bad]:not(.fixed) .d-bad { display: inline; color: #fecaca; } -.sc.is-anim .pf-row[data-bad]:not(.fixed) .d-ok { display: none; } -.sc.is-anim .pf-row.fixed { background: rgb(34 197 94 / .1); } -.sc.is-anim .pf-row.fixed .pf-ic { animation: pop .35s cubic-bezier(.2, .9, .3, 1.3); } +/* store forms */ +.ask { margin-top: 10px; font: 13px/1.4 var(--font); color: #fde68a; white-space: normal !important; } +.ask span { display: inline-block; font: 700 11px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: #451a03; background: #fbbf24; padding: 5px 8px; border-radius: 6px; margin-right: 8px; vertical-align: 1px; } /* icons */ .ic-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; } @@ -431,21 +394,9 @@ h1 .hl { color: var(--accent); } @keyframes caret { 50% { opacity: 0; } } /* hide the first scene's lines until main.js starts it, so the final frame does not flash first */ @media (prefers-reduced-motion: no-preference) { .js .demo:not(.is-ready) .sc [data-s] { opacity: 0; } } -/* no JS: the four scenes stack, each in its final frame */ -html:not(.js) .sc-tabs { display: none; } -html:not(.js) .sc-stage { height: auto; } -html:not(.js) .sc, html:not(.js) .sc[hidden] { position: relative; display: flex; } -html:not(.js) .sc + .sc { border-top: 1px solid rgb(148 163 184 / .18); } -html:not(.js) .sc-hand { margin-top: 10px; } - - @media (max-width: 640px) { - .sc-stage { height: 592px; } - .sc { padding: 12px 12px 12px; font-size: 11px; } - .sc-head { margin: -12px -12px 10px; padding: 11px 12px 10px; } - .sc-h { font-size: 15.5px; } - .sc-out { font-size: 13px; } - .sc-hand { font-size: 12px; } + .sc-stage { height: 412px; } + .sc { padding: 12px 12px 14px; font-size: 11px; } .sc-tabs { padding: 0 6px; } .sc-tabs button { font-size: 12.5px; padding: 10px 7px 11px; } .shot-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; } @@ -453,21 +404,13 @@ html:not(.js) .sc-hand { margin-top: 10px; } .sc-foot { font-size: 12px; } .sc-foot .big { font-size: 14px; display: block; } .sc-foot .big + .sep { display: none; } - .tick-csv { font-size: 10px; height: calc(9 * 1.6em); } - .tick-ic { height: calc(7 * 1.65em); } - .pf-strip { padding: 5px 8px 4px; } - .tick-pf { height: 1.65em; } - .pf-list { font-size: 12px; gap: 3px; } - .pf-row { grid-template-columns: 18px minmax(0, 1fr); padding: 4px 7px; gap: 0 8px; } - .pf-ic { width: 17px; height: 17px; grid-row: span 2; align-self: start; margin-top: 1px; } - .pf-what small { display: none; } - .pf-det { font-size: 11.5px; } - .pf-na { display: none !important; } + .tick-csv { font-size: 10px; height: calc(6 * 1.6em); } .ic-row { gap: 8px; } .ic-src img { width: 56px; height: 56px; border-radius: 13px; } .ic-src figcaption { display: none; } .ic-out { gap: 10px 4px; } .ic-out small { font-size: 9px; } + .ask { font-size: 12px; } } .trust { list-style: none; padding: 22px 0 0; margin: 56px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 0; font-size: 14px; color: var(--ink-2); }