Files
viraladblitz/tools/pages.mjs
T

538 lines
60 KiB
JavaScript

// Writes public/*.html from one place (the legal.py idea from the trust pack: one source of facts per site). Run after editing:
// node tools/pages.mjs
// Copy rules: no em dashes, no income promises, "Advertising, not income. Nothing is promised.", never an earnings cap,
// wallets = "SafePal or any other crypto wallet" (never recommend MetaMask), one-time Boosts, never a subscription.
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const PUB = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'public');
const SITE = 'https://viraladblitz.com';
const V = { css: 6, common: 7, page: 6 };
const F = { co: 'TrustClickz', addr: '615 Green Valley Drive, Moody, AL 35004', updated: 'November 14, 2026', boostUsd: 5, views: '500', days: 30 };
const FONTS = 'https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@1,700;1,800&family=Chakra+Petch:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap';
// the daylight look's shared SVG bits (same as common.js)
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="26" height="26" 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>';
const ICON = {
ad: '<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="#0A1F6B" stroke-width="2" aria-hidden="true"><rect x="3" y="5" width="18" height="14"/><path d="M7 10h10M7 14h6"/></svg>',
team: '<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="#0A1F6B" stroke-width="2" aria-hidden="true"><circle cx="12" cy="5" r="2.5"/><circle cx="6" cy="18" r="2.5"/><circle cx="18" cy="18" r="2.5"/><path d="M12 7.5v4M12 11.5 6 15.5M12 11.5l6 4"/></svg>',
bars: '<svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="#0A1F6B" stroke-width="2" aria-hidden="true"><path d="M4 20V10M10 20V6M16 20v-8M22 20V3"/></svg>'
};
const PAGEHEAD = (kicker, title, lead, extra) => ` <section class="panel hero">${NETLINES}<div class="copy">${kicker ? `<p class="kicker">${kicker}</p>` : ''}<h1>${title}</h1>${lead ? `<p class="lead">${lead}</p>` : ''}${extra || ''}</div></section>`;
const LVLBARS = '<div class="lvlbars" aria-label="Where a Boost goes: 10% to each of five levels">' + [1, 2, 3, 4, 5].map(i => `<div><span></span><b>L${i} 10%</b></div>`).join('') + '</div>';
function head(o) {
const t = o.title, d = o.desc, url = SITE + o.path;
return `<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>${t}</title>
<meta name="description" content="${d}">
${o.noindex ? '<meta name="robots" content="noindex">' : `<link rel="canonical" href="${url}">`}
<meta property="og:type" content="website">
<meta property="og:site_name" content="ViralAdBlitz">
<meta property="og:title" content="${t}">
<meta property="og:description" content="${d}">
<meta property="og:url" content="${url}">
<meta property="og:image" content="${SITE}/art/og-share.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="ViralAdBlitz: the network's text ad wire">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="${t}">
<meta name="twitter:description" content="${d}">
<meta name="twitter:image" content="${SITE}/art/og-share.png">
${o.ld ? '<script type="application/ld+json">' + JSON.stringify(o.ld) + '</script>\n' : ''}<meta name="theme-color" content="#0A1F6B">
<link rel="icon" type="image/svg+xml" href="/art/mark.svg"><link rel="icon" type="image/png" href="/art/icon-192.png"><link rel="apple-touch-icon" href="/art/icon-192.png">
<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="${FONTS}">
<link rel="stylesheet" href="/assets/vab.css?v=${V.css}">
</head>
<body>
`;
}
const tail = scripts => '<script src="/assets/common.js?v=' + V.common + '"></script>\n' + scripts.map(s => '<script src="/assets/' + s + '?v=' + V.page + '"></script>').join('\n') + '\n</body>\n</html>\n';
const page = (file, o, body, scripts) => fs.writeFileSync(path.join(PUB, file), head(o) + body + tail(scripts));
// ---------------------------------------------------------------- front page
page('index.html', { path: '/', title: 'ViralAdBlitz | Your text ad on your whole team\'s pages, five levels deep',
desc: 'The network\'s text ad wire. Post one free text ad: it shows on your page and on the page of everyone you bring in, five levels down. Live ticker, top ads by verified clicks, a $5 one-time Boost.',
ld: { '@context': 'https://schema.org', '@graph': [{ '@type': 'WebSite', name: 'ViralAdBlitz', url: SITE + '/' }, { '@type': 'Organization', name: 'ViralAdBlitz', url: SITE + '/', logo: SITE + '/art/icon-192.png' }] } }, `<main class="wrap">
<section class="panel hx" aria-label="ViralAdBlitz">${NETLINES}
<div class="hx-copy">
<h1 class="slant"><span class="l1">Spread your ad</span> <span class="l2">5 levels deep</span></h1>
<span class="ribbon"><span>across the whole network</span></span>
<ul class="checks slant">
<li>${CHECK}<span>One <em>free text ad</em> for network members</span></li>
<li>${CHECK}<span>Shows on <em>your team's pages</em>, 5 levels down</span></li>
<li>${CHECK}<span>Boost: <em>$${F.boostUsd} = ${F.views} guaranteed views</em></span></li>
<li>${CHECK}<span>Every payout <em>on Polygon</em>, verify any line</span></li>
</ul>
</div>
<div class="hx-art">
<div class="rise" aria-hidden="true"><span style="height:25%;background:#3D8BFF"></span><span style="height:38%;background:#3D8BFF"></span><span style="height:50%;background:#6B4BFF"></span><span style="height:64%;background:#8A3DFF"></span><span style="height:80%;background:#FFC21A"></span><span style="height:100%;background:#FFC21A"></span><svg viewBox="0 0 300 120" preserveAspectRatio="none"><path d="M10 110 C110 100 170 70 270 14" fill="none" stroke="#FFC21A" stroke-width="7"/><path d="M250 6 L290 4 L276 40 Z" fill="#FFC21A"/></svg></div>
<div class="screens" aria-label="Your ad on level 1 pages, your own page and level 5 pages">
<div class="screen l1"><b>YOUR AD</b><span>level 1 pages</span></div>
<div class="glow"><div class="screen you"><b>YOUR AD</b><span>your page</span></div></div>
<div class="screen l5"><b>YOUR AD</b><span>level 5 pages</span></div>
</div>
<div class="gchips">
<div class="gchip">${ICON.ad}<span><b>1 FREE</b><i>TEXT AD</i></span></div>
<div class="gchip">${ICON.team}<span><b>5 LEVELS</b><i>OF YOUR TEAM</i></span></div>
<div class="gchip">${ICON.bars}<span><b>${F.views}</b><i>VIEWS PER BOOST</i></span></div>
</div>
<div class="hx-cta"><a class="pill-cta" href="/my">Post my free ad<span class="chev" aria-hidden="true"> &raquo;</span></a><span class="slant-note">Free for<br>network members</span></div>
</div>
</section>
<section class="stats" aria-label="Today on the wire">
<div class="stat"><span>Ad views today</span><b id="stViews">0</b></div>
<div class="stat"><span>Verified clicks today</span><b id="stClicks">0</b></div>
<div class="stat red"><span>Boosts sold today</span><b id="stBoosts">0</b></div>
<div class="stat blue"><span>Ads live</span><b id="stAds">0</b></div>
</section>
<section id="board">
<div class="shead"><h2>Top ads this week</h2><div class="sortg" role="group" aria-label="Show"><button type="button" class="on" data-sort="clicks" aria-pressed="true">Verified clicks</button><button type="button" data-sort="wire" aria-pressed="false">On the wire</button><button type="button" data-sort="boosted" aria-pressed="false">Boosted</button></div></div>
<div class="cards" id="boardCards"><p class="muted">Loading the board...</p></div>
</section>
<section aria-label="How it works">
<div class="shead"><h2>How your ad spreads</h2><a class="side" href="/how">See how it works, in pictures</a></div>
<div class="steps">
<div class="step"><span class="n">01</span><b>Post one free text ad</b><span>Sign in with your InstantAdPay or LinkSpin account. A headline, two lines and your link.</span></div>
<div class="step"><span class="n">02</span><b>Share your page</b><span>Your page shows your ad and the five people above you. Every visit shows six ads.</span></div>
<div class="step"><span class="n">03</span><b>Your ad spreads down</b><span>Everyone you bring in shows your ad on their page, five levels deep.</span></div>
</div>
</section>
<script src="https://polhunter.com/embed.js" data-slots="3" data-selector=".steps .step" async></script>
<section class="band" aria-label="Boost">
<div class="txt"><span class="lab">BOOST · ONE-TIME, NEVER A SUBSCRIPTION</span><h2>$${F.boostUsd} = ${F.views} guaranteed network views</h2><p>Plus a starred spot on the ticker. Each Boost pays 10% to five levels of your sponsor line in the same transaction, and 50% to the company.</p></div>
${LVLBARS}
<div class="row on-dark" style="margin:0"><a class="btn-gold" href="/boost">Boost my ad</a><a class="btn-line" href="/how#boost">How a Boost works</a></div>
</section>
<section id="ledger">
<div class="shead"><h2>Live ledger</h2><span class="side">Every Boost and every payout, straight from Polygon</span></div>
<div class="tscroll"><table class="t" id="ledgerMini"><thead><tr><th>TIME CT</th><th>EVENT</th><th>MEMBER</th><th>POL</th><th>TX</th></tr></thead><tbody><tr><td colspan="5" class="muted">Loading the ledger...</td></tr></tbody></table></div>
<p class="small"><a href="/ledger">Open the full ledger</a></p>
</section>
<section class="box" id="contract">
<div class="txt"><span class="lab">CONTRACT PROOF</span><span class="big">Paid in the same transaction. Nothing held, nothing to withdraw.</span><span class="addr" id="cAddr">Polygon · the contract address shows here once it is live</span></div>
<a class="btn-line" id="cLink" href="/contract">Check the contract</a>
</section>
<p class="muted small">A Boost buys advertising, not income. Nothing is promised.</p>
<div id="status" class="note" hidden></div>
</main>
`, ['front.js']);
// ---------------------------------------------------------------- member page
page('member.html', { path: '/', title: 'A member\'s page | ViralAdBlitz', desc: 'Text ads recommended by a ViralAdBlitz member and the five people above them in the network.', noindex: false }, `<main class="wrap">
<div><p class="kicker" id="who">RECOMMENDED</p><div id="own"><p class="muted">Loading...</p></div></div>
<section>
<div class="shead"><h2 id="teamHead">Also recommended by the team</h2><span class="side">the five people above them in the network</span></div>
<div class="levels" id="levels"></div>
</section>
<section id="boostedSec" hidden>
<div class="shead"><h2>Boosted across the network</h2><span class="side">members who boosted their ad</span></div>
<div class="cards" id="boosted"></div>
</section>
<section class="joinbar" id="join">
<div class="txt"><b id="joinHead">Want your ad on pages like this one?</b><p id="joinText">Join free. Your ad goes on your own page and on every page you bring in, five levels down.</p></div>
<div class="row on-dark" style="margin:0"><a class="pill-cta" id="joinBtn" href="/my">Join free<span class="chev" aria-hidden="true"> &raquo;</span></a><a class="btn-line" href="/my">I am a member: sign in</a></div>
</section>
<p class="muted small">Advertising, not income. Nothing is promised.</p>
<div id="status" class="note" hidden></div>
</main>
`, ['member.js']);
// ---------------------------------------------------------------- my page
page('my.html', { path: '/my', title: 'My page | ViralAdBlitz', desc: 'Post or edit your free text ad, share your page, and follow your Boost.', noindex: true }, `<main class="wrap">
<section id="signin" hidden>
${PAGEHEAD('Your dashboard', 'My page', 'One free text ad for network members. Share your page and your ad spreads five levels down.')}
<div class="card" style="margin-top:20px">
<h2>Sign in</h2>
<p>Sign in with your network account. Your username and your sponsor line come with you.</p>
<div class="signin"><a class="btn-red" id="viaIap" href="/sso/start?mode=go&amp;via=iap&amp;to=%2Fmy">Sign in with InstantAdPay</a><a class="btn-red" id="viaLs" href="/sso/start?mode=go&amp;via=linkspin&amp;to=%2Fmy">Sign in with LinkSpin</a><button class="btn-line" id="viaWallet" type="button">Sign in with your wallet</button></div>
<p class="small muted">Wallet sign-in works with SafePal or any other crypto wallet. It is a free signature that cannot move funds.</p>
<p class="small">Not in the network yet? <a id="joinLink" href="https://instantadpay.com/" target="_blank" rel="noopener">Join InstantAdPay free</a>, then come back and sign in through it.</p>
</div>
</section>
<section id="dash" class="dash" hidden>
<aside class="dside" aria-label="Dashboard">
<span class="wm">VIRAL<b>AD</b>BLITZ</span>
<nav aria-label="Dashboard sections">
<a href="#dash" class="on"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/></svg>Overview</a>
<a href="#adCard"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M4 5h16v14H4z"/><path d="M8 9h8M8 13h5"/></svg>My text ad</a>
<a href="#boostCard"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M13 2 L4 14h7l-1 8 9-12h-7z"/></svg>Boosts</a>
<a href="#lineCard"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="12" cy="5" r="2.5"/><circle cx="6" cy="18" r="2.5"/><circle cx="18" cy="18" r="2.5"/><path d="M12 7.5v4M12 11.5 6 15.5M12 11.5l6 4"/></svg>My line</a>
<a href="#earnCard"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M3 12h4l3-8 4 16 3-8h4"/></svg>Payouts</a>
<a href="/promote"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M4 12v8h16v-8M12 3v12M7 8l5-5 5 5"/></svg>Promote</a>
</nav>
<div class="who"><span id="whoVia">Signed in</span><b id="whoName"></b><code id="whoAddr"></code><button class="btn-quiet" id="signout" type="button">Sign out</button></div>
</aside>
<div class="dmain">
<div class="dtop">
<div><p class="kicker">// DASHBOARD</p><h1 id="dHello">My page</h1></div>
<div class="row" style="margin:0"><button class="btn-line" type="button" id="copyTop" hidden>Copy my page link</button><a class="btn-gold" href="/boost">Boost my ad</a></div>
</div>
<div class="stats" id="stats"></div>
<div class="dcols">
<div class="dcol-l">
<section class="dcard" id="adCard">
<div class="hd"><h2 id="adHead">My text ad</h2><span id="adBadges"></span></div>
<div id="adPrev"></div>
<p class="small" id="adNote">A headline, two lines and your https link. No link shorteners.</p>
<form class="form" id="adForm">
<label class="f">Headline <input id="fHead" maxlength="60" autocomplete="off" required><span class="cnt" id="cHead"></span></label>
<label class="f">First line <input id="fL1" maxlength="90" autocomplete="off" required><span class="cnt" id="cL1"></span></label>
<label class="f">Second line (optional) <input id="fL2" maxlength="90" autocomplete="off"><span class="cnt" id="cL2"></span></label>
<label class="f">Your link <input id="fLink" maxlength="600" autocomplete="off" inputmode="url" placeholder="https://" required></label>
<label class="chk"><input type="checkbox" id="fTrack" checked> <span><b>Track with LinkSpin</b><br><span class="small muted">Your ad link goes out as a tracked link on your own LinkSpin account, so LinkSpin Reports show its clicks. Visitors still land on your link. Untick it for programs that refuse redirected traffic.</span></span></label>
<div class="row" style="margin:0"><button class="btn-red" id="adSave" type="submit">Post my free text ad</button><span class="small muted">Tracking codes work: {clickid} and {placement} are filled on every click.</span></div>
</form>
</section>
<section class="dcard" id="pageCard"></section>
<section class="dcard" id="lineCard"><div class="hd"><h2>Your line</h2><span class="side-note">the people above you, nearest first</span></div><div id="line"></div></section>
</div>
<div class="dcol-r">
<section class="dark-card" id="boostCard"><span class="lab">YOUR BOOSTS</span><div id="boosts"></div><a class="btn-gold" href="/boost" id="boostMore">Boost my ad, $${F.boostUsd}</a></section>
<section class="dcard" id="actCard"><h2>Recent activity</h2><div id="acts"></div></section>
<section class="dcard" id="earnCard"><h2>Paid to you</h2><div id="earned"></div></section>
</div>
</div>
<p class="small muted" style="margin:0">A Boost buys advertising, not income. Nothing is promised.</p>
</div>
</section>
<div id="status" class="note" hidden></div>
</main>
`, ['wallet.js', 'my.js']);
// ---------------------------------------------------------------- boost
page('boost.html', { path: '/boost', title: 'Boost | ViralAdBlitz', desc: 'A $5 one-time Boost buys 500 guaranteed network views for your text ad, a starred spot on the live ticker and extra places on member pages. Split on-chain five levels up your line.' }, `<main class="wrap">
<section class="panel hx" style="align-items:stretch">${NETLINES}
<div class="hx-copy">
<p class="kicker" style="color:var(--gold);margin:0">One-time, never a subscription</p>
<h1 class="slant sm"><span class="l1">Boost your text ad</span> <span class="l2">across the network</span></h1>
<p class="lead" style="margin:0;color:#E3EBFF">A Boost puts your ad in front of more people: <b id="bViews">500</b> guaranteed network views, a starred spot on the live ticker, and an extra place on the five-level pages. Paid in POL on Polygon.</p>
<p class="small" style="margin:0;color:var(--on-dark)">Views count only from verified visitors: a real browser that keeps the page open and visible for a few seconds, once per visitor per day. If the views are not all delivered on ViralAdBlitz within <span id="bDays">30</span> days, the rest is finished through Network Ad Space.</p>
</div>
<div class="price">
<span class="lab">BOOST PACK</span>
<span class="amt" id="bUsd">$5</span>
<span class="pol" id="bPol">about ... POL at today's price</span>
<ul class="checks plain"><li>${CHECK}<span><b id="bViews2">500</b> guaranteed network views</span></li><li>${CHECK}<span>Starred spot on the live ticker</span></li><li>${CHECK}<span>Extra place on the five-level pages</span></li></ul>
<label class="qty">How many <select id="bQty"></select></label>
<button type="button" class="btn-gold" id="bBuy">Boost with SafePal or any other crypto wallet</button>
<span class="small" id="bWho"></span>
</div>
</section>
<section>
<div class="shead"><h2>Where each Boost goes, in the same transaction</h2></div>
<div class="splits">
<div class="split"><span>LEVEL 1</span><b>10%</b><i>your sponsor</i></div>
<div class="split"><span>LEVEL 2</span><b>10%</b><i>their sponsor</i></div>
<div class="split"><span>LEVEL 3</span><b>10%</b><i>next up</i></div>
<div class="split"><span>LEVEL 4</span><b>10%</b><i>next up</i></div>
<div class="split"><span>LEVEL 5</span><b>10%</b><i>next up</i></div>
<div class="split co"><span>COMPANY</span><b>50%</b><i>runs the network</i></div>
</div>
<p class="sub" style="max-width:820px">Levels follow your sponsor line in the network. Someone in your line who has not bought a Boost is passed over, and their share goes up to the next person who has. The contract looks up to 20 places up the line; a share nobody qualifies for goes to the company. Nothing is held and there is nothing to withdraw. A Boost buys advertising, not income: you are paid only when people in your team buy Boosts, and nothing is promised.</p>
</section>
<section class="box">
<div class="txt"><span class="lab">YOUR LINE IS SET ONCE</span><span class="big">Your sponsor line comes from the network hub.</span><span class="sub">On your first Boost the site signs your line and the contract records it. After that it never changes, so every later Boost pays the same people.</span></div>
</section>
<section style="display:flex;flex-wrap:wrap;gap:32px;align-items:flex-start">
<div style="flex:999 1 460px;min-width:0;display:flex;flex-direction:column;gap:10px">
<h2>Every sale is posted in Telegram</h2>
<p class="sub" style="margin:0">Each Boost posts a card to the network's Telegram with the week's stats and a link to verify the transaction, and every payout gets its own line. The same events show as toasts on the site and rows in the live ledger.</p>
</div>
<div class="card" style="flex:1 1 360px;border-left:6px solid var(--gold)"><span class="small muted">Telegram · payments topic</span><p style="margin:8px 0 0"><b style="font-family:var(--head);color:var(--ink);font-size:20px">ViralAdBlitz</b><br><span class="mono" style="color:var(--link);font-weight:700">@member boosted an ad</span><br><span class="mono small">This week: Boosts, ads live, verified clicks</span></p><p class="small">Level payouts in the same transaction. <a href="/ledger">Verify</a></p></div>
</section>
<div id="status" class="note" hidden></div>
</main>
`, ['wallet.js', 'buy.js', 'boost.js']);
// ---------------------------------------------------------------- ledger
page('ledger.html', { path: '/ledger', title: 'Live Ledger | ViralAdBlitz', desc: 'Every ViralAdBlitz Boost and every level payout, read from the Polygon contract, with a link to verify each transaction.' }, `<main class="wrap">
${PAGEHEAD('Straight from the chain', 'Live ledger', 'Every Boost and every payout. Each row links to its transaction on Polygonscan, so you can check it yourself.')}
<div class="stats" id="totals"></div>
<section>
<div class="tscroll"><table class="t" id="rows"><thead><tr><th>TIME CT</th><th>BOOST</th><th>PAID IN THE SAME TRANSACTION</th><th>TX</th></tr></thead><tbody><tr><td colspan="4" class="muted">Loading the ledger...</td></tr></tbody></table></div>
</section>
<p class="muted small">Levels follow the buyer's sponsor line. Someone who has not bought a Boost is passed over and their share goes up to the next person who has. Advertising, not income. Nothing is promised.</p>
<div id="status" class="note" hidden></div>
</main>
`, ['ledger.js']);
// ---------------------------------------------------------------- contract
page('contract.html', { path: '/contract', title: 'Contract Proof | ViralAdBlitz', desc: 'The ViralAdBlitz Boost contract on Polygon: owner, company, keeper and the fixed five-level split, read live from the chain.' }, `<main class="wrap">
${PAGEHEAD('Read live from Polygon', 'Contract proof', 'Every Boost is paid to one smart contract on Polygon. It splits the payment in the same transaction. Check every number here yourself.')}
<div class="card"><h2>The contract</h2><table class="facts" id="facts"><tbody><tr><td class="muted">Reading the contract...</td></tr></tbody></table></div>
<section>
<div class="shead"><h2>Where each Boost goes</h2></div>
<div class="splits">
<div class="split"><span>LEVEL 1</span><b>10%</b><i>nearest qualified</i></div><div class="split"><span>LEVEL 2</span><b>10%</b><i>next qualified</i></div>
<div class="split"><span>LEVEL 3</span><b>10%</b><i>next qualified</i></div><div class="split"><span>LEVEL 4</span><b>10%</b><i>next qualified</i></div>
<div class="split"><span>LEVEL 5</span><b>10%</b><i>next qualified</i></div><div class="split co"><span>COMPANY</span><b>50%</b><i>plus any share nobody qualifies for</i></div>
</div>
<p class="sub">The percentages are constants in the contract code: nobody can change who gets what share. There is no owner withdraw. The contract keeps nothing: if a payment cannot be delivered, it waits in the contract for that wallet to claim, and nobody else can take it. Anything sent above the price comes back in the same transaction.</p>
</section>
<div class="card"><h2>Check it yourself</h2><ol class="sub">
<li>Open the contract on Polygonscan (link above) and read its verified source code.</li>
<li>Choose <b>Read Contract</b> and compare owner, company and keeper with this page.</li>
<li>Open any Boost in the <a href="/ledger">live ledger</a> and look at its <b>Logs</b>: one Purchase event, one Paid event per level and one for the company, and a PassedOver event for anyone in the line who had not boosted.</li>
</ol></div>
<div id="status" class="note" hidden></div>
</main>
`, ['contract.js']);
// ---------------------------------------------------------------- promote
page('promote.html', { path: '/promote', title: 'Promote | ViralAdBlitz', desc: 'Your ViralAdBlitz links, creatives in every common size, and copy you can paste anywhere.' }, `<main class="wrap">
${PAGEHEAD('Share the wire', 'Promote ViralAdBlitz', 'Your links, creatives in every common size, and copy you can paste anywhere. Everything carries your network username.')}
<div class="card" id="whoCard"><h3>Your network username</h3>
<p class="small" id="whoNote">Your InstantAdPay or LinkSpin username works here. Sign in on <a href="/my">My page</a> and it fills in by itself.</p>
<form class="kit-who" id="whoForm"><input id="whoIn" autocomplete="off" spellcheck="false" maxlength="42" placeholder="your username"><button class="btn-red" type="submit">Use it</button></form></div>
<div id="status" class="note" hidden></div>
<div id="kit" style="display:flex;flex-direction:column;gap:16px"><p class="muted">Loading the kit...</p></div>
</main>
`, ['kitpage.js', 'promote.js']);
// ---------------------------------------------------------------- admin
page('admin.html', { path: '/admin', title: 'Admin | ViralAdBlitz', desc: 'ViralAdBlitz admin.', noindex: true }, `<main class="wrap">
${PAGEHEAD('', 'Admin', '')}
<div class="card"><form class="kit-who" id="tokForm"><input id="tok" type="password" autocomplete="off" placeholder="admin token"><button class="cta" type="submit">Load</button></form></div>
<div class="card"><h3>Status</h3><pre class="kit-pre" id="statusOut">Enter the token.</pre></div>
<div class="card"><h3>Boosts</h3><div class="tscroll"><table class="t" id="boostRows"><tbody></tbody></table></div></div>
<div class="card"><h3>Member lookup</h3><form class="kit-who" id="lookForm"><input id="look" placeholder="wallet, #ad id or username"><button class="cta" type="submit">Look up</button></form><pre class="kit-pre" id="lookOut"></pre></div>
<div class="card"><h3>Ad status</h3><form class="kit-who" id="adForm"><input id="adId" placeholder="ad id"><input id="adStatus" placeholder="live | paused | removed"><input id="adNoteIn" placeholder="note"><button class="cta" type="submit">Set</button></form></div>
<div class="card"><h3>Old site links</h3><p class="small">JSON file {"oldrefs": {"old username": "network username"}} replaces the whole map.</p><input type="file" id="oldFile" accept="application/json"><pre class="kit-pre" id="oldOut"></pre></div>
<div id="status" class="note" hidden></div>
</main>
`, ['admin.js']);
// ---------------------------------------------------------------- legal (one source of facts)
const legal = (file, p, title, lead, cards) => page(file, { path: p, title: title + ' | ViralAdBlitz', desc: lead }, `<main class="wrap legal">
${PAGEHEAD('ViralAdBlitz', title, lead, `<p class="muted small">Last updated ${F.updated}</p>`)}
${cards.map(c => ` <div class="card"><h2>${c[0]}</h2>${c[1]}</div>`).join('\n')}
</main>
`, ['static.js']);
const CONTACT = ['Contact', `<p>Questions, problems or a request about your data: <a href="https://instantadpay.com/support" target="_blank" rel="noopener">network support</a>, or write to ${F.co}, ${F.addr}.</p>`];
legal('terms.html', '/terms', 'Terms and Conditions', 'The rules for using ViralAdBlitz, in plain English.', [
['Who we are', `<p>ViralAdBlitz (viraladblitz.com) is run by ${F.co}, ${F.addr}. It is part of the network: one network account works across InstantAdPay, LinkSpin, Downline Banners, Viral Banner Blitz, ViralAdBlitz, Stack POL and Earners Corner. By using ViralAdBlitz you agree to these terms.</p>`],
['What ViralAdBlitz is', `<p>ViralAdBlitz is the network's home for text ads. A network member posts one text ad: a headline, two lines and a link. Each member has a page that shows their own ad and the ads of the five people above them in their network sponsor line, so an ad appears on the pages of the people its owner brings in, five levels down. The front page shows a live ticker of the newest ads and a weekly board of the top ads by verified clicks.</p>`],
['Your free text ad', `<p>One text ad is free for each network member (InstantAdPay or LinkSpin, checked with the network hub). You can edit it at any time. There is nothing to pay to post it.</p>`],
['What a Boost is', `<p>A Boost is a single, one-time purchase of $${F.boostUsd} for your text ad. It buys ${F.views} guaranteed network views, a starred spot on the live ticker while the views are delivered, and an extra place on member pages. You can buy more than one; each adds its own ${F.views} views.</p><p>A view counts only from a verified visitor: a real browser that keeps a ViralAdBlitz page open and visible for a few seconds, once per visitor per ad each day, never your own views, never bots. Views are delivered on ViralAdBlitz pages first. If a Boost's views are not all delivered within ${F.days} days, the rest is delivered through Network Ad Space, a network ad site, as a text ad with the same headline, lines and link.</p><p>Boosts are paid in POL on Polygon at the live Chainlink POL/USD price the contract reads when you buy. Anything you send above the price comes back to you in the same transaction. Nothing renews and nothing is ever billed again. There are no subscriptions.</p><p>What you buy is advertising for your own text ad. It is not income, an investment or a share of anything.</p>`],
['How a payment is split', `<p>The ViralAdBlitz contract splits each Boost in the same transaction it is paid: 10% to each of five levels up the buyer's sponsor line and 50% to ViralAdBlitz.</p><p>Only someone who has bought at least one Boost can receive a level share. Someone in the line who has not is passed over, and the share goes up to the next person who has. The contract looks up to 20 places up the line for five such people; a share nobody qualifies for goes to ViralAdBlitz.</p><p>Your sponsor line comes from the network hub. On your first Boost the site signs it and the contract records it link by link. A link already recorded is never changed, so every later Boost pays along the same line. Members of the line without a wallet in the network cannot receive payments and are left out of the recorded line.</p><p>The split is fixed in the contract code and there is no owner withdraw. The contract keeps nothing: each share goes straight to the person's wallet in the buyer's transaction. If a payment cannot be delivered, it waits in the contract for that wallet to claim, and nobody else can take it.</p>`],
['Nothing is promised', `<p>We do not promise or guarantee any income, payout or result. A level share is paid only when someone in your team chooses to buy a Boost. Read the <a href="/disclaimer">Earnings Disclaimer</a>.</p>`],
['No refunds', `<p>Payments are made on the blockchain and are final once confirmed. We cannot reverse, cancel or refund them. Check the amount before you confirm in your wallet. If your ad is removed for breaking these terms, the views left on its Boosts are not delivered or refunded.</p>`],
['Crypto risk', `<ul><li>The price of POL moves. The dollar value of a payment can be higher or lower later than when it was paid.</li><li>You are responsible for your wallet and its recovery phrase. Nobody, including us, can recover a lost wallet or reverse a payment sent from it.</li><li>Blockchain transactions are final. Each one costs a small network fee (gas) in POL, paid to the network, not to us.</li><li>Use SafePal or any other crypto wallet you trust, and never share your recovery phrase with anyone. We will never ask for it.</li></ul>`],
['Text ad rules', `<p>Your ad and its link must be your own or ones you have the right to use, and the link must lead to a lawful page that loads. No adult content, malware, phishing, deceptive offers, hate, or anything illegal where you or your visitors live. No link shorteners. We may pause or remove an ad that breaks these rules and close the account behind it.</p>`],
['Fair use', `<p>Views and clicks count only from verified visitors, and only a few visitors per internet connection count each day. Bots, crawlers and repeat visits do not count. We may refuse visits or clicks we judge not to be real, and may remove anyone who fakes traffic from the board. Do not try to break, overload or game the site.</p>`],
['Your account', `<p>You sign in with your wallet or through InstantAdPay or LinkSpin. Your network account, username and sponsor are shared across the network through the network hub, as described in the <a href="/privacy">Privacy Policy</a>. You must be old enough to make a binding agreement where you live, and using crypto must be legal there.</p>`],
['The service', `<p>The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. The smart contract runs on Polygon on its own; its rules are public and can be checked on the <a href="/contract">contract page</a>. We may change features, the price of future Boosts or these terms; changes apply from the date they are posted here.</p>`],
['Limits', `<p>As far as the law allows, we are not responsible for losses caused by the blockchain, your wallet, the price of POL, third-party websites in ads, or events outside our control, and our total responsibility to you is limited to what you paid for the purchase in question. These terms are governed by the laws of the State of Alabama, USA.</p>`],
CONTACT]);
legal('disclaimer.html', '/disclaimer', 'Earnings Disclaimer', 'Advertising, not income. Nothing is promised.', [
['What you are buying', `<p>A ViralAdBlitz Boost is advertising for your own text ad: guaranteed views, a ticker spot and member-page places. It is not an investment, a business opportunity, a share of profits or a promise of any payment.</p>`],
['Level shares are not promised', `<p>The contract pays a level share only when someone in your team chooses to buy a Boost. Nobody is required to buy one, and we do not know or promise whether anyone in your team ever will. Many members receive nothing, and many receive less than they spend. Your results depend on other people's free choices, not on anything we do.</p>`],
['No examples are promises', `<p>Any number on this site, in the ledger or in a Telegram post shows what really happened in one transaction. It is not a typical result and not a forecast of what you will receive.</p>`],
['Prices and taxes', `<p>Boosts are priced in US dollars and paid in POL, whose price moves. Anything you receive is in POL and its dollar value can change. You are responsible for any taxes on what you receive where you live.</p>`],
['Who to ask', `<p>${F.co}, ${F.addr}. <a href="https://instantadpay.com/support" target="_blank" rel="noopener">Network support</a>.</p>`]]);
legal('privacy.html', '/privacy', 'Privacy Policy', 'What ViralAdBlitz keeps about you, why, and for how long.', [
['Who we are', `<p>ViralAdBlitz is run by ${F.co}, ${F.addr}.</p>`],
['What we keep', `<ul><li>Your wallet address and network username, and your text ad (it is public: that is its purpose).</li><li>Your network record from the network hub: your hub id and your sponsor line. ViralAdBlitz does not store your email. When you sign in through InstantAdPay or LinkSpin, your email is used once to check your network membership and is not kept.</li><li>Your Boosts, which are public on the Polygon blockchain, and how many of their views have been delivered.</li><li>For counting real views and clicks: a one-way code made from your internet address and browser type (never the address itself), the page, and the site that sent you. Visit and click records are kept 15 days; the records of each view counted toward a Boost are kept 120 days so delivery can be checked.</li></ul>`],
['Cookies', `<p>A sign-in cookie (7 days), a cookie that remembers whose page you came from (30 days), and short-lived cookies for signing in through the network. No advertising or tracking cookies of our own.</p>`],
['Who else sees data', `<ul><li>The Polygon blockchain: every Boost and payment is public there, by its nature.</li><li>The network hub, which keeps one record per person across the network sites (username, wallet, sponsor).</li><li>Our Telegram payments topic: each Boost is posted with the buyer's username (or a shortened wallet) and the amounts paid.</li><li>Services the pages load: Google Fonts, WalletConnect (Reown) when you connect a wallet, LinkSpin network ad zones, and Network Ad Space for finishing Boost views.</li></ul><p>We do not sell personal data.</p>`],
['Your choices', `<p>You can edit your ad at any time, or ask us to remove it and your account here. Records on the blockchain cannot be removed by anyone.</p>`],
CONTACT]);
// ---------------------------------------------------------------- how it works (Marty 2026-11-15: "a How It Works section with maybe a diagram")
// Every fact here is from the code: server.js memberPage (own ad + first 5 people above with a live ad, LEVEL 1-5 in display
// order, C.lineSearch 20 places, C.boostSlots 2 Boosted places), wire.js (one view per visitor per ad per 24 h, never the owner's
// own, verified clicks the same), config.js split (5 x 10% + 50%, maxDepth 20), contracts/README (pass-up), vabnas.js (30 days, NAS).
const T = (x, y, cls, fill, txt, anchor) => `<text x="${x}" y="${y}" class="${cls}" fill="${fill}"${anchor ? ` text-anchor="${anchor}"` : ''}>${txt}</text>`;
const ORD = ['1st', '2nd', '3rd', '4th', '5th'];
// 1. the spread: YOU, then member pages five levels down, each showing YOUR ad in the LEVEL row that matches its depth
function svgSpread() {
const rows = [2, 3, 4, 5, 5], pw = 40, ph = 54, x0 = 108, aw = 244, top0 = 136, pitch = 96, H = 584;
const subs = ['your directs', 'their people', 'their people', 'their people', 'their people'];
const pos = rows.map((n, i) => { const gap = n > 1 ? Math.min(30, (aw - n * pw) / (n - 1)) : 0; const sx = x0 + (aw - (n * pw + (n - 1) * gap)) / 2;
return Array.from({ length: n }, (_, k) => ({ x: Math.round(sx + k * (pw + gap)), y: top0 + i * pitch })); });
let lines = '', pages = '', left = '';
// connectors: YOU card to level 1, each page to the pages below it
pos[0].forEach(p => { lines += `<path d="M230 100 L${p.x + pw / 2} ${p.y}"/>`; });
for (let i = 1; i < rows.length; i++) pos[i].forEach((p, k) => { const par = pos[i - 1][Math.min(pos[i - 1].length - 1, Math.floor(k * pos[i - 1].length / rows[i]))]; lines += `<path d="M${par.x + pw / 2} ${par.y + ph} L${p.x + pw / 2} ${p.y}"/>`; });
pos.forEach((row, i) => row.forEach(p => {
let bars = `<rect x="4" y="4" width="32" height="9" fill="#1F66FF"/>`;
for (let r = 0; r < 5; r++) bars += r === i ? `<rect x="3" y="${16 + r * 7}" width="34" height="6" fill="#FFC21A" stroke="#0A1F6B" stroke-width="1"/>` : `<rect x="4" y="${17 + r * 7}" width="32" height="4" fill="#C9D6F5"/>`;
pages += `<g transform="translate(${p.x} ${p.y})"><rect x="0.75" y="0.75" width="${pw - 1.5}" height="${ph - 1.5}" fill="#FFFFFF" stroke="#0A1F6B" stroke-width="1.5"/>${bars}</g>`;
}));
// the left column: YOU badge, LEVEL badges, red arrows down
const badge = (y, txt, fill, sub) => `<rect x="4" y="${y + 8}" width="88" height="26" fill="${fill}"/>` + T(48, y + 26, 'sv-lv', '#FFFFFF', txt, 'middle') + T(48, y + 52, 'sv-s', '#3E4C7A', sub, 'middle');
left += badge(8, 'YOU', '#E3141E', 'your ad');
pos.forEach((row, i) => { left += badge(row[0].y, 'LEVEL ' + (i + 1), '#0A1F6B', subs[i]); });
const ys = [8].concat(pos.map(r => r[0].y));
for (let i = 0; i < ys.length - 1; i++) left += `<path d="M48 ${ys[i] + 60} L48 ${ys[i + 1] + 2}" stroke="#E3141E" stroke-width="2.5" marker-end="url(#mkSpread)"/>`;
const you = `<rect x="112" y="8" width="236" height="92" fill="#FFC21A" stroke="#0A1F6B" stroke-width="2"/>` + T(126, 30, 'sv-tag', '#0A1F6B', 'YOUR FREE TEXT AD') + T(126, 54, 'sv-h', '#0A1F6B', 'Your headline here') + T(126, 74, 'sv-b', '#2A3A6E', 'Two short lines about your offer') + T(126, 92, 'sv-tag', '#0A1F6B', 'yoursite.com');
return `<svg viewBox="0 0 360 ${H}" role="img" aria-labelledby="dgSpreadT dgSpreadD" xmlns="http://www.w3.org/2000/svg"><title id="dgSpreadT">Your ad spreads five levels down your team</title><desc id="dgSpreadD">You post one free text ad at the top. Below you are the people you bring in (level 1), their people (level 2), and so on to level 5. Every one of their member pages shows your ad among the five team ads: on a level 1 page it is the LEVEL 1 row, on a level 5 page the LEVEL 5 row.</desc>`
+ `<defs><marker id="mkSpread" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5" orient="auto"><path d="M0 0 L10 5 L0 10 Z" fill="#E3141E"/></marker></defs>`
+ `<g stroke="#9DBEFF" stroke-width="1.5" fill="none">${lines}</g>${left}${you}${pages}</svg>`;
}
// 2. a member's page: their own ad, five team ads labelled LEVEL 1-5, two Boosted places, the join bar
function svgPage() {
let s = `<rect x="1" y="1" width="358" height="482" fill="#FFFFFF" stroke="#0A1F6B" stroke-width="2"/><rect x="1" y="1" width="358" height="30" fill="#0A1F6B"/>`
+ `<circle cx="16" cy="16" r="4.5" fill="#E3141E"/><circle cx="30" cy="16" r="4.5" fill="#FFC21A"/><circle cx="44" cy="16" r="4.5" fill="#3D8BFF"/>` + T(58, 21, 'sv-url', '#D3DEFF', 'viraladblitz.com/their-name')
+ `<rect x="14" y="42" width="332" height="74" fill="#0A2FA8"/>` + T(26, 61, 'sv-tag', '#FFC21A', 'THEIR OWN AD, ON TOP') + T(26, 85, 'sv-h', '#FFFFFF', 'Their headline') + T(26, 105, 'sv-b', '#E3EBFF', 'Their two lines and their link')
+ T(14, 138, 'sv-tag', '#1546D6', 'THE 5 PEOPLE ABOVE THEM WITH A LIVE AD');
for (let i = 0; i < 5; i++) { const y = 146 + i * 38;
s += `<rect x="14.5" y="${y + 0.5}" width="331" height="31" fill="#FFFFFF" stroke="#C9D6F5"/><rect x="14" y="${y}" width="80" height="32" fill="#0A1F6B"/>` + T(54, y + 21, 'sv-lv', '#FFFFFF', 'LEVEL ' + (i + 1), 'middle') + T(106, y + 21, 'sv-b', '#0A1F6B', 'Ad of the ' + ORD[i] + ' person above'); }
s += T(14, 352, 'sv-tag', '#7A5B00', 'BOOSTED PLACES');
for (let i = 0; i < 2; i++) { const y = 360 + i * 38;
s += `<rect x="15" y="${y + 1}" width="330" height="30" fill="#FFFBEA" stroke="#FFC21A" stroke-width="2"/><rect x="14" y="${y}" width="80" height="32" fill="#FFC21A"/>` + T(54, y + 21, 'sv-lv', '#0A1F6B', '★ BOOST', 'middle') + T(106, y + 21, 'sv-b', '#0A1F6B', 'A Boosted ad from the network'); }
s += `<rect x="14" y="440" width="332" height="32" fill="#E3141E"/>` + T(180, 461, 'sv-j', '#FFFFFF', 'Join free under @their-name', 'middle');
return `<svg viewBox="0 0 360 484" role="img" aria-labelledby="dgPageT dgPageD" xmlns="http://www.w3.org/2000/svg"><title id="dgPageT">What a member page shows</title><desc id="dgPageD">A member page at viraladblitz.com slash their name: their own ad on top, then the ads of the first five people above them in their sponsor line who have a live ad, labelled LEVEL 1 to LEVEL 5, then two Boosted places, then a button to join free under them.</desc>${s}</svg>`;
}
// 3. where a $5 Boost goes: 50% company, 50% as five 10% shares walking up the line; a person with no Boost is passed over
function svgBoost() {
const line = [['1 place up', 'Your sponsor, has boosted', 1], ['2 places up', 'No Boost yet: passed over', 0], ['3 places up', 'Has boosted', 2], ['4 places up', 'Has boosted', 3], ['5 places up', 'Has boosted', 4], ['6 places up', 'Has boosted', 5]];
const y0 = 178, pitch = 58, h = 46, cx = 52;
let rows = '', spine = '';
line.forEach(([a, b, lv], i) => { const y = y0 + i * pitch, cy = y + h / 2, paid = lv > 0;
rows += paid ? `<rect x="28.5" y="${y + 0.5}" width="323" height="${h - 1}" fill="#FFFFFF" stroke="#C9D6F5"/>` : `<rect x="28.5" y="${y + 0.5}" width="323" height="${h - 1}" fill="#F1F4FB" stroke="#8C9AC4" stroke-dasharray="5 4"/>`;
rows += `<circle cx="${cx}" cy="${cy}" r="13" fill="${paid ? '#1F66FF' : '#C9D6F5'}"/>` + T(cx, cy + 4.5, 'sv-lv', paid ? '#FFFFFF' : '#3E4C7A', String(i + 1), 'middle')
+ T(76, y + 20, 'sv-h2', paid ? '#0A1F6B' : '#3E4C7A', a) + T(76, y + 37, 'sv-s', paid ? '#2A3A6E' : '#3E4C7A', b);
rows += paid ? `<rect x="242" y="${y + 9}" width="102" height="28" fill="#E1EBFF"/>` + T(293, y + 28, 'sv-lv', '#1546D6', 'LEVEL ' + lv + ' · 10%', 'middle')
: `<rect x="242.5" y="${y + 9.5}" width="101" height="27" fill="none" stroke="#8C9AC4" stroke-dasharray="4 3"/>` + T(293, y + 28, 'sv-lv', '#3E4C7A', 'PASSED OVER', 'middle');
});
const cy = i => y0 + i * pitch + h / 2;
spine += `<path d="M${cx} 150 L${cx} ${cy(0) - 15}" marker-end="url(#mkBoostB)"/>`;
for (const i of [2, 3, 4]) spine += `<path d="M${cx} ${cy(i) + 13} L${cx} ${cy(i + 1) - 15}" marker-end="url(#mkBoostB)"/>`;
const skip = `<path d="M${cx - 9} ${cy(0) + 10} C 8 ${cy(0) + 30}, 8 ${cy(2) - 30}, ${cx - 9} ${cy(2) - 12}" fill="none" stroke="#E3141E" stroke-width="2.5" marker-end="url(#mkBoostR)"/>`;
const fy = y0 + 6 * pitch + 6;
return `<svg viewBox="0 0 360 ${fy + 40}" role="img" aria-labelledby="dgBoostT dgBoostD" xmlns="http://www.w3.org/2000/svg"><title id="dgBoostT">Where a $5 Boost goes</title><desc id="dgBoostD">You buy a $5 Boost. In the same transaction half goes to the company and half is paid as five shares of 10% up your sponsor line. In this example the person 1 place up has boosted and gets the LEVEL 1 share. The person 2 places up has not bought a Boost, so they are passed over and the next share skips to the person 3 places up, who gets LEVEL 2. The people 4, 5 and 6 places up get LEVEL 3, 4 and 5. The contract looks up to 20 places up; a share nobody qualifies for goes to the company.</desc>`
+ `<defs><marker id="mkBoostB" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5" orient="auto"><path d="M0 0 L10 5 L0 10 Z" fill="#3D8BFF"/></marker><marker id="mkBoostR" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5" orient="auto"><path d="M0 0 L10 5 L0 10 Z" fill="#E3141E"/></marker></defs>`
+ `<rect x="90" y="6" width="180" height="58" fill="#FFC21A" stroke="#0A1F6B" stroke-width="2"/>` + T(180, 27, 'sv-tag', '#0A1F6B', 'YOU BUY A BOOST', 'middle') + T(180, 53, 'sv-big', '#0A1F6B', '$5, one time', 'middle')
+ `<g stroke="#0A1F6B" stroke-width="2" fill="none"><path d="M150 64 L96 92" marker-end="url(#mkBoostN)"/><path d="M210 64 L264 92" marker-end="url(#mkBoostN)"/></g>`
+ `<defs><marker id="mkBoostN" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5" orient="auto"><path d="M0 0 L10 5 L0 10 Z" fill="#0A1F6B"/></marker></defs>`
+ `<rect x="8" y="96" width="166" height="54" fill="#1F66FF"/>` + T(91, 118, 'sv-tag', '#FFFFFF', '50% · FIVE LEVELS', 'middle') + T(91, 138, 'sv-b', '#FFFFFF', '10% each, $0.50 in POL', 'middle')
+ `<rect x="186" y="96" width="166" height="54" fill="#0A1F6B"/>` + T(269, 118, 'sv-tag', '#FFC21A', '50% · COMPANY', 'middle') + T(269, 138, 'sv-b', '#D3DEFF', '$2.50, runs the network', 'middle')
+ rows + `<g stroke="#3D8BFF" stroke-width="3" fill="none">${spine}</g>` + skip
+ T(180, fy + 8, 'sv-s', '#3E4C7A', 'The contract looks up to 20 places up your line.', 'middle') + T(180, fy + 26, 'sv-s', '#3E4C7A', 'A share nobody qualifies for goes to the company.', 'middle')
+ `</svg>`;
}
const FAQ = [
['Is it really free?', `Yes. Every network member (InstantAdPay or LinkSpin) gets one free text ad: a headline, two lines and your link. Posting it and editing it costs nothing. A Boost is optional.`],
['Whose ads show on my page?', `Your own ad on top. Then the ads of the first five people above you in your sponsor line who have a live ad here, labelled LEVEL 1 to LEVEL 5 in the order shown. If someone above you has no live ad, the next person up takes the place (the site looks up to 20 places). Then two Boosted places.`],
['How far does my ad spread?', `Five levels down. Your ad shows on the page of everyone you bring in, of everyone they bring in, and so on, as long as you are one of the first five people above them with a live ad.`],
['What does a $5 Boost buy?', `${F.views} guaranteed network views from verified visitors, a starred spot on the live ticker and an extra place on member pages. It is paid once in POL on Polygon and never renews: one-time, never a subscription. Views not delivered on ViralAdBlitz within ${F.days} days are finished through Network Ad Space.`],
['Who is paid when someone boosts?', `The contract pays 10% to each of five people up the buyer's sponsor line and 50% to the company, in the same transaction. Only people who have bought a Boost receive a share; anyone who has not is passed over and the share goes to the next person up who has, up to 20 places. A Boost buys advertising, not income. Nothing is promised.`],
['Which wallet do I need?', `SafePal or any other crypto wallet that holds POL on Polygon. You only need it to buy a Boost or to sign in by wallet; signing in is a free signature that cannot move funds.`],
['Can I check the payouts myself?', `Yes. Every Boost and every level payout is in the live ledger with a link to its transaction on Polygonscan, and the contract page reads the fixed split straight from the chain.`]
];
const VC = (ic, b, t) => `<div class="vcard"><span class="ic" aria-hidden="true">${ic}</span><b>${b}</b><span>${t}</span></div>`;
const I = p => `<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" aria-hidden="true">${p}</svg>`;
page('how.html', { path: '/how', title: 'How It Works | ViralAdBlitz', desc: 'How ViralAdBlitz works: one free text ad that shows on your team\'s pages five levels down, what counts as a view, and where a $5 one-time Boost goes, in pictures.',
ld: { '@context': 'https://schema.org', '@type': 'FAQPage', mainEntity: FAQ.map(([q, a]) => ({ '@type': 'Question', name: q, acceptedAnswer: { '@type': 'Answer', text: a } })) } }, `<main class="wrap how">
<section class="panel hx" aria-label="How it works">${NETLINES}
<div class="hx-copy">
<p class="kicker" style="color:var(--gold);margin:0">How it works</p>
<h1 class="slant sm"><span class="l1">One free ad.</span> <span class="l2">Five levels deep.</span></h1>
<p class="lead" style="margin:0;color:#E3EBFF">Post one text ad. It shows on your page and on the page of everyone you bring in, five levels down. Here is the whole idea in three pictures.</p>
<ul class="jump" aria-label="On this page">
<li><a href="#spread"><b>01</b>Your ad spreads</a></li><li><a href="#views"><b>02</b>What counts</a></li><li><a href="#boost"><b>03</b>Boost</a></li><li><a href="#start"><b>04</b>Start</a></li>
</ul>
</div>
<div class="hx-art">
<div class="gchips">
<div class="gchip">${ICON.ad}<span><b>1 FREE</b><i>TEXT AD</i></span></div>
<div class="gchip">${ICON.team}<span><b>5 LEVELS</b><i>OF YOUR TEAM</i></span></div>
<div class="gchip">${ICON.bars}<span><b>${F.views}</b><i>VIEWS PER BOOST</i></span></div>
</div>
<div class="hx-cta"><a class="pill-cta" href="/my">Post my free ad<span class="chev" aria-hidden="true"> &raquo;</span></a></div>
</div>
</section>
<section class="hsec" id="spread" aria-labelledby="hSpread">
<div class="shead"><div><p class="kicker">01 · The spread</p><h2 id="hSpread">Your ad spreads down your team</h2></div></div>
<div class="hsplit">
<figure class="dg">${svgSpread()}
<figcaption><ul class="legend"><li><i style="background:#1F66FF"></i>their own ad</li><li><i style="background:#FFC21A;box-shadow:0 0 0 1px #0A1F6B inset"></i>YOUR ad</li><li><i style="background:#C9D6F5"></i>other team ads</li></ul></figcaption>
</figure>
<div class="htxt">
<ol class="hpts">
<li><b>You post one free text ad.</b><span>A headline, two lines and your link. It goes on your own page, <span class="mono">viraladblitz.com/your-name</span>.</span></li>
<li><b>Everyone you bring in shows it.</b><span>Their page carries your ad as one of the five team ads. That is level 1.</span></li>
<li><b>And so on, five levels down.</b><span>When they bring people in, your ad is on those pages too: level 2, then 3, 4 and 5. On a level 3 page, yours is the LEVEL 3 row.</span></li>
</ol>
<p class="small muted" style="margin:0">The rows show the first five people above a member who have a live ad. If someone in between has no live ad, the next person up moves into their place, so the picture holds when everyone in between has posted.</p>
<figure class="dg sm">${svgPage()}
<figcaption>Every member page looks like this: their own ad, the five team ads labelled LEVEL 1 to LEVEL 5, two Boosted places and a button to join free under them.</figcaption>
</figure>
</div>
</div>
</section>
<section class="hsec" id="views" aria-labelledby="hViews">
<div class="shead"><div><p class="kicker">02 · Fair counting</p><h2 id="hViews">What counts as a view</h2></div><span class="side">The same rules for every ad, Boosted or not</span></div>
<div class="vcards">
${VC(I('<rect x="3" y="4" width="18" height="14"/><path d="M8 21h8M12 18v3"/>'), 'A real browser, a few seconds', 'A view counts only when a real browser keeps the page open and visible for a few seconds. The server decides which ads the page showed, never the browser.')}
${VC(I('<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>'), 'Once per visitor per ad per day', 'Each ad on the page gets at most one view from the same visitor in 24 hours. Reloading the page does not add more.')}
${VC(I('<circle cx="12" cy="8" r="4"/><path d="M4 21c1-4 4-6 8-6s7 2 8 6M3 3l18 18"/>'), 'Your own views never count', 'When you look at your own page, or any page showing your ad, your ad gets no view and no verified click from you.')}
${VC(I('<path d="M12 3l8 4v5c0 5-3.5 8-8 9-4.5-1-8-4-8-9V7z"/><path d="M9 12l2 2 4-4"/>'), 'Bots and tricks are refused', 'Bots, sends that come too early and more than a few browsers from one connection in a day are not counted.')}
${VC(I('<path d="M5 3l14 8-6 2-2 6z"/>'), 'Verified clicks, the same way', 'A click counts as verified once per visitor per ad per 24 hours, never your own. Top ads this week is ranked by verified clicks.')}
${VC(I('<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>'), 'A LinkSpin tracked link', 'Your ad link goes out as a tracked link on your own LinkSpin account, and My page shows its LinkSpin clicks. Visitors still land on your link.')}
</div>
</section>
<section class="hsec" id="boost" aria-labelledby="hBoost">
<div class="shead"><div><p class="kicker">03 · Boost</p><h2 id="hBoost">Boost: where your $${F.boostUsd} goes</h2></div><span class="side">One-time, never a subscription</span></div>
<div class="hsplit">
<figure class="dg">${svgBoost()}
<figcaption><ul class="legend"><li><i style="background:#1F66FF"></i>has bought a Boost: receives a share</li><li><i style="background:#F1F4FB;box-shadow:0 0 0 1px #8C9AC4 inset"></i>no Boost yet: passed over</li><li><i style="background:#E3141E"></i>the share skips up</li></ul></figcaption>
</figure>
<div class="htxt">
<ol class="hpts">
<li><b>Split in the same transaction.</b><span>You pay ${'$'}${F.boostUsd} in POL on Polygon. The contract pays 10% to each of five people up your sponsor line and 50% to the company before the transaction ends. Nothing is held and there is nothing to withdraw.</span></li>
<li><b>Only Boost buyers receive a share.</b><span>Someone in your line who has never bought a Boost is passed over, and that share goes to the next person up who has. One Boost ever is enough to qualify.</span></li>
<li><b>Up to 20 places up.</b><span>The contract looks for five buyers within 20 places up your line. A share nobody qualifies for goes to the company.</span></li>
</ol>
<div class="box" style="border-left-color:var(--gold)"><div class="txt"><span class="lab">${F.views} GUARANTEED VIEWS</span><span class="big">What you buy is advertising for your own ad.</span><span class="sub">A Boost buys advertising, not income. Nothing is promised.</span></div></div>
<div class="deliv" aria-label="How the ${F.views} views are delivered">
<div><span class="dn">1</span><b>Starred on the ticker</b><span>Your ad gets a gold star on the live ticker on every page while its views are delivered.</span></div>
<div><span class="dn">2</span><b>Boosted places on member pages</b><span>Boosted ads fill the two Boosted places on every member page, the one furthest behind first. Every verified view counts toward your ${F.views}.</span></div>
<div><span class="dn">3</span><b>Finished within ${F.days} days</b><span>Views not delivered on ViralAdBlitz within ${F.days} days are finished through Network Ad Space as a text ad with your headline, lines and link, for exactly the views still owed.</span></div>
</div>
<p class="small" style="margin:0"><a href="/ledger">See every Boost in the live ledger</a> · <a href="/contract">Check the contract</a></p>
</div>
</div>
</section>
<section class="hsec" id="start" aria-labelledby="hStart">
<div class="shead"><div><p class="kicker">04 · Go</p><h2 id="hStart">Start in 3 steps</h2></div></div>
<div class="steps">
<div class="step"><span class="n">01</span><b>Sign in</b><span>With your InstantAdPay or LinkSpin account, or your wallet. Your username and sponsor line come with you.</span></div>
<div class="step"><span class="n">02</span><b>Post your free text ad</b><span>A headline, two lines and your link. You can edit it any time.</span></div>
<div class="step"><span class="n">03</span><b>Share your page</b><span>Send people to viraladblitz.com/your-name. Everyone who joins under you carries your ad.</span></div>
</div>
<div class="joinbar" style="margin-top:16px">
<div class="txt"><b>Ready to spread your ad?</b><p>Free for network members. Boost it any time for ${F.views} guaranteed views.</p></div>
<div class="row on-dark" style="margin:0"><a class="pill-cta" href="/my">Post my free text ad<span class="chev" aria-hidden="true"> &raquo;</span></a><a class="btn-gold" href="/boost">Boost my ad</a></div>
</div>
</section>
<section aria-labelledby="hFaq">
<div class="shead"><h2 id="hFaq">Questions</h2></div>
<div class="faq">
${FAQ.map(([q, a]) => ` <details><summary>${q}</summary><p>${a}</p></details>`).join('\n')}
</div>
</section>
<p class="muted small">A Boost buys advertising, not income. Nothing is promised.</p>
<div id="status" class="note" hidden></div>
</main>
`, ['how.js']);
console.log('pages written');