Files
linkspin/tools/promo-kit-wide.cjs
T
martbost e62545994f Promo tools: 600x300 wide cards for both LinkSpin angles
Member request (600x300 and 250x250; the 250x250 square already existed).
ls-wide-a / ls-wide-b in a new 600x300 group in the Banners pill, rendered by
tools/promo-kit-wide.cjs from the kit's own art and fonts. my.js?v bumped,
chatbot promo-tools fact updated. QA member run: 0 bugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 10:28:28 -06:00

43 lines
3.5 KiB
JavaScript

// LinkSpin promo kit: the 600x300 wide cards (member request, Marty 2026-11-18), one per angle the kit already has
// (A "One link. Every page you promote." and B "Paid the moment they buy."). The kie.ai masters that promo-kit-compose.py
// crops are not on disk any more, so the art here is the text-free right side of ls-social-a.jpg (x 700 to 1200, the ring's
// branches and glass panels), with the copy typeset in the kit's own fonts (Rajdhani display, Manrope body) and colours.
// Output -> public/kit/ls-wide-a.png, ls-wide-b.png (neutral names, no IAB size tokens). No earnings or POL figures.
// node tools/promo-kit-wide.cjs
const path = require('path');
const fs = require('fs');
const { chromium } = require('D:/Projects/MarketingAgent/qa-tester/node_modules/playwright');
const KIT = path.join(__dirname, '..', 'public', 'kit');
const ART = 'data:image/jpeg;base64,' + fs.readFileSync(path.join(KIT, 'ls-social-a.jpg')).toString('base64');
const ANG = {
a: { head: ['ONE LINK.', 'EVERY PAGE', 'YOU PROMOTE.'], sub: 'Spin links, bridge pages and an ad slot for your site. Free.' },
b: { head: ['PAID THE', 'MOMENT THEY', 'BUY.'], sub: 'Half of every ad package in your line, same transaction, on Polygon.' }
};
const html = a => `<!doctype html><html><head><meta charset="utf-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@700&family=Manrope:wght@600;700&display=block">
<style>*{box-sizing:border-box;margin:0}html,body{width:600px;height:300px;overflow:hidden}
body{background:#070c18;font-family:Manrope,sans-serif;color:#ecf2fa;position:relative}
.art{position:absolute;right:0;top:0;width:300px;height:300px;background:url(${ART}) -422px -40px/auto 380px no-repeat}
.art::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#070c18 0%,rgba(7,12,24,.55) 30%,rgba(7,12,24,0) 60%)}
.glow{position:absolute;left:-80px;top:-90px;width:420px;height:320px;border-radius:50%;background:radial-gradient(circle,rgba(59,157,255,.14),transparent 65%)}
.c{position:absolute;left:32px;top:24px;bottom:26px;width:330px;display:flex;flex-direction:column}
.wm{font-weight:700;font-size:22px}.wm b{color:#3b9dff;font-weight:700}
.h{font-family:Rajdhani,sans-serif;font-weight:700;font-size:44px;line-height:.9;letter-spacing:1px;margin-top:14px}.h span{display:block}.h span:last-child{color:#ff6a1a}
.s{font-size:14px;line-height:1.4;color:#b0c0d8;margin-top:12px}
.btn{margin-top:auto;align-self:flex-start;background:#ff6a1a;color:#fff;font-family:Rajdhani,sans-serif;font-weight:700;font-size:21px;padding:6px 15px;border-radius:6px}
</style></head><body><div class="glow"></div><div class="art"></div><div class="c"><div class="wm">Link<b>Spin</b></div>
<div class="h">${a.head.map(l => '<span>' + l + '</span>').join('')}</div><div class="s">${a.sub}</div><span class="btn">Join free</span></div></body></html>`;
(async () => {
const browser = await chromium.launch();
for (const [k, a] of Object.entries(ANG)) {
const pg = await browser.newPage({ viewport: { width: 600, height: 300 }, deviceScaleFactor: 1 });
await pg.setContent(html(a), { waitUntil: 'networkidle' });
await pg.evaluate(async () => { await document.fonts.ready; await document.fonts.load('700 20px Rajdhani'); await document.fonts.load('700 20px Manrope'); });
const out = path.join(KIT, 'ls-wide-' + k + '.png');
await pg.screenshot({ path: out, clip: { x: 0, y: 0, width: 600, height: 300 } }); await pg.close(); console.log('wrote', out);
}
await browser.close();
})();