diff --git a/promokit.js b/promokit.js index b3b8f49..b218cae 100644 --- a/promokit.js +++ b/promokit.js @@ -10,7 +10,7 @@ const C = require('./config').get(); const netsites = require('./netsites'); const KIT_DIR = path.join(__dirname, 'public', 'art', 'kit'); -const SHAPES = { tile: [125, 125, 'Square button'], strip: [468, 60, 'Strip'], leader: [728, 90, 'Leaderboard'], box: [300, 250, 'Box'], +const SHAPES = { tile: [125, 125, 'Square button'], strip: [468, 60, 'Strip'], leader: [728, 90, 'Leaderboard'], box: [300, 250, 'Box'], panel: [336, 280, 'Large box'], tower: [160, 600, 'Skyscraper'], social: [1200, 630, 'Social share'], square: [1080, 1080, 'Square post'] }; const ANGLES = { draft: 'The weekly draft', coach: 'Coach your picks', cards: 'Trading cards that level up' }; @@ -74,7 +74,7 @@ function kit(u) { const track = seg => netsites.tracked(C.siteId, C.siteId, { s1: ref, s2: seg }); const t = copy(); return { - v: 1, site: C.site, name: C.siteName, updated: '2026-11-15', username: ref || null, + v: 1, site: C.site, name: C.siteName, updated: '2026-11-16', username: ref || null, tagline: 'The weekly draft for people who need a sponsor.', links: [ { key: 'page', label: 'Your coach page', url: link, tracked: track('') }, diff --git a/public/art/kit/fx-cards-panel.png b/public/art/kit/fx-cards-panel.png new file mode 100644 index 0000000..f3dd661 Binary files /dev/null and b/public/art/kit/fx-cards-panel.png differ diff --git a/public/art/kit/fx-coach-panel.png b/public/art/kit/fx-coach-panel.png new file mode 100644 index 0000000..95c6a37 Binary files /dev/null and b/public/art/kit/fx-coach-panel.png differ diff --git a/public/art/kit/fx-draft-panel.png b/public/art/kit/fx-draft-panel.png new file mode 100644 index 0000000..4f92253 Binary files /dev/null and b/public/art/kit/fx-draft-panel.png differ diff --git a/qa/smoke.mjs b/qa/smoke.mjs index 89f00f9..3ee0c7b 100644 --- a/qa/smoke.mjs +++ b/qa/smoke.mjs @@ -205,7 +205,7 @@ async function main() { ok(k.links.every(l => /^https:\/\/linkspin\.app\/r\/nw5x\?src=fivex&s1=coachann/.test(l.tracked)), 'every link has a LinkSpin-tracked twin (nw5x, source fivex)', k.links.map(l => l.tracked)); const words = JSON.stringify([k.lines, k.headlines, k.email, k.posts, k.note, k.tagline]); ok(!/[\u2014\u2013]/.test(words) && !/passive income|guaranteed (income|returns|profit)|make money|metamask/i.test(words) && /\$10 one-time position gives you 5 picks right away/.test(words) && /SafePal or any other crypto wallet/.test(words) && /never a subscription/.test(words), 'kit copy: no dashes, no income promises, facts from config, SafePal wording, never a subscription'); - ok(k.creatives.length === 21 && new Set(k.creatives.map(c => c.angle)).size === 3, 'kit: 21 creatives in 3 angles', k.creatives.length); + ok(k.creatives.length === 24 && new Set(k.creatives.map(c => c.angle)).size === 3, 'kit: 24 creatives in 3 angles', k.creatives.length); const bad = k.creatives.filter(c => /\d{2,4}x\d{2,4}|banner|[-_/]ads?[-_./]/i.test(c.url.replace('https://5xyourteam.com', ''))); ok(!bad.length, 'kit: creative paths are ad-blocker neutral', bad.map(c => c.url)); let dimOk = true; const dimBad = []; for (const c of k.creatives) { const rr = await anon.req(new URL(c.url).pathname); const buf = Buffer.from(await rr.arrayBuffer()); const w = buf.readUInt32BE(16), h = buf.readUInt32BE(20); if (rr.status !== 200 || w !== c.w || h !== c.h) { dimOk = false; dimBad.push(c.key + ' ' + w + 'x' + h); } } diff --git a/tools/art.mjs b/tools/art.mjs index 3bdeb0b..ea0f58d 100644 --- a/tools/art.mjs +++ b/tools/art.mjs @@ -1,7 +1,8 @@ // Renders the site art with Playwright (local only, nothing is uploaded): the icon, the OG share image, the Telegram sale proof -// cards (public/art/proof/fx-proof-{navy,gold,field}.png), the promo kit (public/art/kit/fx--.png, 3 angles x 7 +// cards (public/art/proof/fx-proof-{navy,gold,field}.png), the promo kit (public/art/kit/fx--.png, 3 angles x 8 // shapes, ad-blocker-neutral names), the five trading-card tiers and a sample coach card (public/art/cards/), and, with // node tools/art.mjs --draftday http://127.0.0.1:3561 2026-11-16 +// (node tools/art.mjs --only panel renders only those kit shapes, comma list, and leaves the other art alone) // the Draft Day results card for that week from a running app (public/art/draftday/week-.png, the Telegram image). // Copy facts come from config.js; the look is the approved draft-night mockup (navy, gold, red tag, Oswald + Inter). import fs from 'node:fs'; @@ -95,11 +96,14 @@ if (ddIdx > 0) { const out = path.join(ART, 'draftday', 'week-' + week + '.png'); await pg.screenshot({ path: out, clip: { x: 0, y: 0, width: 1080, height: 1080 } }); console.log('draft day card', out); await browser.close(); process.exit(0); } -await shot(browser, iconHtml(), path.join(ART, 'icon-192.png'), 192, 192, true); -await shot(browser, ogHtml(), path.join(ART, 'og-share.png'), 1200, 630, true); -for (const v of ['navy', 'gold', 'field']) await shot(browser, proofHtml(v), path.join(ART, 'proof', 'fx-proof-' + v + '.png'), 1080, 1080, true); -await shot(browser, tiersHtml(), path.join(ART, 'cards', 'fx-tiers.png'), 1280, 460, true); -await shot(browser, coachHtml(), path.join(ART, 'cards', 'fx-coach-card.png'), 1200, 420, true); -for (const angle of Object.keys(ANG)) for (const [shape, [w, h]] of Object.entries(SHAPES)) await shot(browser, kitHtml(angle, shape, w, h), path.join(ART, 'kit', 'fx-' + angle + '-' + shape + '.png'), w, h, true); +const oi = process.argv.indexOf('--only'); const ONLY = oi > 0 ? process.argv[oi + 1].split(',') : null; +if (!ONLY) { + await shot(browser, iconHtml(), path.join(ART, 'icon-192.png'), 192, 192, true); + await shot(browser, ogHtml(), path.join(ART, 'og-share.png'), 1200, 630, true); + for (const v of ['navy', 'gold', 'field']) await shot(browser, proofHtml(v), path.join(ART, 'proof', 'fx-proof-' + v + '.png'), 1080, 1080, true); + await shot(browser, tiersHtml(), path.join(ART, 'cards', 'fx-tiers.png'), 1280, 460, true); + await shot(browser, coachHtml(), path.join(ART, 'cards', 'fx-coach-card.png'), 1200, 420, true); +} +for (const angle of Object.keys(ANG)) for (const [shape, [w, h]] of Object.entries(SHAPES)) if (!ONLY || ONLY.includes(shape)) await shot(browser, kitHtml(angle, shape, w, h), path.join(ART, 'kit', 'fx-' + angle + '-' + shape + '.png'), w, h, true); await browser.close(); console.log('art rendered');