5xYourTeam card + Draft Day art (2026-11-15, LOCAL ONLY): kie.ai tier frames, Envato rings/medals/holo/back, Draft Day confetti/spotlights/scoreboard, Champiun
- Trading cards: five kie.ai nano-banana-pro tier frames (Rookie steel, Starter silver, Pro gold trim, All-Star gold + holo, Hall of Fame ornate gold + laurels), F4 avatar ring + B1 rank medal per tier, F5 holo foil on Pro/All-Star/HoF, sized in cqw - Card back from F1 (text layers hidden, green re-tinted gold): tap/Enter flips a card to the stats layout (team, how drafted, milestone, games played, the tier ladder); landscape, takes two grid slots. Milestones only, never earnings. - Draft Day 1080 card: D2 spotlights, D1 gold confetti, D5 scoreboard plate (blank) for the totals - Champiun (T3, Basic Latin WOFF subset) only for the ON THE CLOCK headline and pick numbers - tools/derive-art.py builds the web derivatives from ../assets-src (raw packs stay out of public/); public/art/MANIFEST.md maps each file to its source item, author and license code; tools/art.mjs renders kit/OG/proof/tier art with the same cards - ?v= tags bumped to 2; unit 62/62, smoke 156/156 (UI_FONTS=1), iap-tank 23/23 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+11
-9
@@ -24,19 +24,21 @@ body{background:#0b1530;color:#fff;font-family:Inter,sans-serif;position:relativ
|
||||
.g{color:#ffc93c}.tag{display:inline-block;background:#ff4d4d;color:#fff;font-family:Oswald,sans-serif;letter-spacing:2px;white-space:nowrap}
|
||||
.cta{display:inline-block;background:#ffc93c;color:#0b1530;font-family:Oswald,sans-serif;letter-spacing:1px;text-transform:uppercase;white-space:nowrap}
|
||||
.stripes{position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 9.5%,rgba(255,255,255,.045) 9.5% 10%);pointer-events:none}
|
||||
.tc{border-style:solid;display:flex;flex-direction:column;color:#0b1530}.tc .t{font-family:Oswald,sans-serif;letter-spacing:3px;text-align:center}.tc .f{display:flex;align-items:center;justify-content:center;font-family:Oswald,sans-serif}`;
|
||||
`;
|
||||
const WM = px => `<span class="wm" style="font-size:${px}px">5X<b>YOUR</b>TEAM</span>`;
|
||||
const TIERS = { rookie: ['ROOKIE', '#e5e9f4', '#9aa6c4', '#0b1530', '#c6cde0', '#4a587e', 'Drafted'], starter: ['STARTER', '#eaf6ef', '#1f8a5b', '#fff', '#bfe3cf', '#1f5c40', 'Wallet linked'],
|
||||
pro: ['PRO', '#e8eefc', '#2f5be0', '#fff', '#c3d2fa', '#1d3a96', 'Payouts switched on'], allstar: ['ALL-STAR', '#fff7df', '#ffc93c', '#0b1530', '#ffe8a3', '#7a5a00', 'First purchase'],
|
||||
hof: ['HALL OF FAME', '#1a1030', '#ffc93c', '#0b1530', '#2a1a4a', '#ffc93c', 'Built a team of their own'] };
|
||||
// one trading card at scale f (base 220 x 380)
|
||||
// one trading card at scale f (base 220 wide, 2:3): the same front as the site's FX.card (public/assets/common.js), with the
|
||||
// card CSS lifted from public/assets/fx.css and its /art/tc images inlined as data URIs (setContent pages have no origin)
|
||||
const FXCSS = fs.readFileSync(path.join(APP, 'public', 'assets', 'fx.css'), 'utf8');
|
||||
const CARDCSS = ':root{--disp:Oswald,Impact,sans-serif;--gold:#ffc93c;--red:#ff4d4d}' + FXCSS.slice(FXCSS.indexOf('/* Art (public/art/tc'), FXCSS.indexOf('/* Champiun'))
|
||||
.replace(/url\((\/art\/tc\/[\w.-]+)\)/g, (m, u) => 'url(data:image/' + (u.endsWith('.png') ? 'png' : 'jpeg') + ';base64,' + fs.readFileSync(path.join(APP, 'public', u)).toString('base64') + ')');
|
||||
const ini = u => String(u || '').replace(/[^A-Za-z0-9]/g, '').slice(0, 2).toUpperCase() || '?';
|
||||
function tcard(tier, name, team, f) {
|
||||
const [lab, bg, bd, ink, face, fink, ms] = TIERS[tier];
|
||||
const hof = tier === 'hof';
|
||||
return `<div class="tc" style="width:${220 * f}px;height:${380 * f}px;background:${bg};border-width:${6 * f}px;border-color:${bd};${tier === 'allstar' ? `box-shadow:0 0 0 ${3 * f}px #0b1530,0 0 ${24 * f}px rgba(255,201,60,.6);` : hof ? `box-shadow:0 0 0 ${3 * f}px #ff4d4d;` : ''}color:${hof ? '#fff' : '#0b1530'}">
|
||||
<div class="t" style="background:${hof ? 'linear-gradient(90deg,#ffc93c,#ff4d4d)' : bd};color:${ink};font-size:${15 * f}px;padding:${6 * f}px">${lab}</div>
|
||||
<div class="f" style="height:${150 * f}px;background:${face};color:${fink};font-size:${48 * f}px">${name.slice(0, 2).toUpperCase()}</div>
|
||||
<div style="padding:${12 * f}px;display:flex;flex-direction:column;gap:${4 * f}px;font-size:${13 * f}px"><b style="font-family:Oswald,sans-serif;font-size:${20 * f}px">@${name}</b><span>Team @${team}</span><span>${ms}</span></div></div>`;
|
||||
const [lab, , , , , , ms] = TIERS[tier];
|
||||
return `<div style="width:${220 * f}px;flex:0 0 auto"><article class="tc ${tier}"><div class="fr"><div class="tier">${lab}</div><div class="face"><span>${ini(name)}</span></div><i class="medal"></i>
|
||||
<div class="info"><b>@${name}</b><span>Team @${team}</span><span>${ms}</span></div></div></article></div>`;
|
||||
}
|
||||
const ANG = {
|
||||
draft: { k: 'EVERY MONDAY', h1: 'Draft your team', h2: 'every Monday', s: 'Coaches draft people who joined the network without a sponsor. Draft order is earned.', cta: 'Get a position' },
|
||||
@@ -79,7 +81,7 @@ const coachHtml = () => `<body style="display:flex;padding:0;background:#fff"><d
|
||||
|
||||
async function shot(browser, html, file, w, h, fonts) {
|
||||
const pg = await browser.newPage({ viewport: { width: w, height: h } });
|
||||
await pg.setContent('<!doctype html><html><head><meta charset="utf-8">' + (fonts ? FONTS : '') + '<style>' + BASE + '</style></head>' + html + '</html>', { waitUntil: 'load' });
|
||||
await pg.setContent('<!doctype html><html><head><meta charset="utf-8">' + (fonts ? FONTS : '') + '<style>' + BASE + CARDCSS + '</style></head>' + html + '</html>', { waitUntil: 'load' });
|
||||
await pg.evaluate(() => document.fonts && document.fonts.ready).catch(() => {});
|
||||
await pg.screenshot({ path: file, clip: { x: 0, y: 0, width: w, height: h } }); await pg.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user