// Page shell for the cover images: fonts, the shared look (glass windows, app-icon tiles, chips) and the // background (glows, a perspective grid, and a seeded field of the site's outlined-triangle particles). // Covers are 1600 x 960 (5:3) and always dark, so they read as product shots in both site themes. export const W = 1600; export const H = 960; const CSS = /* css */ ` * { box-sizing: border-box; margin: 0; padding: 0; } html, body { width: ${W}px; height: ${H}px; overflow: hidden; background: #060a12; color: #eaf4fd; } body { font-family: "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased; } .stage { position: absolute; inset: 0; overflow: hidden; } .glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; } .grid { position: absolute; left: -40%; right: -40%; bottom: -36%; height: 85%; background-image: linear-gradient(rgba(124,196,242,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(124,196,242,.16) 1px, transparent 1px); background-size: 64px 64px; transform: perspective(700px) rotateX(64deg); transform-origin: top; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 60%, transparent 100%); } canvas#field { position: absolute; inset: 0; } .grain { position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay; pointer-events: none; background-image: url("data:image/svg+xml;utf8,"); } .vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 55% 45%, transparent 55%, rgba(3,6,12,.7) 100%); pointer-events: none; } .abs { position: absolute; } .mono { font-family: "Geist Mono", ui-monospace, monospace; } .display { font-family: "Funnel Display", "Geist", sans-serif; letter-spacing: -0.03em; } /* glass window */ .win { position: absolute; border-radius: 26px; overflow: hidden; background: linear-gradient(180deg, rgba(24,36,54,.9), rgba(10,16,26,.94)); border: 1px solid rgba(191,227,250,.16); box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 60px 140px -30px rgba(0,0,0,.9), 0 0 120px -30px rgba(70,170,233,.55); } .win::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(160deg, rgba(255,255,255,.10), transparent 32%); } .bar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid rgba(191,227,250,.1); background: rgba(255,255,255,.025); } .bar i { width: 15px; height: 15px; border-radius: 50%; background: rgba(234,244,253,.22); } .bar .t { margin-left: 18px; font: 500 21px "Geist Mono", monospace; color: rgba(234,244,253,.55); } .term { padding: 30px 38px; font: 400 25px/1.75 "Geist Mono", monospace; color: #c9d6e6; white-space: pre; } .term .p { color: #7cc4f2; } .term .b { color: #46aae9; } .term .w { color: #fff; } .term .d { color: rgba(201,214,230,.45); } .term .add { display: block; margin: 0 -38px; padding: 0 38px; background: rgba(70,170,233,.13); color: #bfe3fa; } .term .del { display: block; margin: 0 -38px; padding: 0 38px; background: rgba(234,244,253,.04); color: rgba(201,214,230,.45); text-decoration: line-through; } .caret { display: inline-block; width: 13px; height: 28px; background: #7cc4f2; vertical-align: -5px; box-shadow: 0 0 16px #46aae9; } /* app-icon tile holding a product mark */ .tile { position: absolute; display: grid; place-items: center; color: #fff; background: radial-gradient(130% 130% at 28% 18%, #9ad3f7 0%, #46aae9 34%, #2a6fd6 70%, #173f93 100%); box-shadow: inset 0 3px 0 rgba(255,255,255,.5), inset 0 -18px 40px rgba(8,26,74,.55), 0 40px 90px -20px rgba(70,170,233,.85), 0 0 0 1px rgba(255,255,255,.15); } .tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(170deg, rgba(255,255,255,.38), transparent 42%); pointer-events: none; } .tile svg { filter: drop-shadow(0 6px 14px rgba(5,20,60,.45)); position: relative; z-index: 1; } .tile.dark { background: radial-gradient(130% 130% at 28% 18%, #26364d 0%, #121c2b 60%, #0a111c 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 40px 90px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(191,227,250,.22), 0 0 70px -10px rgba(70,170,233,.5); } .reflect { position: absolute; border-radius: 50%; background: rgba(70,170,233,.55); filter: blur(40px); } /* glass chips and cards */ .chip { position: absolute; display: flex; align-items: center; gap: 12px; padding: 15px 24px; border-radius: 999px; background: rgba(12,20,33,.78); border: 1px solid rgba(191,227,250,.2); font: 500 22px "Geist Mono", monospace; color: #dcecfa; box-shadow: 0 24px 50px -16px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(12px); } .chip b { width: 11px; height: 11px; border-radius: 50%; background: #46aae9; box-shadow: 0 0 14px #46aae9; } .card { position: absolute; border-radius: 22px; padding: 26px 28px; background: linear-gradient(180deg, rgba(26,38,57,.92), rgba(13,20,32,.95)); border: 1px solid rgba(191,227,250,.18); box-shadow: 0 40px 90px -24px rgba(0,0,0,.9), 0 0 70px -24px rgba(70,170,233,.5), inset 0 1px 0 rgba(255,255,255,.08); } .kind { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(70,170,233,.18); color: #7cc4f2; font: 600 17px "Geist Mono", monospace; letter-spacing: .06em; text-transform: uppercase; } .muted { color: rgba(201,214,230,.6); } .blur1 { filter: blur(1.2px); opacity: .8; } .blur2 { filter: blur(2.5px); opacity: .6; } `; // Draws the particle field on a canvas; runs inside the page const FIELD = /* js */ ` (() => { const c = document.getElementById("field"), g = c.getContext("2d"), dpr = 1; c.width = ${W} * dpr; c.height = ${H} * dpr; let h = 2166136261; for (const ch of SEED) h = Math.imul(h ^ ch.charCodeAt(0), 16777619); const r = () => { h ^= h << 13; h ^= h >>> 17; h ^= h << 5; return ((h >>> 0) % 100000) / 100000; }; const COLORS = ["#46AAE9", "#7CC4F2", "#BFE3FA", "#FFFFFF", "#3A86E8"]; for (let i = 0; i < 420; i++) { g.globalAlpha = .1 + r() * .35; g.fillStyle = "#cfe8fb"; g.fillRect(r() * ${W}, r() * ${H}, 1.4, 1.4); } const tri = (x, y, s, rot, col, a) => { g.save(); g.translate(x, y); g.rotate(rot); g.globalAlpha = a; g.strokeStyle = col; g.lineWidth = Math.max(1.2, s * .16); g.shadowColor = col; g.shadowBlur = s * 1.6; g.beginPath(); for (let k = 0; k < 3; k++) { const t = -Math.PI / 2 + k * 2.0944; k ? g.lineTo(Math.cos(t) * s, Math.sin(t) * s) : g.moveTo(Math.cos(t) * s, Math.sin(t) * s); } g.closePath(); g.stroke(); g.restore(); }; // a flowing ribbon of particles sweeping behind the scene, plus loose ones everywhere const amp = 120 + r() * 80, ph = r() * 6.28, y0 = ${H} * (.45 + r() * .2), tilt = -.25 + r() * .2; for (let i = 0; i < 900; i++) { const t = r(), x = t * ${W} * 1.1 - 60, spread = Math.pow(r(), 2) * 110 * (r() < .5 ? -1 : 1); const y = y0 + Math.sin(t * 5.2 + ph) * amp + (x - ${W} / 2) * tilt + spread; tri(x, y, 2 + Math.pow(r(), 4) * 8, r() * 6.28, COLORS[(r() * 5) | 0], .25 + r() * .6); } for (let i = 0; i < 90; i++) tri(r() * ${W}, r() * ${H}, 2.5 + Math.pow(r(), 3) * 8, r() * 6.28, COLORS[(r() * 5) | 0], .15 + r() * .4); })();`; // plain: no grid or triangle ribbon, for scenes that draw their own particles (the site share image) export function page({ seed, body, glows, plain }) { const glowDivs = (glows ?? [ { x: 980, y: 300, w: 900, h: 620, c: "rgba(70,170,233,.42)" }, { x: 140, y: 620, w: 700, h: 520, c: "rgba(58,134,232,.32)" }, { x: 1300, y: -120, w: 520, h: 420, c: "rgba(191,227,250,.18)" }, ]) .map((gl) => `
`) .join(""); return `