Restyle ViralAdBlitz to the approved "daylight cyberpunk" look (Marty 2026-11-14)

Replaces the dark ink-green/amber newsroom look Marty rejected as too dark.
Look only: routes, ids, copy facts and the trust pack are unchanged.

- vab.css rewritten around CSS variables: #EAF0FF ground, white clipped
  cards, royal #0A1F6B bands/ticker, #0A2FA8 hero panels with network
  lines, red pill CTA, gold Boost/boosted, Barlow Condensed / Chakra Petch /
  Inter / JetBrains Mono. [hidden] now always wins over display rules.
- Front page: slanted hero, ribbon, green-check list, rising bars, three
  YOUR AD screens, gold chips; board tabs (verified clicks / on the wire /
  boosted, from data the page already has); Boost band; ledger chips.
- Member page: own ad as a hero panel, level rows with LEVEL chips, royal
  join bar. Rows are now labelled LEVEL 1 to LEVEL 5 in display order
  (Marty's decision); the real place is kept in the API as depth.
- My page becomes the dashboard: side menu, stat cards, my-ad card with
  LIVE/BOOSTED badges and a folded editor, line bars, Boost ring, recent
  activity, payouts. All figures from /api/my, nothing estimated.
- Boost, ledger, contract, promote, legal and admin pages restyled; 404 too.
- Default JOIN_URL is now https://instantadpay.com/join/{ref} (no ref
  falls back to the InstantAdPay home page).
- New mark, icon, OG image, 21 kit creatives and 3 proof cards
  (royal/daylight/navy) rendered by tools/art.mjs; asset tags bumped to v=4.
- smoke.mjs: new headline, level/depth and join URL checks, UI_FONTS=1.

Tests: qa/smoke.mjs 162/162, qa/chain.mjs 20/20 (local anvil).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-14 15:17:30 -06:00
parent 001878bdae
commit d611c4b251
54 changed files with 797 additions and 414 deletions
+7 -6
View File
@@ -3,7 +3,7 @@
// Product: the network's text-ad home. A network member (signed in through InstantAdPay / LinkSpin, membership checked with the
// hub) posts one free text ad: a headline, two lines and an https link. Their page viraladblitz.com/<username> shows their ad plus
// the ads of the 5 people above them in their hub sponsor line, so recruiting spreads an ad 5 levels down. The front page: a live
// amber ticker (Boosted ads starred), "Top ads this week" by verified clicks, 3 steps, the live ledger, contract proof.
// royal ticker (Boosted ads starred), "Top ads this week" by verified clicks, 3 steps, the live ledger, contract proof.
// Boost: $5 one-time, 500 guaranteed network views (wire.js delivers and counts them), paid in POL through VABShop and split on
// chain 10% to each of 5 sponsor levels (pass-up to the next person who has boosted) + 50% company.
// Pages: / (front), /<username> (member page), /my, /boost, /ledger, /contract, /promote, /terms, /disclaimer, /privacy, /admin.
@@ -176,7 +176,7 @@ async function memberPage(name) {
if (line.length >= C.levels) break;
let a = p.wallet ? store.adOf(p.wallet) : null;
if (!a && p.username) { const lm = store.memberByName(p.username); if (lm) a = store.adOf(lm.address); }
if (a && a.status === 'live' && a.owner !== ownerAddr && !used.has(a.id)) { used.add(a.id); line.push({ level: p.depth, ad: a }); }
if (a && a.status === 'live' && a.owner !== ownerAddr && !used.has(a.id)) { used.add(a.id); line.push({ level: line.length + 1, depth: p.depth, ad: a }); } // LEVEL n = the nth row shown (Marty 2026-11-14); depth = real place
}
const boosted = wire.pickBoosted(C.boostSlots, used);
return { known: !!(local || person), hubOk: lo.ok, stale: !!lo.stale, ownerAddr, ownerName, ownAd, line, boosted };
@@ -190,7 +190,8 @@ function issueTicket(req, page, shownIds, ref, src) {
return t;
}
const todayStats = () => { const t = store.today(); return { views: t.views || 0, vclicks: t.vclicks || 0, boosts: t.boosts || 0, ads: store.liveAds().length }; };
const joinUrl = ref => C.joinUrl.split('{ref}').join(encodeURIComponent(ref || ''));
// with no ref, the join page without a sponsor: /join/{ref} becomes the site root, ?ref={ref} is dropped
const joinUrl = ref => ref ? C.joinUrl.split('{ref}').join(encodeURIComponent(ref)) : C.joinUrl.replace(/\/join\/\{ref\}.*$/, '/').replace(/[?&]ref=\{ref\}/, '').split('{ref}').join('');
// tracking macros in an ad link, filled on every click: {clickid} a fresh id, {placement} where it was clicked
const MACRO = /\{(clickid|placement)\}|%7B(clickid|placement)%7D/gi;
function clickLink(a, placement) {
@@ -269,7 +270,7 @@ const server = http.createServer(async (req, res) => {
if (!mp.known && mp.hubOk) return json(res, 404, { error: 'No network member by that name.' });
const boostedIds = new Set(wire.activeBoosts().map(b => b.adId));
out.page = { username: mp.ownerName, known: mp.known, hubOk: mp.hubOk, ad: mp.ownAd ? wire.adCard(mp.ownAd, boostedIds.has(mp.ownAd.id)) : null,
line: mp.line.map(x => Object.assign({ level: x.level }, wire.adCard(x.ad, boostedIds.has(x.ad.id)))), boosted: mp.boosted.map(a => wire.adCard(a, true)),
line: mp.line.map(x => Object.assign({ level: x.level, depth: x.depth }, wire.adCard(x.ad, boostedIds.has(x.ad.id)))), boosted: mp.boosted.map(a => wire.adCard(a, true)),
joinUrl: joinUrl(mp.ownerName) };
if (mp.ownAd) shown.push(mp.ownAd.id); mp.line.forEach(x => shown.push(x.ad.id)); mp.boosted.forEach(a => shown.push(a.id));
ref = mp.ownerAddr;
@@ -436,8 +437,8 @@ const server = http.createServer(async (req, res) => {
if (p.startsWith('/api/')) return json(res, 404, { error: 'Not found' });
res.writeHead(404, headers({ 'Content-Type': 'text/html; charset=utf-8' }));
return res.end('<!doctype html><meta name="viewport" content="width=device-width,initial-scale=1"><title>Not found | ViralAdBlitz</title><body style="background:#0a1712;color:#e8efe9;font-family:Georgia,serif;text-align:center;padding:40px 16px"><p style="font-size:22px">Not found.</p><p><a style="color:#ffb000;font-weight:700" href="/">Back to the wire</a></p>'
+ (ZONE_404 ? '<p style="color:#8fa89a;font-size:11px;margin:24px 0 4px">Network</p><script async src="https://linkspin.app/z.js" data-zone="' + ZONE_404 + '"></script>' : '') + '</body>');
return res.end('<!doctype html><meta name="viewport" content="width=device-width,initial-scale=1"><title>Not found | ViralAdBlitz</title><body style="background:#EAF0FF;color:#0A1F6B;font-family:Inter,system-ui,sans-serif;text-align:center;padding:40px 16px"><p style="font-size:22px;font-weight:700">Not found.</p><p><a style="color:#C4111A;font-weight:700" href="/">Back to the wire</a></p>'
+ (ZONE_404 ? '<p style="color:#3E4C7A;font-size:11px;margin:24px 0 4px">Network</p><script async src="https://linkspin.app/z.js" data-zone="' + ZONE_404 + '"></script>' : '') + '</body>');
} catch (e) {
console.error('request', p, e.message);
if (!res.headersSent) json(res, 500, { error: 'Server error' });