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:
+7
-6
@@ -181,7 +181,7 @@ async function main() {
|
||||
const anon = client();
|
||||
for (const p of ['/', '/my', '/boost', '/ledger', '/contract', '/promote', '/terms', '/disclaimer', '/privacy', '/admin', '/robots.txt', '/sitemap.xml', '/art/mark.svg', '/art/og-share.png', '/assets/vab.css', '/assets/common.js']) { const r = await anon.req(p); ok(r.status === 200, 'GET ' + p + ' 200', r.status); }
|
||||
let r = await anon.req('/'); const home = await r.text();
|
||||
ok(/Your ad runs on your whole team's pages\. Five levels deep\./.test(home) && /id="boardCards"/.test(home) && /og:image" content="https:\/\/viraladblitz\.com\/art\/og-share\.png/.test(home), 'front page: headline, board, Open Graph');
|
||||
ok(/<h1 class="slant"><span class="l1">Spread your ad<\/span> <span class="l2">5 levels deep<\/span><\/h1>/.test(home) && /id="boardCards"/.test(home) && /og:image" content="https:\/\/viraladblitz\.com\/art\/og-share\.png/.test(home), 'front page: "Spread your ad 5 levels deep" headline, board, Open Graph');
|
||||
ok(!r.headers.get('x-frame-options'), 'front page stays frameable (traffic exchanges)');
|
||||
r = await anon.req('/my'); ok(r.headers.get('x-frame-options') === 'DENY', '/my is never framed');
|
||||
ok(/script-src[^;]*https:\/\/linkspin\.app/.test(r.headers.get('content-security-policy') || ''), 'CSP admits linkspin.app (network zones)');
|
||||
@@ -201,7 +201,7 @@ async function main() {
|
||||
for (const c of k.creatives) { const rr = await anon.req(new URL(c.url).pathname); const buf = Buffer.from(await rr.arrayBuffer()); const w = buf.readUInt32BE(16), h = buf.readUInt32BE(20);
|
||||
if (rr.status !== 200 || w !== c.w || h !== c.h || !c.html.includes('href="https://viraladblitz.com/smokeleader"')) { dimOk = false; dimBad.push(c.key + ' ' + w + 'x' + h); } }
|
||||
ok(dimOk, 'kit: every creative is a PNG at its exact size and its HTML links to the member page', dimBad);
|
||||
const pr = await anon.req('/art/proof/vab-proof-amber.png'); ok(pr.status === 200 && pr.headers.get('content-type') === 'image/png', 'Telegram proof card image served'); }
|
||||
const pr = await anon.req('/art/proof/vab-proof-royal.png'); ok(pr.status === 200 && pr.headers.get('content-type') === 'image/png', 'Telegram proof card image served'); }
|
||||
|
||||
console.log('5. sign-in and network membership');
|
||||
// the hub line used through the test (nearest first above OWNER): L1 (ad) <- L2 (NO ad) <- L3 (ad, NO wallet in hub) <- L4 (ad) <- L5 (ad) <- L6 (ad) <- L7 (ad) <- TOP
|
||||
@@ -254,9 +254,9 @@ async function main() {
|
||||
r = await anon.req('/owner'); ok(r.status === 200 && /member\.js/.test(await r.text()) && /vab\.ref=owner/.test(String(r.headers.get('set-cookie'))), 'GET /owner serves the member page and remembers the referrer');
|
||||
let mp = await anon.json('/api/wire?page=member&u=owner');
|
||||
ok(mp.page && mp.page.ad && mp.page.ad.id === OWNAD && mp.page.username === 'owner', 'member page: the owner\'s own ad', mp.page && mp.page.ad);
|
||||
const lv = (mp.page.line || []).map(x => [x.level, x.owner]);
|
||||
ok(JSON.stringify(lv) === JSON.stringify([[1, '@one'], [4, '@four'], [5, '@five'], [6, '@six'], [7, '@seven']]), 'five upline ads, by place in the line: L2 (no ad) and L3 (no wallet) skipped, the 6th with an ad (topdog) not shown', lv);
|
||||
ok(mp.page.joinUrl === 'https://instantadpay.com/?ref=owner', 'join link: InstantAdPay under the page owner', mp.page.joinUrl);
|
||||
const lv = (mp.page.line || []).map(x => [x.level, x.depth, x.owner]);
|
||||
ok(JSON.stringify(lv) === JSON.stringify([[1, 1, '@one'], [2, 4, '@four'], [3, 5, '@five'], [4, 6, '@six'], [5, 7, '@seven']]), 'five upline ads labelled LEVEL 1 to 5 in display order (real places 1,4,5,6,7): place 2 (no ad) and place 3 (no wallet) skipped, the 6th with an ad (topdog) not shown', lv);
|
||||
ok(mp.page.joinUrl === 'https://instantadpay.com/join/owner', 'join link: the InstantAdPay join page under the page owner', mp.page.joinUrl);
|
||||
mp = await anon.json('/api/wire?page=member&u=nobody-here'); ok(mp._status === 404, 'unknown member: 404 from the page API');
|
||||
|
||||
console.log('8. verified visits, views and clicks');
|
||||
@@ -396,7 +396,8 @@ const mtop = await anon.json('/api/wire?page=member&u=topdog');
|
||||
const { chromium } = require(PW); const browser = await chromium.launch();
|
||||
for (const [label, vp] of [['desktop', { width: 1280, height: 900 }], ['phone', { width: 390, height: 844 }]]) {
|
||||
const ctx = await browser.newContext({ viewport: vp, isMobile: label === 'phone', userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/130.0 Safari/537.36 SmokeUI-' + label });
|
||||
await ctx.route(/^https:\/\//, rt => rt.abort()); // nothing leaves this machine (Google Fonts too: the pages fall back to Georgia + system fonts here)
|
||||
// nothing leaves this machine; UI_FONTS=1 lets Google Fonts through so the screenshots show the real type (read-only font GETs)
|
||||
await ctx.route(/^https:\/\//, rt => (process.env.UI_FONTS && /^https:\/\/fonts\.(googleapis|gstatic)\.com\//.test(rt.request().url())) ? rt.continue() : rt.abort());
|
||||
const errs = []; const pg = await ctx.newPage(); pg.on('pageerror', e => errs.push(e.message));
|
||||
for (const [p, sel] of [['/', '#boardCards .paper'], ['/owner', '#levels .lvl'], ['/boost', '#bQty option'], ['/ledger', '#rows tbody tr'], ['/contract', '#facts th'], ['/promote', '#kit .card'], ['/terms', '.legal .card'], ['/disclaimer', '.legal .card'], ['/privacy', '.legal .card']]) {
|
||||
await pg.goto(BASE + p, { waitUntil: 'domcontentloaded' }); await pg.waitForSelector(sel, { timeout: 8000 }).catch(() => {});
|
||||
|
||||
Reference in New Issue
Block a user