Promo kit (Marty 2026-11-14: "get all the creatives built ... and put them in all the places they need to go"): promokit.js is the one source for the VBB kit, published as GET /api/promo-kit?u=<network username or wallet> (public, CORS open, read by /promote and InstantAdPay's promo center): personal links (?ref=), 21 creatives (3 angles: free daily post / every visitor pushes the loop / weekly prizes, in 125x125, 468x60, 728x90, 300x250, 160x600, 1200x630, 1080x1080) at /art/kit/vbb-<angle>-<shape>.png (ad-blocker-neutral names, rendered by tools/kit-art.mjs with Playwright), 5 lines, 3 headlines, 1 email, 2 posts built from config (perShift, viewsPerCycle, prize floor shown as "at least", never the cap). /promote page (kitpage.js + promote.js + kit.css): username from sign-in, ?u= or typed. Nav + footer link Promote. Network zones wired like DLB (common.js ZONES: footer wide/phone, Leaderboards, My Banners, How it works; 404 in server.js ZONE_404), never on the loop page; ids empty until the LinkSpin zones exist. CSP admits linkspin.app. common.js?v=2, vbb.css?v=3. Smoke 160/160 on this commit alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-14 09:41:50 -06:00
parent 840161b367
commit a6a9b3cace
37 changed files with 522 additions and 18 deletions
+24 -2
View File
@@ -13,7 +13,7 @@ window.VBB = (function () {
function renderNav(active) {
const nav = document.createElement('nav'); nav.className = 'top';
const links = [['/', 'The loop'], ['/leaders', 'Leaderboards'], ['/how', 'How it works'], ['/packages', 'Packages'], ['/my', 'My Banners']];
const links = [['/', 'The loop'], ['/leaders', 'Leaderboards'], ['/how', 'How it works'], ['/packages', 'Packages'], ['/promote', 'Promote'], ['/my', 'My Banners']];
nav.innerHTML = '<div class="wrap"><a class="brand" href="/"><img src="/art/mark.svg" alt="" width="36" height="36"><span><span class="wm">Viral Banner <b>Blitz</b></span>'
+ '<span class="by">Part of the Crypto Team Build Network</span></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></div>';
@@ -21,11 +21,33 @@ window.VBB = (function () {
// inside a traffic-exchange frame, the member page opens in a new tab
if (framed) document.querySelectorAll('nav a[href="/my"]').forEach(a => { a.target = '_blank'; a.rel = 'noopener'; });
}
// network ad zones (Marty 2026-11-14, the Downline Banners pattern): LinkSpin zones on Marty's account, one per placement, each
// mounted once with a small 'Network' label. Footer (wide / phone), Leaderboards, My Banners, How it works; the 404 zone is in
// server.js. NEVER on the loop page (/) or admin. An empty id = that placement stays off.
const ZONES = { footWide: '', footPhone: '', leaders: '', my: '', how: '' };
function zone(el, key) {
if (!el || el.dataset.zoned || !ZONES[key]) return; el.dataset.zoned = '1'; el.classList.add('net-zone');
const lab = document.createElement('div'); lab.className = 'net-zone-label'; lab.textContent = 'Network';
const s = document.createElement('script'); s.async = true; s.src = 'https://linkspin.app/z.js'; s.setAttribute('data-zone', ZONES[key]);
el.appendChild(lab); el.appendChild(s);
}
function slot(after) { if (!after || !after.parentNode) return null; const d = document.createElement('div'); d.className = 'net-zone-slot'; after.parentNode.insertBefore(d, after.nextSibling); return d; }
function pageZones() {
const p = location.pathname.replace(/\/$/, '') || '/';
if (p === '/' || p === '/admin') return;
const card = id => { const el = $(id); return el ? el.closest('.card') : null; };
if (p === '/leaders') zone(slot(card('lbVisitors')), 'leaders');
if (p === '/my') zone(slot($('stats')), 'my');
if (p === '/how') zone(slot(document.querySelectorAll('main .card')[1]), 'how');
const za = document.createElement('div'); za.className = 'wrap net-zone-foot'; document.body.appendChild(za);
zone(za, window.innerWidth >= 760 ? 'footWide' : 'footPhone');
}
function renderFooter() {
pageZones();
const f = document.createElement('footer'); f.className = 'foot';
f.innerHTML = '<div class="wrap"><p><b>Viral Banner Blitz</b>, part of the Crypto Team Build Network</p>'
+ '<p>A banner that cycles earns advertising across the network, not cash. Nothing here is an income opportunity.</p>'
+ '<p><a href="/">The loop</a> &middot; <a href="/leaders">Leaderboards</a> &middot; <a href="/how">How it works</a> &middot; <a href="/packages">Packages</a> &middot; <a href="/my">My Banners</a></p></div>';
+ '<p><a href="/">The loop</a> &middot; <a href="/leaders">Leaderboards</a> &middot; <a href="/how">How it works</a> &middot; <a href="/packages">Packages</a> &middot; <a href="/promote">Promote</a> &middot; <a href="/my">My Banners</a></p></div>';
document.body.appendChild(f);
toasts();
}