Promo kit: add 336x280 (Large box) and 120x600 (Narrow skyscraper) 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/kit-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:
martbost
2026-11-16 04:56:19 -06:00
parent ffb4275683
commit 046b3068cb
9 changed files with 39 additions and 14 deletions
+3 -3
View File
@@ -12,8 +12,8 @@ const C = require('./config').get();
const netsites = require('./netsites'); // tracked links: LinkSpin network link for this site, ?src=<this site> (2026-11-14)
const KIT_DIR = path.join(__dirname, 'public', 'art', 'kit');
const SHAPES = { tile: [125, 125, 'Square button'], strip: [468, 60, 'Strip (board size)'], leader: [728, 90, 'Leaderboard'], box: [300, 250, 'Box'],
tower: [160, 600, 'Skyscraper'], social: [1200, 630, 'Social share'], square: [1080, 1080, 'Square post'] };
const SHAPES = { tile: [125, 125, 'Square button'], strip: [468, 60, 'Strip (board size)'], leader: [728, 90, 'Leaderboard'], box: [300, 250, 'Box'], panel: [336, 280, 'Large box'],
tower: [160, 600, 'Skyscraper'], pillar: [120, 600, 'Narrow skyscraper'], social: [1200, 630, 'Social share'], square: [1080, 1080, 'Square post'] };
const ANGLES = {
spot: 'A $5 spot, 300 guaranteed views',
line: '10 levels pay as spots sell after yours',
@@ -76,7 +76,7 @@ function kit(u) {
// the same page through LinkSpin (Marty 2026-11-14: each network site its own traffic source): counted under this site, lands with ?ref=
const track = seg => netsites.tracked('dlb', 'dlb', { s1: ref, s2: seg });
return {
v: 1, site: C.site, name: 'Downline Banners', updated: '2026-11-14', username: ref || null,
v: 1, site: C.site, name: 'Downline Banners', updated: '2026-11-16', username: ref || null,
tagline: 'Banner real estate in one line, paid instantly on-chain.',
links: [
{ key: 'home', label: 'Your link (home page)', url: link, tracked: track('') },
Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

+2 -2
View File
@@ -158,7 +158,7 @@ async function main() {
ok(k.lines.length === 5 && k.headlines.length === 3 && k.posts.length === 2 && k.email && k.email.body.includes('?ref=alpha'), 'promo kit: 5 lines, 3 headlines, 1 email, 2 posts, link filled in');
const words = JSON.stringify([k.lines, k.headlines, k.email, k.posts, k.note, k.tagline]);
ok(!/[—–]/.test(words) && !/passive income|guaranteed (income|returns|profit|earnings)|earn (cash|money)|make money/i.test(words) && /300 guaranteed views/.test(words) && /30%/.test(words) && /5\.5%/.test(words), 'promo kit copy: no dashes, no income promises, facts match the contract (300 views, 30%, 5.5%)');
ok(k.creatives.length === 21 && new Set(k.creatives.map(c => c.angle)).size === 3, 'promo kit: 21 creatives in 3 angles', k.creatives.length);
ok(k.creatives.length === 27 && new Set(k.creatives.map(c => c.angle)).size === 3, 'promo kit: 27 creatives in 3 angles', k.creatives.length);
const badName = k.creatives.filter(c => /\d{2,4}x\d{2,4}|banner|[-_/]ads?[-_./]/i.test(c.url.replace('https://downlinebanners.com', '')));
ok(badName.length === 0, 'promo kit: creative paths are ad-blocker neutral', badName.map(c => c.url));
const bad = [];
@@ -317,7 +317,7 @@ async function main() {
const foot = await pg.textContent('footer').catch(() => ''); ok(/Part of the Crypto Team Build Network/.test(foot || ''), 'member ' + p + ' renders with footer');
if (p === '/my') { await pg.waitForSelector('#dash:not([hidden])', { timeout: 8000 }).catch(() => {}); ok(await pg.isVisible('#dash'), '/my dashboard visible'); ok((await pg.$$('.spot-ed')).length >= 3, '/my spot editors listed'); }
if (p === '/promote') { await pg.waitForSelector('#kit .kit-fig img', { timeout: 8000 }).catch(() => {}); const kt = await pg.textContent('#kit'); const who = await pg.inputValue('#whoIn');
ok(!!who && kt.includes('?ref=' + who) && (await pg.$$('#kit .kit-set:not([hidden]) .kit-fig')).length === 7, '/promote shows the kit with the signed-in member link (' + who + ')'); ok(!!(await pg.$('nav a[href="/promote"]')), 'nav links to Promote');
ok(!!who && kt.includes('?ref=' + who) && (await pg.$$('#kit .kit-set:not([hidden]) .kit-fig')).length === 9, '/promote shows the kit with the signed-in member link (' + who + ')'); ok(!!(await pg.$('nav a[href="/promote"]')), 'nav links to Promote');
await pg.waitForTimeout(500); await pg.screenshot({ path: path.join(OUT, 'member-promote.png'), fullPage: true });
await pg.setViewportSize({ width: 390, height: 844 }); await pg.waitForTimeout(300); await pg.screenshot({ path: path.join(OUT, 'member-promote-phone.png'), fullPage: true }); }
if (p === '/join') { await pg.waitForSelector('#buyCard:not([hidden])', { timeout: 8000 }).catch(() => {}); const price = await pg.textContent('#price'); ok(/^0\.0025/.test(price), '/join shows price ' + price); }
+34 -9
View File
@@ -1,6 +1,8 @@
// Promo kit art for Downline Banners and Viral Banner Blitz (2026-11-14). Renders every creative from HTML with Playwright so
// the text is crisp, at the exact pixel size of each slot. Same file in both repos (banner-line/app/tools, vbb/app/tools).
// node tools/kit-art.mjs dlb|vbb|all
// node tools/kit-art.mjs dlb|vbb|all [shape,shape...] (a shape list renders only those shapes, e.g. panel,pillar)
// Env DLB_APP / VBB_APP = the app folder to read the mark from and write into (default the repos under D:/Projects/HighRisk).
// Shapes per site: DLB also has pillar (120x600, Marty 2026-11-16); panel (336x280) on both.
// Output: <app>/public/art/kit/<site>-<angle>-<shape>.png. Neutral names on purpose: no IAB size tokens, no "banner"/"ad"
// (EasyList hides those). The copy here must match the facts in each app (DLB SPEC.md + contract, VBB config.js + how.html).
import { pathToFileURL } from 'url';
@@ -10,12 +12,14 @@ const PW = process.env.PLAYWRIGHT || 'D:/Projects/MarketingAgent/qa-tester/node_
const pwm = await import(pathToFileURL(PW).href); const chromium = pwm.chromium || (pwm.default && pwm.default.chromium);
const ROOT = 'D:/Projects/HighRisk';
const SHAPES = { tile: [125, 125], strip: [468, 60], leader: [728, 90], box: [300, 250], tower: [160, 600], social: [1200, 630], square: [1080, 1080] };
const SHAPES = { tile: [125, 125], strip: [468, 60], leader: [728, 90], box: [300, 250], panel: [336, 280], tower: [160, 600], pillar: [120, 600], social: [1200, 630], square: [1080, 1080] };
const SITE_SHAPES = { dlb: Object.keys(SHAPES), vbb: Object.keys(SHAPES).filter(k => k !== 'pillar') };
const APPS = { dlb: process.env.DLB_APP || ROOT + '/banner-line/app', vbb: process.env.VBB_APP || ROOT + '/vbb/app' };
const SITES = {
dlb: {
out: ROOT + '/banner-line/app/public/art/kit', domain: 'downlinebanners.com', name: ['Downline', 'Banners'],
mark: fs.readFileSync(ROOT + '/banner-line/app/public/art/mark.svg', 'utf8'),
out: APPS.dlb + '/public/art/kit', domain: 'downlinebanners.com', name: ['Downline', 'Banners'],
mark: fs.readFileSync(APPS.dlb + '/public/art/mark.svg', 'utf8'),
fonts: 'family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=Inter:wght@500;600;700',
angles: {
spot: { eyebrow: '$5 spot', h1: 'A $5 spot.', h2: '300 guaranteed views.', line: 'A $5 spot. 300 guaranteed views.', sub: 'Your banner on the board, paid on-chain on Polygon.', cta: 'Get a spot', tA: '$5 spot', tB: '300 views', chips: ['$5 spot', '300 guaranteed views', 'Paid on-chain'] },
@@ -24,8 +28,8 @@ const SITES = {
}
},
vbb: {
out: ROOT + '/vbb/app/public/art/kit', domain: 'viralbannerblitz.com', name: ['Viral Banner', 'Blitz'],
mark: fs.readFileSync(ROOT + '/vbb/app/public/art/mark.svg', 'utf8'),
out: APPS.vbb + '/public/art/kit', domain: 'viralbannerblitz.com', name: ['Viral Banner', 'Blitz'],
mark: fs.readFileSync(APPS.vbb + '/public/art/mark.svg', 'utf8'),
fonts: 'family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@500;700&family=Space+Mono:wght@700',
angles: {
free: { eyebrow: 'Free daily post', h1: 'Post a banner', h2: 'free every day.', line: 'Post a banner free every day', sub: 'InstantAdPay and LinkSpin members get a free post credit each day they sign in.', cta: 'Post yours', tA: 'FREE', tB: 'daily post', chips: ['125x125 banners', 'Free daily post', 'No subscription'] },
@@ -36,8 +40,8 @@ const SITES = {
};
const esc = s => String(s).replace(/[&<>"]/g, c => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]));
// shrink every .fit element until its text fits its box (one line or the box height)
const FIT = `<script>window.__fit=()=>{document.querySelectorAll('.fit').forEach(el=>{let s=parseFloat(getComputedStyle(el).fontSize);let n=0;while((el.scrollWidth>el.clientWidth+1||el.scrollHeight>el.clientHeight+s*0.2)&&s>6&&n++<200){s-=0.5;el.style.fontSize=s+'px';}});};</script>`;
// shrink every .fit element until its text fits its box (one line or the box height); .wfit (wrapping) until its longest word fits
const FIT = `<script>window.__fit=()=>{document.querySelectorAll('.fit').forEach(el=>{let s=parseFloat(getComputedStyle(el).fontSize);let n=0;while((el.scrollWidth>el.clientWidth+1||el.scrollHeight>el.clientHeight+s*0.2)&&s>6&&n++<200){s-=0.5;el.style.fontSize=s+'px';}});document.querySelectorAll('.wfit').forEach(el=>{let s=parseFloat(getComputedStyle(el).fontSize);let n=0;while(el.scrollWidth>el.clientWidth+1&&s>8&&n++<100){s-=0.5;el.style.fontSize=s+'px';}});};</script>`;
function dlbCss() {
return `
@@ -121,6 +125,25 @@ function body(site, a, shape) {
.b .sub{font-size:12.5px;line-height:1.35}
.b .cta{font-size:15px;padding:10px 16px;margin-top:auto;align-self:flex-start} ${d ? '' : 'body{--edge:3px;--stroke:.5px;--ts:1.5px}'}
</style><div class="b"><div class="top">${m}${wm}</div><span class="eb">${esc(a.eyebrow)}</span><div class="h disp fit"><span>${esc(a.h1)}</span>${h2.replace('<span class="', '<span class="') }</div><div class="sub">${esc(a.sub)}</div><span class="cta">${esc(a.cta)} &rarr;</span></div>`;
case 'panel': return `<style>
.b{position:absolute;inset:0;display:flex;flex-direction:column;padding:18px 20px;gap:10px}
.b .top{display:flex;align-items:center;gap:9px} .b .mark{width:38px;height:38px;flex:none} .b .wm{font-size:19px}
.b .eb{font-size:11px;padding:4px 10px;align-self:flex-start}
.b .h{font-size:31px;width:100%;white-space:normal;max-height:68px} .b .h span{display:block;white-space:nowrap}
.b .sub{font-size:14px;line-height:1.35}
.b .bot{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:10px}
.b .cta{font-size:16px;padding:10px 17px} .b .dom{font-size:11.5px;font-weight:700;opacity:.8;white-space:nowrap}
${d ? '' : 'body{--edge:3px;--stroke:.5px;--ts:1.5px}'}
</style><div class="b"><div class="top">${m}${wm}</div><span class="eb">${esc(a.eyebrow)}</span><div class="h disp fit"><span>${esc(a.h1)}</span>${h2}</div><div class="sub">${esc(a.sub)}</div><div class="bot"><span class="cta">${esc(a.cta)} &rarr;</span><span class="dom">${esc(S.domain)}</span></div></div>`;
case 'pillar': return `<style>
.v{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;text-align:center;padding:18px 8px 16px;gap:11px}
.v .mark{width:52px;height:52px} .v .wm{font-size:15px;white-space:normal;line-height:1.05}
.v .eb{font-size:8px;padding:4px 6px;letter-spacing:.06em;max-width:104px;white-space:normal;line-height:1.2}
.v .h{font-size:24px;line-height:1.05;white-space:normal;width:106px;overflow:hidden;overflow-wrap:normal} .v .h span{display:block}
.v .sub{font-size:12px;line-height:1.38}
.v .cta{font-size:13px;padding:9px 11px;margin-top:auto} .v .dom{font-size:9px;font-weight:700;opacity:.8}
${d ? '' : 'body{--edge:3px;--stroke:.6px;--ts:2px} .v .wm b{display:block}'}
</style><div class="v">${m}${d ? '<span class="wm">Downline<br><span class="g">Banners</span></span>' : '<span class="wm">Viral Banner <b>Blitz</b></span>'}<span class="eb">${esc(a.eyebrow)}</span><div class="h disp wfit"><span>${esc(a.h1)}</span>${h2}</div><div class="sub">${esc(a.sub)}</div><span class="cta">${esc(a.cta)}</span><div class="dom">${esc(S.domain)}</div></div>`;
case 'tower': return `<style>
.v{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;text-align:center;padding:22px 12px 20px;gap:12px}
.v .mark{width:64px;height:64px} .v .wm{font-size:17px;white-space:normal;line-height:1.05}
@@ -176,12 +199,14 @@ function page(site, angle, shape) {
}
const which = process.argv[2] || 'all';
const only = process.argv[3] ? process.argv[3].split(',') : null;
const browser = await chromium.launch();
const made = []; let file0;
for (const site of Object.keys(SITES)) {
if (which !== 'all' && which !== site) continue;
const S = SITES[site]; fs.mkdirSync(S.out, { recursive: true });
for (const angle of Object.keys(S.angles)) for (const shape of Object.keys(SHAPES)) {
for (const angle of Object.keys(S.angles)) for (const shape of SITE_SHAPES[site]) {
if (only && !only.includes(shape)) continue;
const [w, h] = SHAPES[shape];
const pg = await browser.newPage({ viewport: { width: w, height: h }, deviceScaleFactor: 1 });
await pg.setContent(page(site, angle, shape), { waitUntil: 'networkidle' });