Promo kit: add 336x280 (Large box) for every angle (Marty 2026-11-16, Network Ad Space gaps)
New kit shapes rendered from HTML in the site's own look by tools/art.mjs (a shape list now renders only those shapes and leaves the other art alone). Listed in promokit.js SHAPES, so /promote, /api/promo-kit and InstantAdPay's Network sites tab show them. Smoke test counts updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -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 = { free: 'Post a free text ad', spread: 'Your ad on your team\'s pages, 5 levels deep', boost: 'Boost: guaranteed network views' };
|
||||
|
||||
@@ -75,7 +75,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-14', username: ref || null,
|
||||
v: 1, site: C.site, name: C.siteName, updated: '2026-11-16', username: ref || null,
|
||||
tagline: 'Your text ad on your whole team\'s pages, five levels deep.',
|
||||
links: [
|
||||
{ key: 'page', label: 'Your page', url: link, tracked: track('') },
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
+1
-1
@@ -226,7 +226,7 @@ async function main() {
|
||||
ok(k.links.every(l => /^https:\/\/linkspin\.app\/r\/nwvab\?src=viraladblitz&s1=smokeleader/.test(l.tracked)), 'every link has a LinkSpin-tracked twin (nwvab, source viraladblitz)', 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) && /\$5 one-time Boost buys 500 guaranteed network views/.test(words) && /SafePal or any other crypto wallet/.test(words), 'kit copy: no dashes, no income promises, Boost facts from config, SafePal wording');
|
||||
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://viraladblitz.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);
|
||||
|
||||
+11
-7
@@ -1,8 +1,9 @@
|
||||
// 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-<angle>-<shape>.png, 3 angles x 7
|
||||
// (public/art/proof/vab-proof-{royal,daylight,navy}.png) and the promo kit (public/art/kit/vab-<angle>-<shape>.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';
|
||||
@@ -50,7 +51,7 @@ function kitHtml(angle, shape, w, h) {
|
||||
return `<body style="display:flex;align-items:center;gap:${big ? 16 : 9}px;padding:0 ${big ? 16 : 9}px;border-bottom:3px solid #FFC21A">${NET}<div style="flex:0 0 auto">${WM(big ? 20 : 13, true)}</div><div style="flex:1;min-width:0"><div class="mono" style="font-size:${big ? 11 : 8}px;letter-spacing:1px;color:#7DB2FF">${a.k}</div><div class="disp" style="font-size:${big ? 36 : 22}px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"><span class="sh">${a.h1}</span> <span class="gold shg">${a.h2}</span></div></div><span class="pill" style="font-size:${big ? 21 : 13}px;padding:${big ? '6px 16px' : '3px 9px'};flex:0 0 auto;border-width:${big ? 3 : 2}px">${a.cta} »</span></body>`;
|
||||
}
|
||||
if (shape === 'tower') return `<body style="display:flex;flex-direction:column">${NET}<div class="tick" style="font-size:10px;padding:6px 4px">${TICK}</div><div style="padding:14px 12px;display:flex;flex-direction:column;gap:14px;flex:1">${WM(17, true)}<div class="mono" style="font-size:10px;letter-spacing:1px;color:#7DB2FF">${a.k}</div><div class="disp" style="font-size:38px"><span class="sh">${a.h1}</span><br><span class="gold shg">${a.h2}</span></div><div style="font-size:13px;color:#E3EBFF;line-height:1.4">${a.s}</div>${screens(.62)}<div style="margin-top:auto;text-align:center"><span class="pill" style="font-size:19px;padding:6px 12px;display:block">${a.cta} »</span><div class="mono" style="font-size:10px;margin-top:10px">viraladblitz.com</div></div></div></body>`;
|
||||
// box, social, square
|
||||
// box, panel (336x280, scaled from the box), social, square
|
||||
const f = m / 250; const wide = shape === 'social';
|
||||
return `<body style="display:flex;flex-direction:column">${NET}<div class="tick" style="font-size:${Math.round(10 * f)}px;padding:${Math.round(6 * f)}px ${Math.round(8 * f)}px">${TICK + TICK}</div>
|
||||
<div style="flex:1;padding:${Math.round(14 * f)}px ${Math.round(16 * f)}px;display:flex;gap:${Math.round(16 * f)}px;align-items:center">
|
||||
@@ -78,16 +79,19 @@ const ogHtml = () => `<body style="display:flex;flex-direction:column">${NET}<di
|
||||
<div style="flex:1">${screens(2.1)}</div></div></body>`;
|
||||
const iconHtml = () => `<body style="display:flex;align-items:center;justify-content:center;background:#EAF0FF"><img src="data:image/svg+xml;base64,${Buffer.from(fs.readFileSync(path.join(ART, 'mark.svg'))).toString('base64')}" style="width:192px;height:192px"></body>`;
|
||||
|
||||
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('<!doctype html><html><head><meta charset="utf-8">' + FONTS + '<style>' + BASE + '</style></head>' + html + '</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++;
|
||||
}
|
||||
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)) await shot(kitHtml(angle, shape, w, h), w, h, path.join(ART, 'kit', 'vab-' + angle + '-' + shape + '.png'));
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user