// Renders the site art with Playwright (local only): the icon, the OG share image, the Telegram proof cards // (public/art/proof/vab-proof-{royal,daylight,navy}.png) and the promo kit (public/art/kit/vab--.png, 3 angles x 8 // shapes, ad-blocker-neutral names). Copy facts come from config.js (Boost price + views) and promokit.js (angles, shapes). // The look is the site's "daylight cyberpunk" (approved 2026-11-14): royal blue panels, gold, red pill CTA, slanted condensed type. // node tools/art.mjs (PLAYWRIGHT = path to the playwright package) // node tools/art.mjs --only panel (only those kit shapes, comma list; the icon, OG and proof art are left alone) import fs from 'node:fs'; import path from 'node:path'; import { createRequire } from 'node:module'; import { fileURLToPath } from 'node:url'; const require = createRequire(import.meta.url); const APP = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); const PW = process.env.PLAYWRIGHT || 'D:/Projects/MarketingAgent/qa-tester/node_modules/playwright'; const { chromium } = require(PW); const C = require(path.join(APP, 'config.js')).get(); const { SHAPES } = require(path.join(APP, 'promokit.js')); const ART = path.join(APP, 'public', 'art'); fs.mkdirSync(path.join(ART, 'kit'), { recursive: true }); fs.mkdirSync(path.join(ART, 'proof'), { recursive: true }); const FONTS = ''; const BASE = `*{box-sizing:border-box;margin:0}html,body{width:100%;height:100%;overflow:hidden} body{background:#0A2FA8;color:#fff;font-family:Inter,sans-serif;position:relative} body>*{position:relative}body>.net{position:absolute;inset:0;width:100%;height:100%;opacity:.22} .wm{font-family:'Chakra Petch',sans-serif;font-weight:700;letter-spacing:.02em;white-space:nowrap}.wm b{color:#E3141E}.wm.ondark b{color:#FFC21A} .mono{font-family:'JetBrains Mono',monospace;font-weight:700} .disp{font-family:'Barlow Condensed',sans-serif;font-weight:800;font-style:italic;text-transform:uppercase;line-height:.92} .gold{color:#FFC21A}.sh{text-shadow:3px 3px 0 #061A66}.shg{text-shadow:2px 2px 0 #8A5A00,4px 4px 0 #061A66} .tick{background:#0A1F6B;border-bottom:3px solid #3D8BFF;color:#E9FBFF;font-family:'JetBrains Mono',monospace;white-space:nowrap;overflow:hidden} .tick b{color:#FFC21A}.tick i{font-style:normal;color:#7DB2FF} .pill{display:inline-block;background:#E3141E;color:#fff;border:3px solid #fff;border-radius:999px;font-family:'Barlow Condensed',sans-serif;font-weight:800;font-style:italic;text-transform:uppercase;box-shadow:0 4px 0 #8E0C12;white-space:nowrap;line-height:1.05} .rib{display:inline-block;background:#E3141E;color:#fff;font-family:'Barlow Condensed',sans-serif;font-weight:800;font-style:italic;text-transform:uppercase;transform:skewX(-12deg);box-shadow:3px 3px 0 #061A66;white-space:nowrap} .cut{clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,8px 100%,0 calc(100% - 8px))} .scr{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff}.scr span{white-space:nowrap}`; const NET = ''; const WM = (px, dark) => `VIRALADBLITZ`; const views = Number(C.boost.views).toLocaleString('en-US'); const ANG = { free: { k: 'FREE FOR NETWORK MEMBERS', h1: 'Post your text ad', h2: 'free', s: 'It runs on your page and your team\'s pages.', cta: 'Post my free ad' }, spread: { k: 'FIVE LEVELS DEEP', h1: 'Spread your ad', h2: '5 levels deep', s: 'Everyone you bring in shows your ad, five levels down.', cta: 'Get my page' }, boost: { k: 'ONE-TIME BOOST', h1: '$' + C.boost.usd + ' Boost', h2: views + ' views', s: views + ' guaranteed network views. Starred on the live ticker. Never a subscription.', cta: 'Boost my ad' } }; const TICK = '★ BOOSTED One link for every offer · ▲ LIVE Free traffic tools for affiliates · ▲ LIVE Build a list with one page · '; const screens = f => `
YOUR ADlevel 1
YOUR ADyour page
YOUR ADlevel 5
`; function kitHtml(angle, shape, w, h) { const a = ANG[angle]; const m = Math.min(w, h); if (shape === 'tile') return `${NET}${WM(12, true)}
${angle === 'boost' ? '$' + C.boost.usd + ' =' : angle === 'free' ? 'Free' : '5 levels'}
${angle === 'boost' ? views + ' views' : angle === 'free' ? 'text ad' : 'deep'}
viraladblitz.com
`; if (shape === 'strip' || shape === 'leader') { const big = shape === 'leader'; return `${NET}
${WM(big ? 20 : 13, true)}
${a.k}
${a.h1} ${a.h2}
${a.cta} »`; } if (shape === 'tower') return `${NET}
${TICK}
${WM(17, true)}
${a.k}
${a.h1}
${a.h2}
${a.s}
${screens(.62)}
${a.cta} »
viraladblitz.com
`; // box, panel (336x280, scaled from the box), social, square const f = m / 250; const wide = shape === 'social'; return `${NET}
${TICK + TICK}
${WM(Math.round(15 * f), true)}
${a.h1}
${a.h2}
${a.k}
${a.s}
${a.cta} »viraladblitz.com
${wide ? `
${screens(f * 1.05)}
` : ''}
`; } function proofHtml(variant) { const V = { royal: { bg: '#0A2FA8', ink: '#fff', acc: '#FFC21A' }, daylight: { bg: '#EAF0FF', ink: '#0A1F6B', acc: '#C4111A' }, navy: { bg: '#0A1F6B', ink: '#fff', acc: '#FFC21A' } }[variant]; return `${variant === 'daylight' ? '' : NET}
${TICK + TICK}
${WM(48, variant !== 'daylight')}PAID ON-CHAIN
A Boost was just
paid out on-chain
Up to 5 sponsor levels x 10% · same transaction
Every Boost and every payout: viraladblitz.com/ledger
`; } const ogHtml = () => `${NET}
${TICK + TICK}
${WM(34, true)}
Spread your ad
5 levels deep
The network's text ad wire
Post your free text ad »
${screens(2.1)}
`; const iconHtml = () => ``; const oi = process.argv.indexOf('--only'); const ONLY = oi > 0 ? process.argv[oi + 1].split(',') : null; const browser = await chromium.launch(); let made = 0; async function shot(html, w, h, out) { const pg = await browser.newPage({ viewport: { width: w, height: h } }); await pg.setContent('' + FONTS + '' + html + '', { waitUntil: 'networkidle' }); await pg.evaluate(() => document.fonts.ready); await pg.screenshot({ path: out, clip: { x: 0, y: 0, width: w, height: h } }); await pg.close(); made++; } if (!ONLY) { await shot(iconHtml(), 192, 192, path.join(ART, 'icon-192.png')); await shot(ogHtml(), 1200, 630, path.join(ART, 'og-share.png')); for (const v of ['royal', 'daylight', 'navy']) await shot(proofHtml(v), 1200, 630, path.join(ART, 'proof', 'vab-proof-' + v + '.png')); for (const old of ['amber', 'cream', 'green']) { try { fs.unlinkSync(path.join(ART, 'proof', 'vab-proof-' + old + '.png')); } catch (e) {} } } for (const angle of Object.keys(ANG)) for (const [shape, [w, h]] of Object.entries(SHAPES)) if (!ONLY || ONLY.includes(shape)) await shot(kitHtml(angle, shape, w, h), w, h, path.join(ART, 'kit', 'vab-' + angle + '-' + shape + '.png')); await browser.close(); console.log(made + ' images rendered');