Promo kit: add 600x300 wide and 250x250 small creatives for all 3 angles

Member request. art.mjs gains layouts for both and ONLY=<shapes> to render
just those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-18 09:55:53 -06:00
parent 7d5e925b5c
commit 444b08ddac
8 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ 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'], panel: [336, 280, 'Large box'],
tower: [160, 600, 'Skyscraper'], social: [1200, 630, 'Social share'], square: [1080, 1080, 'Square post'] };
tower: [160, 600, 'Skyscraper'], social: [1200, 630, 'Social share'], square: [1080, 1080, 'Square post'],
wide: [600, 300, 'Wide card'], small: [250, 250, 'Small square'] };
const ANGLES = { free: 'Post a free text ad', tree: 'Watch your ad travel', boost: 'Boost the source' };
function copy() {
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

+10 -1
View File
@@ -44,6 +44,13 @@ function kit(angle, shape) {
const tall = h > w * 2;
return page(w, h, `<div style="display:flex;flex-direction:column;align-items:center;justify-content:${tall ? 'space-between' : 'center'};height:100%;padding:${tall ? 24 : 8}px 8px;text-align:center;gap:6px">${mk(tall ? 54 : 34)}<div class="h" style="font-size:${tall ? 30 : 15}px">${a.t}</div>${tall ? `<div style="font-size:16px">${a.s}</div>` : ''}<div class="wm" style="font-size:${tall ? 18 : 11}px">ViralAd<b>Source</b></div>${tall ? `<span class="btn" style="font-size:15px;padding:10px 12px">${a.cta}</span>` : ''}</div>`, cls === 'ink' ? 'ink' : '');
}
if (shape === 'small') return page(w, h, `<div style="display:flex;flex-direction:column;justify-content:space-between;height:100%;padding:18px">
<div class="wm" style="font-size:17px;display:flex;align-items:center;gap:6px">${mk(24)}<span>ViralAd<b>Source</b></span></div>
<div class="h" style="font-size:38px">${a.t}</div><div><span class="btn" style="font-size:15px;padding:9px 14px">${a.cta}</span></div></div>`, cls === 'ink' ? 'ink' : '');
if (shape === 'wide') return page(w, h, `<div style="display:flex;flex-direction:column;justify-content:space-between;height:100%;padding:26px 30px;max-width:${cls === 'ink' ? w : 390}px">
<div class="wm" style="font-size:20px;display:flex;align-items:center;gap:8px">${mk(28)}<span>ViralAd<b>Source</b></span></div>
<div><div class="m" style="font-size:12px;color:${cls === 'ink' ? '#FF9479' : '#0B5A57'};margin-bottom:6px">${a.k}</div><div class="h" style="font-size:44px">${a.t}</div><div style="font-size:16px;margin-top:8px">${a.s}</div></div>
<div><span class="btn" style="font-size:16px;padding:9px 18px">${a.cta}</span></div></div>`, cls);
const big = Math.min(w, h); const pad = Math.round(big * .07);
return page(w, h, `<div style="display:flex;flex-direction:column;justify-content:space-between;height:100%;padding:${pad}px;max-width:${w > h * 1.4 ? Math.round(w * .62) : w}px">
<div class="wm" style="font-size:${Math.round(big * .065)}px;display:flex;align-items:center;gap:8px">${mk(Math.round(big * .09))}<span>ViralAd<b>Source</b></span></div>
@@ -56,7 +63,9 @@ const shots = [
['proof/vas-proof-river.png', 1200, 630, page(1200, 630, `<div style="display:flex;flex-direction:column;justify-content:space-between;height:100%;padding:60px;max-width:760px"><div class="wm" style="font-size:40px;display:flex;align-items:center;gap:10px">${MARK(54)}<span>ViralAd<b>Source</b></span></div><div><div class="m" style="font-size:22px;color:#0B5A57">Paid on chain</div><div class="h" style="font-size:84px">A Boost flowed back to the branch that sold it.</div></div><div style="font-size:24px">Resharer, sponsor line, reward pot: one transaction. Verify it on Polygonscan.</div></div>`, 'river')],
['proof/vas-proof-ink.png', 1200, 630, page(1200, 630, `<div style="display:flex;flex-direction:column;justify-content:space-between;height:100%;padding:60px"><div class="wm" style="font-size:40px;display:flex;align-items:center;gap:10px">${MARKL(54)}<span>ViralAd<b>Source</b></span></div><div><div class="m" style="font-size:22px;color:#FF9479">Live ledger</div><div class="h" style="font-size:90px">Every ad has a source.<br>Every payment has a proof.</div></div><div style="font-size:24px;color:#B9DCD7">Results are rewarded, never a bare share.</div></div>`, 'ink')]
];
for (const angle of Object.keys(ANG)) for (const shape of Object.keys(SHAPES)) { const [w, h] = SHAPES[shape]; shots.push(['kit/vas-' + angle + '-' + shape + '.png', w, h, kit(angle, shape)]); }
const ONLY = (process.env.ONLY || '').split(',').filter(Boolean); // render just these kit shapes
if (ONLY.length) shots.length = 0;
for (const angle of Object.keys(ANG)) for (const shape of Object.keys(SHAPES)) { if (ONLY.length && !ONLY.includes(shape)) continue; const [w, h] = SHAPES[shape]; shots.push(['kit/vas-' + angle + '-' + shape + '.png', w, h, kit(angle, shape)]); }
const browser = await chromium.launch();
const pg = await browser.newPage();
for (const [file, w, h, html] of shots) {