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:
+15
-10
@@ -1,5 +1,5 @@
|
||||
// Shared page helpers (VAB namespace, modelled on VBB / Downline Banners common.js): nav, the amber ticker, verified visits,
|
||||
// ad cards, footer (legal, company line, the network line from the hub), network ad zones and toasts of real events.
|
||||
// Shared page helpers (VAB namespace, modelled on VBB / Downline Banners common.js): nav, the royal ticker, verified visits,
|
||||
// ad cards, the shared SVG bits of the daylight look (mark, network lines, green checks), footer (legal, company line, the network line from the hub), network ad zones and toasts of real events.
|
||||
window.VAB = (function () {
|
||||
let cfgP = null, vt = null;
|
||||
const $ = id => document.getElementById(id);
|
||||
@@ -12,10 +12,14 @@ window.VAB = (function () {
|
||||
async function getJSON(url, opts) { const r = await fetch(url, opts); let j = {}; try { j = await r.json(); } catch (e) {} if (!r.ok && !j.error) j.error = 'Request failed (' + r.status + ')'; j._status = r.status; return j; }
|
||||
const post = (url, body) => getJSON(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body || {}) });
|
||||
|
||||
// the daylight look's shared SVG bits
|
||||
const MARK = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#3D8BFF" stroke-width="2.4" aria-hidden="true"><path d="M4 18 L12 4 L20 18"/><path d="M8 12 H16" stroke="#FF3B30"/></svg>';
|
||||
const NETLINES = '<svg class="netlines" viewBox="0 0 600 400" preserveAspectRatio="none" aria-hidden="true"><g stroke="#9DBEFF" stroke-width="1" fill="none"><path d="M0 300 Q150 180 300 240 T600 120"/><path d="M0 220 Q200 90 360 160 T600 40"/><path d="M40 400 L220 120 L420 260 L600 60"/></g><g fill="#FFC21A"><circle cx="220" cy="120" r="4"/><circle cx="420" cy="260" r="4"/><circle cx="360" cy="160" r="3"/><circle cx="300" cy="240" r="3"/><circle cx="520" cy="90" r="4"/></g></svg>';
|
||||
const CHECK = '<svg width="24" height="24" viewBox="0 0 26 26" aria-hidden="true"><circle cx="13" cy="13" r="12" fill="#16B85A" stroke="#FFFFFF" stroke-width="2"/><path d="M7.5 13.5 L11.5 17 L18.5 9" fill="none" stroke="#FFFFFF" stroke-width="3"/></svg>';
|
||||
function renderNav(active) {
|
||||
const nav = document.createElement('nav'); nav.className = 'top';
|
||||
const links = [['/#board', 'Top ads'], ['/my', 'My page'], ['/boost', 'Boost'], ['/ledger', 'Ledger'], ['/contract', 'Contract'], ['/promote', 'Promote']];
|
||||
nav.innerHTML = '<div class="wrap"><a class="brand" href="/"><span class="wm">ViralAdBlitz</span><span class="live">LIVE</span></a><div class="links">'
|
||||
nav.innerHTML = '<div class="wrap"><a class="brand" href="/" aria-label="ViralAdBlitz, front page"><span class="mk">' + MARK + '</span><span class="wm">VIRAL<b>AD</b>BLITZ</span></a><div class="links">'
|
||||
+ links.map(l => '<a href="' + l[0] + '"' + (l[0] === active ? ' class="on" aria-current="page"' : '') + '>' + l[1] + '</a>').join('') + '</div>'
|
||||
+ '<a class="cta" href="/my">Post my free text ad</a></div>';
|
||||
document.body.prepend(nav);
|
||||
@@ -30,15 +34,16 @@ window.VAB = (function () {
|
||||
const el = $('ticker'); if (!el) return;
|
||||
if (!items || !items.length) { el.innerHTML = '<span class="empty">The wire is quiet. Post the first text ad.</span>'; return; }
|
||||
const one = items.map(t => '<a data-go="' + t.id + '" data-p="ticker" target="_blank" rel="noopener sponsored" class="' + (t.boosted ? 'star' : '') + '" href="' + goHref(t.id, 'ticker') + '">'
|
||||
+ (t.boosted ? '<b>★ BOOSTED:</b> ' : '▲ ') + esc(t.headline) + ' · ' + esc(t.owner) + '</a>').join('');
|
||||
+ (t.boosted ? '<b>★ BOOSTED</b> ' : '<i>▲ LIVE</i> ') + esc(t.headline) + ' · ' + esc(t.owner) + '</a>').join('');
|
||||
const reps = Math.max(1, Math.ceil(8 / items.length));
|
||||
el.innerHTML = '<div class="run" style="--tick-s:' + Math.max(30, items.length * reps * 6) + 's">' + one.repeat(reps) + one.repeat(reps) + '</div>';
|
||||
}
|
||||
// a newsprint card for a text ad (front board, member page Boosted places)
|
||||
function paper(t, tag, place) {
|
||||
return '<article class="paper' + (t.boosted ? ' star' : '') + '"><span class="tag">' + (t.boosted ? '★ BOOSTED' + (tag ? ' · ' : '') : '') + esc(tag || '') + '</span>'
|
||||
// a white clipped card for a text ad (front board, member page Boosted places); right = a small figure (verified clicks)
|
||||
function paper(t, tag, place, right) {
|
||||
const lab = (t.boosted ? '★ BOOSTED' + (tag ? ' · ' : '') : '') + (tag || '');
|
||||
return '<article class="paper' + (t.boosted ? ' star' : '') + '">' + (lab || right ? '<div class="top"><span class="tag">' + esc(lab) + '</span>' + (right ? '<span class="cl">' + esc(right) + '</span>' : '') + '</div>' : '')
|
||||
+ '<h3>' + esc(t.headline) + '</h3><p>' + esc(t.line1) + (t.line2 ? ' ' + esc(t.line2) : '') + '</p>'
|
||||
+ '<a class="visit" data-go="' + t.id + '" data-p="' + esc(place || 'card') + '" target="_blank" rel="noopener sponsored" href="' + goHref(t.id, place) + '">Visit ' + esc(t.host) + ' · ' + esc(t.owner) + '</a></article>';
|
||||
+ '<div class="foot"><a class="visit" data-go="' + t.id + '" data-p="' + esc(place || 'card') + '" target="_blank" rel="noopener sponsored" href="' + goHref(t.id, place) + '">Visit ' + esc(t.host) + '</a><span class="host">' + esc(t.owner) + '</span></div></article>';
|
||||
}
|
||||
// the page's data and its verified visit: the ads come with a ticket; after visitSeconds of the page being visible the
|
||||
// visit is sent once, and from then on clicks carry the verified token
|
||||
@@ -109,7 +114,7 @@ window.VAB = (function () {
|
||||
const seen = new Set(); let first = true;
|
||||
const box = document.createElement('div'); box.className = 'toasts'; box.setAttribute('aria-live', 'polite'); document.body.appendChild(box);
|
||||
const show = c => {
|
||||
const el = document.createElement('a'); el.className = 'toast';
|
||||
const el = document.createElement('a'); el.className = 'toast' + (c.kind === 'boost' ? ' gold' : '');
|
||||
if (c.kind === 'boost') { el.href = '/ledger'; el.innerHTML = '<b>' + (c.name ? '@' + esc(c.name) : 'A member') + ' just boosted an ad</b><br><span>' + (c.levels ? (c.levels === 1 ? '1 sponsor' : c.levels + ' sponsors') + ' paid in the same transaction' : 'paid on-chain, split by the contract') + '</span>'; }
|
||||
else { el.href = '/'; el.innerHTML = '<b>' + (c.name ? '@' + esc(c.name) : 'A member') + ' posted a new text ad</b><br><span>' + esc(c.headline) + '</span>'; }
|
||||
box.appendChild(el); requestAnimationFrame(() => el.classList.add('in'));
|
||||
@@ -125,5 +130,5 @@ window.VAB = (function () {
|
||||
}
|
||||
const polOf = (w, d) => { try { const k = BigInt(w || 0); const v = Number(k / 10n ** 12n) / 1e6; return v.toFixed(d != null ? d : (v >= 100 ? 2 : 4)); } catch (e) { return '0'; } };
|
||||
const when = t => t ? new Date(t).toLocaleString('en-US', { timeZone: 'America/Chicago', month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' }) + ' CT' : '';
|
||||
return { $, esc, getConfig, short, framed, status, getJSON, post, n, renderNav, renderFooter, renderTicker, paper, wire, decorate, goHref, polOf, when };
|
||||
return { MARK, NETLINES, CHECK, $, esc, getConfig, short, framed, status, getJSON, post, n, renderNav, renderFooter, renderTicker, paper, wire, decorate, goHref, polOf, when };
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user