Become a Pro / website · becomeapro.ai / scripts / covers / scenes.mjs
| 1 | // The cover scenes: a product UI mockup per track, with the vendor's mark on an app-icon tile where the |
| 2 | // track is about a vendor's product (Claude Code, Codex). Copy in the mockups is illustrative only. |
| 3 | import { anthropic, claude, claudeCode, codex, mark, openai } from "./marks.mjs"; |
| 4 | import { siteScene } from "./site-scene.mjs"; |
| 5 | |
| 6 | const tilt = (deg = -14, x = 7) => `transform: perspective(2200px) rotateY(${deg}deg) rotateX(${x}deg); transform-origin: 30% 50%;`; |
| 7 | const chip = (x, y, text, cls = "") => `<div class="chip ${cls}" style="left:${x}px;top:${y}px"><b></b>${text}</div>`; |
| 8 | const tile = (x, y, size, paths, rot = -8, cls = "") => ` |
| 9 | <div class="reflect" style="left:${x + size * 0.15}px;top:${y + size * 0.85}px;width:${size * 0.7}px;height:${size * 0.35}px"></div> |
| 10 | <div class="tile ${cls}" style="left:${x}px;top:${y}px;width:${size}px;height:${size}px;border-radius:${size * 0.23}px;transform:rotate(${rot}deg)">${mark(paths, size * 0.56)}</div>`; |
| 11 | |
| 12 | // Stacked resource cards for the official-resources hubs |
| 13 | const stack = (x, y, owner, ownerMark, items) => |
| 14 | items |
| 15 | .map( |
| 16 | ([kind, title, host], i) => ` |
| 17 | <div class="card" style="left:${x + i * 30}px;top:${y + i * 140}px;width:540px;background:linear-gradient(180deg,#1a2639,#111a29);transform:rotate(${-2.5 + i * 1.5}deg)"> |
| 18 | <div style="display:flex;align-items:center;gap:14px"><span class="kind">${kind}</span> |
| 19 | <span class="mono muted" style="display:flex;align-items:center;gap:8px;font-size:18px">${mark(ownerMark, 20)}${owner}</span> |
| 20 | <span class="mono muted" style="margin-left:auto;font-size:17px">${host} ↗</span></div> |
| 21 | <div class="display" style="margin-top:14px;font-size:31px;color:#fff">${title}</div> |
| 22 | </div>` |
| 23 | ) |
| 24 | .join(""); |
| 25 | |
| 26 | function claudeScene(v) { |
| 27 | const session = |
| 28 | v === "memory" |
| 29 | ? `<span class="p">></span> <span class="w">/init</span> |
| 30 | <span class="b">●</span> Reading the codebase |
| 31 | <span class="b">●</span> Wrote CLAUDE.md |
| 32 | <span class="d"> # Commands</span> |
| 33 | <span class="d"> - Before a PR: pnpm lint && pnpm test</span> |
| 34 | <span class="d"> # Gotchas</span> |
| 35 | <span class="p">✓</span> <span class="w">Memory files: CLAUDE.md</span> |
| 36 | <span class="p">></span> <span class="caret"></span>` |
| 37 | : v === "hub" |
| 38 | ? `<span class="p">></span> <span class="w">Where should I start with Claude Code?</span> |
| 39 | <span class="b">●</span> Searching Anthropic's docs and courses |
| 40 | <span class="b">●</span> Start with the best-practices guide |
| 41 | <span class="b">●</span> Then a course and the weekly digest |
| 42 | <span class="d"> Source: code.claude.com/docs</span> |
| 43 | <span class="p">></span> <span class="caret"></span>` |
| 44 | : `<span class="p">></span> <span class="w">Plan the refactor, then run the tests</span> |
| 45 | <span class="b">●</span> Reading CLAUDE.md |
| 46 | <span class="b">●</span> Plan · 3 steps |
| 47 | <span class="d"> 1. Extract the auth helpers</span> |
| 48 | <span class="d"> 2. Update every import</span> |
| 49 | <span class="d"> 3. Run the test suite</span> |
| 50 | <span class="p">✓</span> <span class="w">42 tests passed</span> |
| 51 | <span class="p">></span> <span class="caret"></span>`; |
| 52 | // The hub mirrors the other Claude covers (window left, tile right) so it reads as its own image |
| 53 | const hub = v === "hub"; |
| 54 | return ` |
| 55 | <div class="win" style="left:${hub ? 110 : 560}px;top:${hub ? 90 : 150}px;width:920px;height:640px;${hub ? tilt(14, 6).replace("30% 50%", "70% 50%") : tilt()}"> |
| 56 | <div class="bar"><i></i><i></i><i></i><span class="t">claude — ~/my-app</span></div> |
| 57 | <div style="margin:26px 38px 0;padding:20px 24px;border:1.5px solid rgba(124,196,242,.4);border-radius:16px;display:flex;align-items:center;gap:18px"> |
| 58 | <span style="color:#7cc4f2">${mark(claude, 38)}</span> |
| 59 | <span class="display" style="font-size:30px;color:#fff">Claude Code</span> |
| 60 | ${v === "hub" ? `<span class="mono muted" style="margin-left:auto;font-size:19px">official resources</span>` : ""} |
| 61 | </div> |
| 62 | <div class="term">${session}</div> |
| 63 | </div> |
| 64 | ${hub ? tile(1150, 110, 250, claude, 8) : tile(250, 250, 270, claude, -9)} |
| 65 | ${hub |
| 66 | ? `${stack(690, 500, "Anthropic", anthropic, [["Course", "Claude Code in Action", "anthropic.com"], ["Digest", "What's new in Claude Code", "code.claude.com"], ["Talk", "Code with Claude", "anthropic.com"]])} |
| 67 | ${chip(1300, 430, "Courses")}${chip(1300, 820, "Changelog", "blur1")}${chip(140, 830, "Webinars")}` |
| 68 | : v === "memory" |
| 69 | ? `${chip(1160, 96, "/init")}${chip(1270, 820, "@imports")}${chip(150, 640, ".claude/rules")}${chip(330, 120, "/memory", "blur1")}${chip(1380, 470, "/context")} |
| 70 | <div class="card" style="left:1070px;top:600px;width:330px;display:flex;align-items:center;gap:16px"><span style="color:#bfe3fa">${mark(claudeCode, 54)}</span><div><div class="display" style="font-size:28px;color:#fff">CLAUDE.md</div><div class="mono muted" style="font-size:17px">loaded every session</div></div></div>` |
| 71 | : `${chip(1160, 96, "CLAUDE.md")}${chip(1270, 820, "Subagents")}${chip(150, 640, "Hooks")}${chip(330, 120, "MCP", "blur1")}${chip(1380, 470, "Skills")} |
| 72 | <div class="card" style="left:1070px;top:600px;width:330px;display:flex;align-items:center;gap:16px"><span style="color:#bfe3fa">${mark(claudeCode, 54)}</span><div><div class="display" style="font-size:28px;color:#fff">Plan mode</div><div class="mono muted" style="font-size:17px">think, then edit</div></div></div>`}`; |
| 73 | } |
| 74 | |
| 75 | function codexScene(v) { |
| 76 | const session = |
| 77 | v === "agents" |
| 78 | ? `<span class="p">$</span> <span class="w">codex "List the instruction sources you loaded."</span> |
| 79 | <span class="b">▸</span> ~/.codex/AGENTS.md |
| 80 | <span class="b">▸</span> AGENTS.md |
| 81 | <span class="b">▸</span> services/payments/AGENTS.override.md |
| 82 | <span class="d"> Closer files win when two rules disagree</span> |
| 83 | <span class="p">✓</span> <span class="w">3 sources · 4.1 KiB of 32 KiB</span> |
| 84 | <span class="p">$</span> <span class="caret"></span>` |
| 85 | : v === "hub" |
| 86 | ? `<span class="p">$</span> <span class="w">codex "explain AGENTS.md to me"</span> |
| 87 | <span class="b">▸</span> Custom instructions live in AGENTS.md |
| 88 | <span class="b">▸</span> Put build, test and style rules there |
| 89 | <span class="b">▸</span> Codex reads it before every task |
| 90 | <span class="d"> Source: OpenAI Codex docs</span> |
| 91 | <span class="p">$</span> <span class="caret"></span>` |
| 92 | : `<span class="p">$</span> <span class="w">codex "validate the signup form"</span> |
| 93 | <span class="b">▸</span> Reading AGENTS.md |
| 94 | <span class="b">▸</span> Editing src/routes/signup.ts |
| 95 | <span class="add">+ const body = schema.parse(await req.json())</span><span class="add">+ if (!body.ok) return badRequest(body.error)</span><span class="del">- // TODO: validate input</span><span class="p">✓</span> <span class="w">Tests passed · ready for review</span>`; |
| 96 | return ` |
| 97 | <div class="win" style="left:540px;top:150px;width:940px;height:640px;${tilt(-14, 6)}"> |
| 98 | <div class="bar"><i></i><i></i><i></i><span class="t">codex — ~/api</span> |
| 99 | <span style="margin-left:auto;display:flex;align-items:center;gap:10px;color:rgba(234,244,253,.6)" class="mono">${mark(openai, 22)}<span style="font-size:19px">OpenAI</span></span></div> |
| 100 | <div class="term">${session}</div> |
| 101 | </div> |
| 102 | ${tile(240, 250, 270, codex, -9)} |
| 103 | ${v === "hub" |
| 104 | ? stack(960, 440, "OpenAI", openai, [["Guide", "Codex best practices", "learn.chatgpt.com"], ["Docs", "Codex CLI", "learn.chatgpt.com"], ["Docs", "Codex Cloud", "learn.chatgpt.com"]]) |
| 105 | : v === "agents" |
| 106 | ? `${chip(1180, 92, "AGENTS.override.md")}${chip(170, 650, "~/.codex")}${chip(1330, 470, "config.toml")}${chip(360, 120, "Open format", "blur1")} |
| 107 | <div class="card" style="left:1030px;top:600px;width:440px"> |
| 108 | <div style="display:flex;align-items:center;gap:12px"><span class="kind">File</span><span class="mono muted" style="font-size:18px">repo root</span></div> |
| 109 | <div class="display" style="margin-top:12px;font-size:28px;color:#fff">AGENTS.md</div> |
| 110 | <div class="mono" style="margin-top:10px;font-size:18px;color:#7cc4f2">● Setup · Code style · Done means</div> |
| 111 | </div>` |
| 112 | : `${chip(1180, 92, "AGENTS.md")}${chip(170, 650, "Cloud tasks")}${chip(1330, 470, "CLI")}${chip(360, 120, "IDE", "blur1")} |
| 113 | <div class="card" style="left:1030px;top:600px;width:440px"> |
| 114 | <div style="display:flex;align-items:center;gap:12px"><span class="kind">Pull request</span><span class="mono muted" style="font-size:18px">#128</span></div> |
| 115 | <div class="display" style="margin-top:12px;font-size:28px;color:#fff">Validate signup input</div> |
| 116 | <div class="mono" style="margin-top:10px;font-size:18px;color:#7cc4f2">● Checks passed · ready</div> |
| 117 | </div>`}`; |
| 118 | } |
| 119 | |
| 120 | // Our own mark (the Impossible A), not a vendor's: on the agent panel |
| 121 | const ourMarkAt = (size) => `<svg viewBox="0 0 64 64" width="${size}" height="${size}"><path d="M3 49.94 L7.14 57.11 L56.86 57.11 L36.14 21.24 L32 28.41 L44.43 49.94Z" fill="#46AAE9"/><path d="M56.86 57.11 L61 49.94 L36.14 6.89 L15.43 42.76 L23.71 42.76 L36.14 21.24Z" fill="#2A7FB8"/><path d="M36.14 6.89 L27.86 6.89 L3 49.94 L44.43 49.94 L40.29 42.76 L15.43 42.76Z" fill="#fff"/></svg>`; |
| 122 | const ourMark = ourMarkAt(34); |
| 123 | const pointer = `<svg viewBox="0 0 24 24" width="58" height="58" style="filter:drop-shadow(0 8px 16px rgba(0,0,0,.6))"><path d="M3 2 L3 20 L8 15.5 L11.5 22.5 L14.6 21 L11.2 14.2 L18 14.2Z" fill="#fff" stroke="#0b1422" stroke-width="1.2" stroke-linejoin="round"/></svg>`; |
| 124 | |
| 125 | // The form, results and agent steps for each computer-use cover |
| 126 | const CU = { |
| 127 | track: { |
| 128 | url: "travel.example.com", title: "Find a flight", button: "Search", |
| 129 | fields: [["From", "San Francisco"], ["To", "Tokyo"], ["Dates", "Nov 12 – Nov 19"]], |
| 130 | rows: ["7:40 · 11h 05m", "10:15 · 11h 20m", "13:30 · 12h 10m", "16:55 · 11h 45m"], |
| 131 | steps: [["done", "Open the booking site"], ["done", "Enter the dates"], ["now", "Click Search"], ["todo", "Compare the results"]], |
| 132 | chips: [[1180, 680, "Screenshot"], [1300, 780, "Type"]], |
| 133 | }, |
| 134 | tutorial: { |
| 135 | url: "admin.example.com/settings", title: "Team settings", button: "Save", |
| 136 | fields: [["Name", "Jordan Lee"], ["Role", "Editor"], ["Email", "jordan@example.com"]], |
| 137 | rows: ["Owner", "Editor", "Editor", "Viewer"], |
| 138 | steps: [["done", "Open the admin dashboard"], ["done", "Copy rows from the sheet"], ["now", "Fill in the form"], ["todo", "Ask before submitting"]], |
| 139 | chips: [[1150, 660, "Ask before purchases"], [1210, 760, "Allowed sites only"]], |
| 140 | }, |
| 141 | playwright: { |
| 142 | url: "localhost:3000/signup", title: "Create your account", button: "Sign up", |
| 143 | fields: [["Name", "Test User"], ["Email", "test+1@example.com"], ["Password", "••••••••••"]], |
| 144 | rows: ["browser_navigate", "browser_snapshot", "browser_fill_form", "browser_click"], |
| 145 | steps: [["done", "Open localhost:3000"], ["done", "Read the page"], ["now", "Fill in the sign-up form"], ["todo", "Screenshot each step"]], |
| 146 | chips: [[1150, 660, "Playwright MCP"], [1250, 760, "--isolated"]], |
| 147 | }, |
| 148 | }; |
| 149 | |
| 150 | function computerUseScene(v) { |
| 151 | const c = CU[v] || CU.track; |
| 152 | const field = ([label, val], y) => `<div class="abs" style="left:60px;top:${y}px"><div class="mono muted" style="font-size:17px">${label}</div> |
| 153 | <div style="margin-top:8px;width:400px;height:56px;border-radius:12px;border:1.5px solid rgba(191,227,250,.2);background:rgba(255,255,255,.03);padding:14px 18px;font-size:22px;color:#dcecfa">${val}</div></div>`; |
| 154 | return ` |
| 155 | <div class="win" style="left:330px;top:130px;width:980px;height:690px;${tilt(-12, 6)}"> |
| 156 | <div class="bar"><i></i><i></i><i></i> |
| 157 | <div class="mono" style="margin-left:22px;flex:1;height:38px;border-radius:10px;background:rgba(255,255,255,.05);display:flex;align-items:center;padding:0 16px;font-size:19px;color:rgba(234,244,253,.55)">${c.url}</div></div> |
| 158 | <div class="display abs" style="left:60px;top:110px;font-size:44px;color:#fff">${c.title}</div> |
| 159 | ${c.fields.map((f, i) => field(f, 190 + i * 110)).join("")} |
| 160 | <div class="abs" style="left:60px;top:540px;width:220px;height:64px;border-radius:14px;background:#46aae9;color:#04121f;font:600 23px Geist;display:grid;place-items:center;box-shadow:0 0 0 6px rgba(70,170,233,.25),0 0 50px rgba(70,170,233,.6)">${c.button}</div> |
| 161 | <div class="abs" style="left:52px;top:532px;width:236px;height:80px;border:2px dashed #bfe3fa;border-radius:18px"></div> |
| 162 | <div class="abs mono" style="left:300px;top:552px;padding:6px 12px;border-radius:8px;background:#bfe3fa;color:#04121f;font-size:16px;font-weight:600">click</div> |
| 163 | <div class="abs" style="left:540px;top:180px;width:380px;display:grid;gap:14px">${c.rows |
| 164 | .map((t, i) => `<div style="height:84px;border-radius:14px;border:1px solid rgba(191,227,250,${i === 1 ? ".5" : ".12"});background:rgba(255,255,255,${i === 1 ? ".07" : ".03"});padding:16px 20px;display:flex;align-items:center;gap:16px"> |
| 165 | <span style="width:46px;height:46px;border-radius:12px;background:linear-gradient(140deg,#46aae9,#1f5fbf)"></span> |
| 166 | <span><span style="display:block;width:${120 + i * 17}px;height:12px;border-radius:6px;background:rgba(234,244,253,.35)"></span><span class="mono muted" style="display:block;margin-top:10px;font-size:16px">${t}</span></span></div>`) |
| 167 | .join("")}</div> |
| 168 | </div> |
| 169 | <div class="abs" style="left:520px;top:640px;width:120px;height:120px;border-radius:50%;border:2px solid rgba(124,196,242,.7);box-shadow:0 0 40px rgba(70,170,233,.6)"></div> |
| 170 | <div class="abs" style="left:545px;top:665px;width:70px;height:70px;border-radius:50%;background:rgba(124,196,242,.35)"></div> |
| 171 | <div class="abs" style="left:575px;top:690px">${pointer}</div> |
| 172 | <div class="card" style="left:1130px;top:250px;width:390px"> |
| 173 | <div style="display:flex;align-items:center;gap:14px">${ourMark}<span class="display" style="font-size:30px;color:#fff">Agent</span> |
| 174 | <span class="mono" style="margin-left:auto;font-size:16px;color:#7cc4f2">● running</span></div> |
| 175 | <div style="margin-top:20px;display:grid;gap:14px">${c.steps |
| 176 | .map( |
| 177 | ([st, t]) => `<div style="display:flex;align-items:center;gap:14px;font-size:22px;color:${st === "todo" ? "rgba(201,214,230,.5)" : "#eaf4fd"}"> |
| 178 | <span style="width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:16px;${st === "done" ? "background:#46aae9;color:#04121f" : st === "now" ? "border:2px solid #7cc4f2;box-shadow:0 0 16px #46aae9" : "border:2px solid rgba(201,214,230,.3)"}">${st === "done" ? "✓" : ""}</span>${t}</div>` |
| 179 | ) |
| 180 | .join("")}</div> |
| 181 | </div> |
| 182 | ${c.chips.map(([x, y, t]) => chip(x, y, t)).join("")} |
| 183 | ${chip(120, 210, "Click", "blur1")}${chip(150, 820, "Scroll")}`; |
| 184 | } |
| 185 | |
| 186 | function videoScene(v) { |
| 187 | // A generated frame: a city skyline at dawn; k pans the camera across it |
| 188 | const frame = (w, h, k) => { |
| 189 | let seed = 7; |
| 190 | const rnd = () => ((seed = (seed * 16807) % 2147483647) / 2147483647); |
| 191 | const towers = []; |
| 192 | for (let x = -40; x < 1300; ) { |
| 193 | const bw = 26 + rnd() * 60, bh = 70 + Math.pow(rnd(), 1.6) * 230, far = rnd() < 0.45; |
| 194 | towers.push({ x, bw, bh: far ? bh * 0.7 : bh, far }); |
| 195 | x += bw * (far ? 0.55 : 0.9); |
| 196 | } |
| 197 | const lit = (t) => { |
| 198 | let out = ""; |
| 199 | for (let wy = 300 - t.bh + 14; wy < 290; wy += 16) |
| 200 | for (let wx = t.x + 6; wx < t.x + t.bw - 8; wx += 12) if (rnd() < 0.22) out += `<rect x="${wx}" y="${wy}" width="5" height="7" fill="#bfe3fa" opacity="${0.4 + rnd() * 0.6}"/>`; |
| 201 | return out; |
| 202 | }; |
| 203 | const svg = `<svg viewBox="${k * 40} 0 900 300" preserveAspectRatio="xMidYMid slice" width="100%" height="100%"> |
| 204 | <defs><linearGradient id="sky" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#081428"/><stop offset=".55" stop-color="#1b4b8f"/><stop offset="1" stop-color="#7cc4f2"/></linearGradient> |
| 205 | <radialGradient id="sun" cx=".62" cy=".86" r=".5"><stop offset="0" stop-color="#fff"/><stop offset=".12" stop-color="#bfe3fa"/><stop offset=".45" stop-color="#46aae9" stop-opacity=".45"/><stop offset="1" stop-color="#46aae9" stop-opacity="0"/></radialGradient> |
| 206 | <linearGradient id="mist" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#7cc4f2" stop-opacity="0"/><stop offset="1" stop-color="#bfe3fa" stop-opacity=".55"/></linearGradient></defs> |
| 207 | <rect x="-100" width="1500" height="300" fill="url(#sky)"/><rect x="-100" width="1500" height="300" fill="url(#sun)"/> |
| 208 | ${towers.filter((t) => t.far).map((t) => `<rect x="${t.x}" y="${300 - t.bh}" width="${t.bw}" height="${t.bh}" fill="#1d4a86" opacity=".75"/>`).join("")} |
| 209 | ${towers.filter((t) => !t.far).map((t) => `<rect x="${t.x}" y="${300 - t.bh}" width="${t.bw}" height="${t.bh}" fill="#071224"/>${lit(t)}`).join("")} |
| 210 | <rect x="-100" y="190" width="1500" height="110" fill="url(#mist)"/></svg>`; |
| 211 | return `<div style="width:${w}px;height:${h}px;border-radius:10px;overflow:hidden;position:relative">${svg}</div>`; |
| 212 | }; |
| 213 | const node = (x, y, title, rows, hot) => `<div class="card" style="left:${x}px;top:${y}px;width:290px;padding:18px 20px;${hot ? "border-color:rgba(124,196,242,.6)" : ""}"> |
| 214 | <div class="mono" style="font-size:16px;color:#7cc4f2;letter-spacing:.06em;text-transform:uppercase">${title}</div> |
| 215 | ${rows.map((r) => `<div style="margin-top:10px;height:34px;border-radius:8px;background:rgba(255,255,255,.05);padding:6px 12px;font-size:18px;color:#c9d6e6">${r}</div>`).join("")}</div>`; |
| 216 | const wire = (x1, y1, x2, y2) => `<path d="M${x1} ${y1} C ${x1 + 90} ${y1}, ${x2 - 90} ${y2}, ${x2} ${y2}" stroke="#46aae9" stroke-width="4" fill="none" style="filter:drop-shadow(0 0 8px #46aae9)"/>`; |
| 217 | const editor = ` |
| 218 | <div class="win" style="left:${v === "tutorial" ? 700 : 520}px;top:${v === "tutorial" ? 300 : 140}px;width:${v === "tutorial" ? 800 : 960}px;height:${v === "tutorial" ? 560 : 660}px;${tilt(-12, 6)}"> |
| 219 | <div class="bar"><i></i><i></i><i></i><span class="t">${v === "tutorial" ? "output — clip_001.mp4" : "my-first-clip"}</span></div> |
| 220 | <div style="margin:24px 28px 0;position:relative">${frame(v === "tutorial" ? 744 : 904, v === "tutorial" ? 300 : 380, 2)} |
| 221 | <div class="abs" style="left:50%;top:50%;width:96px;height:96px;margin:-48px;border-radius:50%;background:rgba(6,10,18,.55);border:2px solid rgba(255,255,255,.7);display:grid;place-items:center;backdrop-filter:blur(6px)"> |
| 222 | <svg viewBox="0 0 24 24" width="40" height="40"><path d="M8 5v14l11-7z" fill="#fff"/></svg></div></div> |
| 223 | <div style="margin:22px 28px 0;display:flex;gap:10px">${[0, 1, 2, 3, 4, 5].map((k) => frame(v === "tutorial" ? 115 : 140, v === "tutorial" ? 64 : 80, k)).join("")}</div> |
| 224 | <div style="margin:16px 28px 0;height:6px;border-radius:6px;background:rgba(255,255,255,.1)"><div style="width:42%;height:100%;border-radius:6px;background:#46aae9;box-shadow:0 0 14px #46aae9"></div></div> |
| 225 | </div>`; |
| 226 | if (v === "tutorial") { |
| 227 | return `${editor} |
| 228 | <svg class="abs" style="left:0;top:0" width="1600" height="960">${wire(400, 210, 470, 330)}${wire(760, 360, 820, 280)}</svg> |
| 229 | ${node(110, 130, "Load model", ["open-weight video", "from your volume"])} |
| 230 | ${node(470, 260, "Prompt", ["a city at dawn, slow pan"], true)} |
| 231 | ${node(820, 120, "Sampler", ["steps · seed", "→ video"])} |
| 232 | <div class="card" style="left:110px;top:560px;width:430px"> |
| 233 | <div style="display:flex;align-items:center;gap:12px"><span class="kind">GPU pod</span><span class="mono" style="font-size:17px;color:#7cc4f2">● running</span></div> |
| 234 | <div class="display" style="margin-top:12px;font-size:32px;color:#fff">ComfyUI on your GPU</div> |
| 235 | <div class="mono muted" style="margin-top:8px;font-size:18px">network volume attached</div> |
| 236 | </div> |
| 237 | ${chip(170, 830, "Open weights")}${chip(1240, 160, "ComfyUI", "blur1")}`; |
| 238 | } |
| 239 | if (v === "agent") { |
| 240 | const done = (text, hot) => `<div class="mono" style="margin-top:12px;font-size:21px;color:${hot ? "#7cc4f2" : "rgba(201,214,230,.75)"}">✓ ${text}</div>`; |
| 241 | return ` |
| 242 | <div class="win" style="left:560px;top:190px;width:900px;height:480px;${tilt(-12, 6)}"> |
| 243 | <div class="bar"><i></i><i></i><i></i><span class="t">your agent</span></div> |
| 244 | <div class="mono" style="margin:34px 38px 0;font-size:31px;line-height:1.5;color:#f4f8fc">Use Runpod to set up ComfyUI for me on an <span style="color:#7cc4f2">RTX 4090</span></div> |
| 245 | <div style="margin:30px 38px 0">${done("In stock, $0.89 an hour")}${done("Network volume created")}${done("LTX-2.5 UD-Q4 installed")}${done("Test clip rendered", true)}</div> |
| 246 | </div> |
| 247 | <div class="card" style="left:120px;top:560px;width:470px"> |
| 248 | <div style="display:flex;align-items:center;gap:12px"><span class="kind">Your GPU</span><span class="mono" style="font-size:17px;color:#7cc4f2">● running</span></div> |
| 249 | <div class="display" style="margin-top:12px;font-size:32px;color:#fff">ComfyUI is up</div> |
| 250 | <div class="mono muted" style="margin-top:8px;font-size:18px">set up by your agent</div> |
| 251 | </div> |
| 252 | ${chip(160, 200, "Runpod MCP")}${chip(1270, 830, "Six prompts")}${chip(300, 860, "Private AI", "blur1")}`; |
| 253 | } |
| 254 | if (v === "cost") { |
| 255 | const line = (label, value, hot) => `<div style="margin-top:14px;display:flex;align-items:center;font-size:22px;color:#dcecfa"><span>${label}</span> |
| 256 | <span class="mono" style="margin-left:auto;font-size:19px;color:${hot ? "#7cc4f2" : "rgba(201,214,230,.7)"}">${value}</span></div>`; |
| 257 | return `${editor} |
| 258 | <div class="card" style="left:120px;top:520px;width:470px"> |
| 259 | <div style="display:flex;align-items:center;gap:12px"><span class="kind">Billing</span><span class="mono" style="font-size:17px;color:#7cc4f2">● under budget</span></div> |
| 260 | ${line("GPU pod", "stops in 1h 58m", true)} |
| 261 | ${line("Network volume · 100 GB", "$7 / month")} |
| 262 | ${line("Low-balance alert", "on", true)} |
| 263 | </div> |
| 264 | ${chip(1210, 80, "Stop timer")}${chip(160, 200, "Terminate, don't stop")}${chip(1320, 820, "Runpod")}${chip(300, 880, "Test small first", "blur1")}`; |
| 265 | } |
| 266 | return `${editor} |
| 267 | <div class="card" style="left:150px;top:560px;width:430px"> |
| 268 | <div style="display:flex;align-items:center;gap:12px"><span class="kind">Your GPU</span><span class="mono" style="font-size:17px;color:#7cc4f2">● running</span></div> |
| 269 | <div class="display" style="margin-top:12px;font-size:32px;color:#fff">Rendering clip 1 of 4</div> |
| 270 | <div style="margin-top:16px;height:8px;border-radius:8px;background:rgba(255,255,255,.1)"><div style="width:64%;height:100%;border-radius:8px;background:linear-gradient(90deg,#3a86e8,#7cc4f2)"></div></div> |
| 271 | </div> |
| 272 | ${chip(1210, 80, "Open weights")}${chip(160, 200, "ComfyUI")}${chip(1320, 820, "Runpod")}${chip(300, 860, "Text → video", "blur1")}`; |
| 273 | } |
| 274 | |
| 275 | // One operator, several agents: a phone taking a dictated prompt, and three Claude Code sessions working at once |
| 276 | function operatorScene() { |
| 277 | const agents = [ |
| 278 | ["agent 1 — fix-date-bug", [["b", "●", "Reading src/lib/dates.ts"], ["b", "●", "Fixing the time-zone offset"], ["p", "✓", "npm test · 42 passed"]]], |
| 279 | ["agent 2 — add-tests", [["b", "●", "Writing tests for checkout"], ["b", "●", "Running the new tests"], ["p", "✓", "18 tests added"]]], |
| 280 | ["agent 3 — update-docs", [["b", "●", "Updating the README"], ["d", "◌", "Waiting for your review"]]], |
| 281 | ]; |
| 282 | const win = ([title, lines], i) => ` |
| 283 | <div class="win" style="left:${610 + i * 70}px;top:${80 + i * 270}px;width:820px;height:228px;${tilt(-12, 6)}"> |
| 284 | <div class="bar"><i></i><i></i><i></i><span class="t">${title}</span> |
| 285 | <span class="mono" style="margin-left:auto;font-size:17px;color:${i === 2 ? "rgba(201,214,230,.6)" : "#7cc4f2"}">${i === 2 ? "◌ review" : "● running"}</span></div> |
| 286 | <div class="term" style="padding:20px 34px;font-size:23px;line-height:1.65">${lines |
| 287 | .map(([c, m, t]) => `<span class="${c}">${m}</span> <span class="${c === "p" ? "w" : ""}">${t}</span>`) |
| 288 | .join("\n")}</div> |
| 289 | </div>`; |
| 290 | const bubble = (text, me) => `<div style="align-self:${me ? "flex-end" : "flex-start"};max-width:230px;padding:14px 16px;border-radius:18px;${ |
| 291 | me ? "background:#46aae9;color:#04121f;border-bottom-right-radius:6px" : "background:rgba(255,255,255,.07);color:#dcecfa;border-bottom-left-radius:6px" |
| 292 | };font-size:17px;line-height:1.4">${text}</div>`; |
| 293 | return ` |
| 294 | ${agents.map(win).join("")} |
| 295 | <div class="abs" style="left:150px;top:150px;width:330px;height:660px;border-radius:52px;padding:14px;background:linear-gradient(180deg,#1b2638,#0b111b);border:1px solid rgba(191,227,250,.22);box-shadow:0 60px 140px -30px rgba(0,0,0,.9),0 0 120px -30px rgba(70,170,233,.6);transform:rotate(-4deg)"> |
| 296 | <div style="height:100%;border-radius:40px;background:linear-gradient(180deg,#0f1828,#0a101a);display:flex;flex-direction:column;padding:26px 18px 22px;gap:14px"> |
| 297 | <div style="display:flex;align-items:center;gap:10px;color:#7cc4f2">${mark(claude, 26)}<span class="display" style="font-size:22px;color:#fff">Claude Code</span></div> |
| 298 | <div class="mono muted" style="font-size:14px">3 sessions · your computer</div> |
| 299 | ${bubble("Split this into three tasks and run them at the same time.", true)} |
| 300 | ${bubble("Started 3 agents. I'll ask before anything is merged.", false)} |
| 301 | ${bubble("Show me the test results.", true)} |
| 302 | <div style="margin-top:auto;display:flex;justify-content:center"> |
| 303 | <div style="width:78px;height:78px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#9ad3f7,#46aae9 55%,#2a6fd6);box-shadow:0 0 0 10px rgba(70,170,233,.18),0 0 50px rgba(70,170,233,.8);display:grid;place-items:center"> |
| 304 | <svg viewBox="0 0 24 24" width="34" height="34" fill="none" stroke="#04121f" stroke-width="2.2" stroke-linecap="round"><rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3"/></svg> |
| 305 | </div> |
| 306 | </div> |
| 307 | </div> |
| 308 | </div> |
| 309 | ${chip(250, 70, "Operator")}${chip(1270, 880, "Review first", "blur1")}${chip(80, 860, "Dictated")}${chip(1380, 36, "Worktrees", "blur1")}`; |
| 310 | } |
| 311 | |
| 312 | export const SCENES = { claude: claudeScene, codex: codexScene, computerUse: computerUseScene, video: videoScene, operator: operatorScene, site: siteScene }; |
| 313 | |
| 314 | // One cover per track (track pages, and the fallback for new tutorials) and one per tutorial |
| 315 | export const COVERS = [ |
| 316 | { out: "claude", scene: "claude", variant: "track" }, |
| 317 | { out: "claude/claude-code-best-practices", scene: "claude", variant: "hub" }, |
| 318 | { out: "chatgpt", scene: "codex", variant: "track" }, |
| 319 | { out: "chatgpt/codex-best-practices", scene: "codex", variant: "hub" }, |
| 320 | { out: "computer-use", scene: "computerUse", variant: "track" }, |
| 321 | { out: "computer-use/what-is-computer-use", scene: "computerUse", variant: "tutorial" }, |
| 322 | { out: "ai-video", scene: "video", variant: "track" }, |
| 323 | { out: "ai-video/runpod-open-weight-video", scene: "video", variant: "tutorial" }, |
| 324 | { out: "claude/claude-md-guide", scene: "claude", variant: "memory" }, |
| 325 | { out: "chatgpt/agents-md-codex", scene: "codex", variant: "agents" }, |
| 326 | { out: "computer-use/playwright-mcp-claude-code", scene: "computerUse", variant: "playwright" }, |
| 327 | { out: "ai-video/runpod-cost-tips", scene: "video", variant: "cost" }, |
| 328 | { out: "ai-video/comfyui-runpod-agent", scene: "video", variant: "agent" }, |
| 329 | { out: "claude/run-a-team-of-agents", scene: "operator" }, |
| 330 | // Not a tutorial cover: the source of the site-wide share image |
| 331 | { out: "site", scene: "site" }, |
| 332 | ]; |