VBB purchases live + weekly prize payouts (Marty 2026-11-14: "why does it say 'coming soon' on all the stuff in it? Shouldn't it all be live already?")
Buying (VBBShop 0x36F6...07D7): Packages page has live Buy buttons for the 10 and 40 credit packs (USD price + live POL from quoteWei, SafePal or any other crypto wallet, one-time, never a subscription, where the payment goes); My Banners has "Add the banner look ($2)" on each waiting or in-loop banner (SKU 3, ref = banner id) and a 40-character teaser editor once it has the look. POST /api/my/order builds the member's buy() call on the server (fresh keeper voucher when the hub knows their sponsor, else no sponsor); the page checks the connected wallet is the member's VBB account (explains how to switch if not), checks the balance, sends with Polygon's fee floor (/api/gas), waits on /api/tx, nudges the watcher (/api/my/paid) and polls until the credits or the look arrive. Public: /api/quote, /api/gas, /api/tx/<hash>; /api/config has shop {live, contract} + explorer. The banner look on the loop: double border + star, hover teaser (always shown on touch screens; default = the link's site). Only Tokens still says coming soon. wallet.js gains sendTx/waitTx/balance (DLB flow).
Weekly prize payouts (prize.js): each Central-time week's pot = 10% of its VBBShop sales (usdCents of Purchase events by block time), $20 floor (company top-up shown to admin), $50 cap internal, half per board, 50/30/20. Every Monday the app prepares last week's plan (winners, wallets, USD; POL quoted live from the Chainlink feed the contract uses). /admin "Approve and pay" (two clicks): refuses unless PRIZE_KEY is the contract's prizeWallet(), the feed is fresh and the wallet holds the POL + gas (says how much more to send); then once per week (docstore.claim in MySQL + plan status), consecutive nonces, each hash saved as sent, stops at the first unclear send (never auto-retried), receipts watched. Ties: earlier to reach the count wins (leaderboards use the same rule). A winner that cannot be paid (the prize or company wallet) is skipped and the rest move up; an unfilled place stays in the prize wallet. /leaders shows past winners with transaction links. Posts nothing anywhere. Compose passes PRIZE_KEY.
Tests: smoke 192/192 (stand-in chain answers quoteWei + receipts: quote, order calldata + voucher, look purchase, teaser, prizes API, UI Buy buttons). New qa/chain.mjs on a local anvil with the real VBBShop + mock feed: buy -> Purchase -> credits, voucher binds sponsor, 30/10/60 split, overpay refunded, banner look; prize prepare -> short refusal -> pay 6 transfers exact POL -> paid once: 29/29. common.js?v=3, vbb.css?v=4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+5
-4
@@ -22,20 +22,21 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<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="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
<section class="hero"><h1>Admin</h1><p class="lead">Loop status and the cycle reward ledger. Rewards are recorded only; nothing is credited yet.</p></section>
|
||||
<section class="hero"><h1>Admin</h1><p class="lead">Loop status, weekly prize payouts and the cycle reward ledger. Cycle rewards are recorded only; nothing is credited yet.</p></section>
|
||||
<div class="card" id="tokCard"><div class="field"><label for="tok">Admin token</label><input id="tok" type="password" autocomplete="off"></div><button class="btn small" id="tokBtn">Open</button></div>
|
||||
<div id="adm" hidden>
|
||||
<div class="card"><h2>Status</h2><div class="stats" id="aStats"></div><pre class="mono small scroll" id="aRaw" style="white-space:pre-wrap;max-height:320px"></pre></div>
|
||||
<div class="card" id="pzCard"><h2>Weekly prize payouts</h2><p class="muted small">Each Monday after midnight (Central) the app prepares last week's payout. Nothing is sent until you approve it here, and a week is paid once. Amounts in POL are quoted live and fixed when you approve.</p><div id="pzNow"></div><div id="pzWeeks"></div><div class="row"><button class="btn sec small" id="pzPrep">Prepare last week again</button></div></div>
|
||||
<div class="card"><h2>Rewards by member</h2><div class="scroll" id="aMembers"></div></div>
|
||||
<div class="card"><h2>Ledger (newest first)</h2><div class="scroll" id="aLedger"></div></div>
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/admin.js?v=1"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/admin.js?v=2"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -13,12 +13,50 @@
|
||||
['Shifts today', s.today.shifts], ['Cycles today', s.today.cycles], ['Visitors today', s.today.visits], ['Cycles total', s.totals.cycles], ['Views recorded', VBB.n(s.ledger.views)], ['Views credited', VBB.n(s.ledger.credited)], ['Members', s.members]]
|
||||
.map(x => '<div class="stat"><b>' + esc(x[1]) + '</b><span>' + esc(x[0]) + '</span></div>').join('');
|
||||
$('aRaw').textContent = JSON.stringify(s, null, 2);
|
||||
prizes(); setInterval(prizes, 30000);
|
||||
const l = await get('/api/admin/ledger?n=300');
|
||||
const who = r => r.username ? '@' + r.username : VBB.short(r.address || r.owner);
|
||||
$('aMembers').innerHTML = l.members && l.members.length ? '<table class="t"><tr><th>Member</th><th class="n">Cycles</th><th class="n">Views</th></tr>' + l.members.map(m => '<tr><td>' + esc(who(m)) + '</td><td class="n">' + m.cycles + '</td><td class="n">' + VBB.n(m.views) + '</td></tr>').join('') + '</table>' : '<p class="muted">No cycles yet.</p>';
|
||||
$('aLedger').innerHTML = l.entries && l.entries.length ? '<table class="t"><tr><th>When (CT)</th><th>Entry</th><th>Banner</th><th>Member</th><th class="n">Views</th><th>Status</th></tr>'
|
||||
+ l.entries.map(e => '<tr><td>' + esc(new Date(e.at).toLocaleString('en-US', { timeZone: 'America/Chicago' })) + '</td><td class="mono">' + esc(e.id) + '</td><td>#' + e.bannerId + '</td><td>' + esc(who(e)) + '</td><td class="n">' + VBB.n(e.views) + '</td><td>' + esc(e.status) + '</td></tr>').join('') + '</table>' : '<p class="muted">The ledger is empty.</p>';
|
||||
}
|
||||
// ---- weekly prize payouts: review, then "Approve and pay" (two clicks), once per week ----
|
||||
const pst = { prepared: 'Waiting for approval', nothing: 'No winners', paying: 'Paying', sent: 'Sent, confirming', paid: 'Paid', partial: 'Partly paid: check below', 'claimed-elsewhere': 'Claimed elsewhere: check the wallet' };
|
||||
async function prizes() {
|
||||
const z = await get('/api/admin/prizes'); if (z.error) return;
|
||||
const cur = z.current || {};
|
||||
$('pzNow').innerHTML = '<p class="small">This week (' + esc(z.week) + '): sales $' + VBB.n(cur.salesUsd) + ' in ' + VBB.n(cur.purchases) + ' purchases, 10% = $' + VBB.n(cur.shareUsd) + ', pot $' + VBB.n(cur.potUsd)
|
||||
+ (cur.topUpUsd > 0 ? ' (company top-up $' + VBB.n(cur.topUpUsd) + ')' : '') + (cur.atCap ? ' (at the cap)' : '') + '. Prize key: ' + (z.prize.keyOn ? esc(VBB.short(z.prize.keyAddress)) : 'not set') + '.</p>';
|
||||
const tx = h => z.explorer ? '<a target="_blank" rel="noopener" href="' + esc(z.explorer + '/tx/' + h) + '">' + esc(h.slice(0, 10)) + '...</a>' : esc(h);
|
||||
$('pzWeeks').innerHTML = (z.weeks || []).map(w => {
|
||||
const q = w.quote || {};
|
||||
const lines = w.transfers.map((t, i) => '<tr><td>' + esc(t.board) + '</td><td>' + t.place + '</td><td>' + esc(t.name) + '<br><span class="mono small">' + esc(t.address) + '</span></td><td class="n">' + VBB.n(t.count) + '</td><td class="n">$' + VBB.n(t.usd) + '</td><td class="n">'
|
||||
+ esc(t.pol || (q.lines && q.lines[i] ? q.lines[i].pol : '')) + '</td><td>' + esc(t.status || '') + (t.tx ? ' ' + tx(t.tx) : '') + (t.error ? '<br><span class="small">' + esc(t.error) + '</span>' : '') + '</td></tr>').join('');
|
||||
let foot = '';
|
||||
if (w.status === 'prepared') {
|
||||
foot = q.error ? '<p class="note err">' + esc(q.error) + '</p>'
|
||||
: '<p class="small">POL at $' + Number(q.priceUsd).toFixed(4) + '. Needs ' + esc(q.totalPol) + ' POL + about ' + esc(q.gasPol) + ' POL gas. Prize wallet ' + esc(VBB.short(q.contractPrizeWallet || '')) + ' holds ' + esc(q.balancePol) + ' POL.'
|
||||
+ (BigInt(q.shortWei || 0) > 0n ? ' <b>Short by ' + esc(q.shortPol) + ' POL.</b>' : '') + (q.keyMatches ? '' : ' <b>PRIZE_KEY is missing or is not the prize wallet.</b>') + '</p>'
|
||||
+ '<button class="btn small" data-pay="' + esc(w.week) + '">Approve and pay</button>';
|
||||
}
|
||||
return '<div class="card" style="margin:12px 0"><h3>Week of ' + esc(w.week) + ': ' + esc(pst[w.status] || w.status) + '</h3><p class="small">Sales $' + VBB.n(w.salesUsd) + ', pot $' + VBB.n(w.potUsd) + ', paying $' + VBB.n(w.payUsd)
|
||||
+ (w.unfilledUsd > 0 ? ', $' + VBB.n(w.unfilledUsd) + ' unfilled (stays in the prize wallet)' : '') + (w.payment && w.payment.priceUsd ? ', paid at $' + Number(w.payment.priceUsd).toFixed(4) + '/POL' : '') + '</p>'
|
||||
+ (w.transfers.length ? '<div class="scroll"><table class="t"><tr><th>Board</th><th>#</th><th>Winner</th><th class="n">Count</th><th class="n">USD</th><th class="n">POL</th><th>Status</th></tr>' + lines + '</table></div>' : '<p class="muted">Nobody on the leaderboards that week.</p>') + foot + '</div>';
|
||||
}).join('') || '<p class="muted">No weeks prepared yet.</p>';
|
||||
document.querySelectorAll('[data-pay]').forEach(b => {
|
||||
b.onclick = async () => {
|
||||
const wk = b.dataset.pay;
|
||||
if (!b.dataset.armed) { b.dataset.armed = '1'; b.textContent = 'Click again to send the POL for ' + wk; setTimeout(() => { if (b.isConnected) { delete b.dataset.armed; b.textContent = 'Approve and pay'; } }, 8000); return; }
|
||||
b.disabled = true; b.textContent = 'Sending...';
|
||||
const r = await VBB.getJSON('/api/admin/prizes/pay', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-admin-token': tok }, body: JSON.stringify({ week: wk, confirm: wk }) });
|
||||
VBB.status(r.error || 'Payout sent for the week of ' + wk + '. Receipts confirm below.', r.error ? 'err' : 'ok'); prizes();
|
||||
};
|
||||
});
|
||||
}
|
||||
$('pzPrep').onclick = async () => {
|
||||
const r = await VBB.getJSON('/api/admin/prizes/prepare', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-admin-token': tok }, body: '{}' });
|
||||
VBB.status(r.error || 'Prepared the week of ' + r.week + '.', r.error ? 'err' : 'ok'); prizes();
|
||||
};
|
||||
$('tokBtn').onclick = () => { tok = $('tok').value.trim(); open(); };
|
||||
$('tok').addEventListener('keydown', e => { if (e.key === 'Enter') $('tokBtn').click(); });
|
||||
if (tok) open();
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
// One-time purchases through VBBShop (Packages page + My Banners). The server builds the buy() call for the signed-in member
|
||||
// (POST /api/my/order, with a fresh sponsor voucher when the network knows their sponsor); the member's own wallet sends it.
|
||||
// The wallet that pays must be the member's VBB account: credits go to the paying wallet. After the transaction confirms the
|
||||
// page waits for the purchase watcher to credit it (it reads only confirmed blocks).
|
||||
window.VBBBuy = (function () {
|
||||
const fmtPol = (wei, d) => { const s = (BigInt(wei) * 10n ** BigInt(d || 4) / 10n ** 18n).toString().padStart((d || 4) + 1, '0'); return s.slice(0, -(d || 4)) + '.' + s.slice(-(d || 4)); };
|
||||
const short = a => VBB.short(a);
|
||||
async function quote(sku, qty) { return VBB.getJSON('/api/quote?sku=' + sku + '&qty=' + (qty || 1)); }
|
||||
|
||||
// o: { sku, qty, ref, done(check) -> bool (credits arrived?), say(msg, cls) }
|
||||
async function run(o) {
|
||||
const say = o.say || VBB.status;
|
||||
const c = await VBB.getConfig();
|
||||
if (!c.shop || !c.shop.live) throw new Error('Purchases are not open right now.');
|
||||
const me = await VBB.getJSON('/api/me');
|
||||
if (!me.signedIn) throw new Error('Sign in first (My Banners), so the credits land on your account.');
|
||||
say('Connecting your wallet...');
|
||||
const addr = String(await VBBWallet.activeAddress(await VBBWallet.connect()) || '').toLowerCase();
|
||||
if (!addr) throw new Error('No wallet connected. Tap Buy again and pick SafePal or any other crypto wallet.');
|
||||
if (addr !== me.address) {
|
||||
throw new Error('Your wallet is connected as ' + short(addr) + ', but your Viral Banner Blitz account is ' + short(me.address)
|
||||
+ '. Purchases are credited to the wallet that pays, so switch your wallet app to ' + short(me.address)
|
||||
+ ', or sign out and sign in with ' + short(addr) + '.');
|
||||
}
|
||||
const od = await VBB.post('/api/my/order', { sku: o.sku, qty: o.qty || 1, ref: o.ref || 0 });
|
||||
if (od.error) throw new Error(od.error);
|
||||
const value = BigInt(od.value);
|
||||
try {
|
||||
const bal = await VBBWallet.balance(addr);
|
||||
if (bal < value) throw new Error('This wallet holds ' + fmtPol(bal) + ' POL. The purchase needs about ' + fmtPol(value) + ' POL plus a little gas. Add POL on Polygon and try again.');
|
||||
} catch (e) { if (/holds/.test(e.message)) throw e; }
|
||||
say('Confirm the payment in your wallet: about ' + fmtPol(value) + ' POL ($' + od.usd + '). Anything above the exact price comes straight back in the same transaction.');
|
||||
const hash = await VBBWallet.sendTx(od.to, od.data, od.value);
|
||||
const link = c.explorer ? c.explorer + '/tx/' + hash : '';
|
||||
say('Payment sent. Waiting for the Polygon network to confirm it...');
|
||||
const r = await VBBWallet.waitTx(hash);
|
||||
if (r.status !== '0x1') throw new Error('The transaction did not go through, so nothing was charged except gas. ' + (link ? 'Details: ' + link : ''));
|
||||
VBB.post('/api/my/paid', {}).catch(() => {});
|
||||
say('Confirmed on Polygon. Your purchase shows up here within about a minute, once the network has a few more blocks on top of it.', 'ok');
|
||||
// the watcher credits after its confirmations: poll the account
|
||||
for (let i = 0; i < 72; i++) {
|
||||
await new Promise(res => setTimeout(res, 5000));
|
||||
if (i % 4 === 3) VBB.post('/api/my/paid', {}).catch(() => {});
|
||||
try { if (await o.done()) return { hash, link, credited: true }; } catch (e) {}
|
||||
}
|
||||
return { hash, link, credited: false };
|
||||
}
|
||||
return { run, quote, fmtPol };
|
||||
})();
|
||||
@@ -72,10 +72,11 @@ window.VBB = (function () {
|
||||
tick(); setInterval(tick, 25000);
|
||||
}
|
||||
function tile(t, extra) {
|
||||
const a = document.createElement('a'); a.className = 'tile' + (extra && extra.cls ? ' ' + extra.cls : '');
|
||||
const a = document.createElement('a'); a.className = 'tile' + (t.look ? ' look' : '') + (extra && extra.cls ? ' ' + extra.cls : '');
|
||||
a.href = t.href; a.target = '_blank'; a.rel = 'noopener';
|
||||
a.innerHTML = '<img alt="' + esc(t.owner ? 'Banner by ' + t.owner : 'Member banner #' + t.id) + '" width="125" height="125" loading="lazy" referrerpolicy="no-referrer">'
|
||||
+ (extra && extra.pos ? '<span class="pos">' + esc(extra.pos) + '</span>' : '') + (t.owner ? '<span class="who">' + esc(t.owner) + '</span>' : '');
|
||||
if (t.look && t.teaser) { const s = document.createElement('span'); s.className = 'teaser'; s.textContent = t.teaser; a.appendChild(s); a.title = t.teaser; }
|
||||
const img = a.querySelector('img'); img.src = t.img; img.onerror = () => { img.onerror = null; img.src = '/art/tile-fallback.svg'; };
|
||||
return a;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
(async function () {
|
||||
VBB.renderNav('/leaders'); VBB.renderFooter();
|
||||
const $ = VBB.$, esc = VBB.esc;
|
||||
// weekly prize pot (Marty 2026-11-13): grows with sales from a floor; displayed only, no payout code yet
|
||||
// weekly prize pot (Marty 2026-11-13): grows with sales from a floor; paid each Monday after an admin approves it (prize.js)
|
||||
const c = await VBB.getConfig().catch(() => ({}));
|
||||
const pz = c.prizes || {}; const place = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th'];
|
||||
const plist = (title, arr) => '<div><h3>' + title + '</h3><ul class="pk-list">' + arr.map((v, i) => '<li>' + place[i] + ': $' + VBB.n(v) + ' in POL</li>').join('') + '</ul></div>';
|
||||
@@ -20,4 +20,16 @@
|
||||
: '<p class="muted">Nobody yet this week. Share your link from <a href="/my">My Banners</a> and take the top spot.</p>';
|
||||
$('lbVisitors').innerHTML = table(d.visitors, 'visitors');
|
||||
$('lbSources').innerHTML = table(d.sources, 'sources');
|
||||
// past weeks: winners and their payment transactions
|
||||
const pr = await VBB.getJSON('/api/prizes').catch(() => ({}));
|
||||
if (pr.past && pr.past.length) {
|
||||
const bn = { visitors: 'Most visitors sent', sources: 'Most traffic sources' };
|
||||
$('past').innerHTML = pr.past.map(w => {
|
||||
const day = new Date(w.week + 'T12:00:00Z').toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric', timeZone: 'UTC' });
|
||||
const rows = w.winners.map(x => '<tr><td>' + esc(bn[x.board] || x.board) + '</td><td><span class="rank">' + x.place + '</span></td><td>' + esc(x.name) + '</td><td class="n">$' + VBB.n(x.usd) + '</td><td class="n">' + esc(x.pol) + ' POL</td><td>'
|
||||
+ (pr.explorer ? '<a target="_blank" rel="noopener" href="' + esc(pr.explorer + '/tx/' + x.tx) + '">' + (x.confirmed ? 'Paid' : 'Sent') + '</a>' : esc(x.tx.slice(0, 10))) + '</td></tr>').join('');
|
||||
return '<div class="wk"><h3>Week of ' + esc(day) + '</h3><p class="muted small">Prize pot $' + VBB.n(w.potUsd) + (w.priceUsd ? ', POL at $' + Number(w.priceUsd).toFixed(4) : '') + '</p><div class="scroll"><table class="t"><tr><th>Board</th><th>#</th><th>Member</th><th class="n">USD</th><th class="n">POL</th><th>Transaction</th></tr>' + rows + '</table></div></div>';
|
||||
}).join('');
|
||||
$('pastCard').hidden = false;
|
||||
}
|
||||
})();
|
||||
|
||||
+29
-2
@@ -45,7 +45,33 @@
|
||||
const where = b => b.state === 'queued' ? '<span class="pill queued">Waiting</span><br>Number ' + b.position + ' of ' + b.of + ' in line'
|
||||
: b.state === 'loop' ? '<span class="pill loop">In the loop</span><br>Place ' + b.place + ' of ' + b.of + ', rides out in about ' + b.shiftsToRideOut + ' shift' + (b.shiftsToRideOut === 1 ? '' : 's')
|
||||
: '<span class="pill cycled">Cycled</span><br>' + (b.cycledAt ? new Date(b.cycledAt).toLocaleString() : '');
|
||||
// banner look (SKU 3): buy it for a banner that is waiting or in the loop; with the look, edit its hover teaser
|
||||
let buying = false, editing = false;
|
||||
function lookRow(row, b) {
|
||||
if (b.look) {
|
||||
row.innerHTML = '<span class="pill look">Banner look</span><input maxlength="40" aria-label="Hover teaser for banner #' + b.id + '"><button class="btn sec small">Save teaser</button>';
|
||||
const inp = row.querySelector('input'); inp.value = b.teaser; inp.placeholder = b.teaserDefault || 'Your teaser line';
|
||||
inp.addEventListener('focus', () => { editing = true; }); inp.addEventListener('blur', () => { editing = false; });
|
||||
row.querySelector('button').onclick = async () => {
|
||||
const r = await VBB.post('/api/my/banners/' + b.id + '/teaser', { teaser: inp.value });
|
||||
editing = false; VBB.status(r.error || 'Teaser saved: "' + r.teaser + '" shows when someone points at your banner.', r.error ? 'err' : 'ok');
|
||||
};
|
||||
return;
|
||||
}
|
||||
if (b.state === 'cycled' || !shopLive) return;
|
||||
row.innerHTML = '<button class="btn amber small">Add the banner look ($' + (c.lookUsd || 2) + ')</button>';
|
||||
row.querySelector('button').onclick = async () => {
|
||||
if (buying) return; buying = true; document.querySelectorAll('.look-row .btn.amber').forEach(x => { x.disabled = true; });
|
||||
try {
|
||||
const r = await VBBBuy.run({ sku: c.lookSku || 3, qty: 1, ref: b.id, done: async () => { const m = await VBB.getJSON('/api/my'); return (m.banners || []).some(x => x.id === b.id && x.look); } });
|
||||
VBB.status(r.credited ? 'Banner #' + b.id + ' now has the look in the loop. Write its teaser line below the banner.' : 'Paid and confirmed. The look appears on banner #' + b.id + ' within a few minutes.', 'ok');
|
||||
} catch (e) { VBB.status(String(e && e.message || e).slice(0, 400), 'err'); }
|
||||
finally { buying = false; load(); }
|
||||
};
|
||||
}
|
||||
const shopLive = !!(c.shop && c.shop.live);
|
||||
async function load() {
|
||||
if (buying || editing) return;
|
||||
const d = await VBB.getJSON('/api/my');
|
||||
if (d.error) return VBB.status(d.error, 'err');
|
||||
$('dash').hidden = false;
|
||||
@@ -56,12 +82,13 @@
|
||||
$('creditNote').textContent = !d.netVerified ? 'Free daily credits are for network members. Sign in through InstantAdPay or LinkSpin, or make a free InstantAdPay account with this wallet, and your free credit arrives each day you sign in. You can have up to ' + d.maxQueued + ' banners waiting at once.' : (d.grantedNow ? 'Your free credit for today was just added. ' : d.freeToday ? 'Today\'s free credit is in. ' : '')
|
||||
+ 'One free credit arrives each day you sign in (they bank up to ' + d.freeCreditCap + '). You can have up to ' + d.maxQueued + ' banners waiting at once.';
|
||||
$('postBtn').disabled = d.credits < 1;
|
||||
if (d.credits < 1) VBB.status('You have used your credits. Come back tomorrow for a free one.');
|
||||
if (d.credits < 1) $('creditNote').textContent += (shopLive ? ' Out of credits: get a pack on the Packages page, or come back tomorrow for a free one.' : '');
|
||||
$('mine').innerHTML = d.banners.length ? '' : '<p class="muted">No banners yet. Post your first one above.</p>';
|
||||
for (const b of d.banners) {
|
||||
const el = document.createElement('div'); el.className = 'item';
|
||||
el.innerHTML = '<img alt="Banner #' + b.id + '" width="72" height="72"><div class="s">' + where(b) + '<br><a target="_blank" rel="noopener"></a><br><span class="muted">' + VBB.n(b.clicks) + ' clicks</span></div>';
|
||||
el.innerHTML = '<img alt="Banner #' + b.id + '" width="72" height="72"><div class="s">' + where(b) + '<br><a target="_blank" rel="noopener"></a><br><span class="muted">' + VBB.n(b.clicks) + ' clicks</span><div class="look-row"></div></div>';
|
||||
el.querySelector('img').src = b.img; const a = el.querySelector('a'); a.href = b.link; a.textContent = b.link.replace(/^https:\/\//, '').slice(0, 60);
|
||||
lookRow(el.querySelector('.look-row'), b);
|
||||
$('mine').appendChild(el);
|
||||
}
|
||||
$('share').value = d.share;
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
// Packages: live POL prices from the contract, Buy buttons for the post credit packs (one-time, never a subscription).
|
||||
(async function () {
|
||||
VBB.renderNav('/packages'); VBB.renderFooter();
|
||||
const $ = VBB.$;
|
||||
const c = await VBB.getConfig().catch(() => ({}));
|
||||
const money = v => '$' + (Number.isInteger(v) ? v : Number(v).toFixed(2));
|
||||
if (c.lookUsd) $('pkLook').textContent = money(c.lookUsd) + ' per banner';
|
||||
const packs = (c.packs || []).slice(0, 2);
|
||||
packs.forEach((p, i) => { const el = $('pkPack' + i); if (!el) return;
|
||||
el.querySelector('[data-pk=credits]').textContent = VBB.n(p.credits); el.querySelector('[data-pk=usd]').textContent = money(p.usd); });
|
||||
const live = !!(c.shop && c.shop.live);
|
||||
let me = await VBB.getJSON('/api/me').catch(() => ({}));
|
||||
function who() {
|
||||
if (!live) { $('pkWho').textContent = 'Purchases are paused right now. Check back soon.'; return; }
|
||||
if (me.signedIn) { $('pkWho').textContent = 'Signed in as ' + (me.username ? '@' + me.username : VBB.short(me.address)) + '. Pay from this same wallet (' + VBB.short(me.address) + ') and the credits land on your account.'; $('pkSign').hidden = true; }
|
||||
else { $('pkWho').textContent = 'Sign in first, so your credits land on your account. Then pay from the same wallet.'; $('pkSign').hidden = false; }
|
||||
}
|
||||
who();
|
||||
$('pkSignBtn').onclick = async () => {
|
||||
try { VBB.status('Check your wallet for the sign-in message.'); await VBBWallet.signIn(); me = await VBB.getJSON('/api/me'); VBB.status('Signed in.', 'ok'); who(); }
|
||||
catch (e) { VBB.status(String(e && e.message || e).slice(0, 300), 'err'); }
|
||||
};
|
||||
async function prices() {
|
||||
if (!live) return;
|
||||
for (let i = 0; i < packs.length; i++) {
|
||||
const el = $('pkPack' + i); if (!el) continue;
|
||||
const q = await VBBBuy.quote(packs[i].sku, 1).catch(() => ({ error: 'x' }));
|
||||
el.querySelector('[data-pk=pol]').textContent = q.error ? 'price unavailable' : 'about ' + VBBBuy.fmtPol(q.wei, 2) + ' POL right now';
|
||||
}
|
||||
}
|
||||
await prices(); setInterval(prices, 60000);
|
||||
let busy = false;
|
||||
packs.forEach((p, i) => {
|
||||
const el = $('pkPack' + i); if (!el) return; const btn = el.querySelector('[data-pk=buy]');
|
||||
btn.textContent = 'Buy ' + VBB.n(p.credits) + ' credits'; btn.disabled = !live;
|
||||
btn.onclick = async () => {
|
||||
if (busy) return; busy = true; document.querySelectorAll('[data-pk=buy]').forEach(b => { b.disabled = true; });
|
||||
try {
|
||||
const before = (await VBB.getJSON('/api/my')).credits;
|
||||
if (before == null) throw new Error('Sign in first, so the credits land on your account.');
|
||||
const r = await VBBBuy.run({ sku: p.sku, qty: 1, done: async () => { const d = await VBB.getJSON('/api/my'); return d.credits >= before + p.credits; } });
|
||||
const tx = r.link ? ' Transaction: ' + r.link : '';
|
||||
VBB.status(r.credited ? VBB.n(p.credits) + ' post credits added to your account. Post your banners on My Banners.' + tx
|
||||
: 'Paid and confirmed. Your credits are on the way and appear on My Banners within a few minutes.' + tx, 'ok');
|
||||
} catch (e) { VBB.status(String(e && e.message || e).slice(0, 400), 'err'); }
|
||||
finally { busy = false; document.querySelectorAll('[data-pk=buy]').forEach(b => { b.disabled = !live; }); }
|
||||
};
|
||||
});
|
||||
})();
|
||||
@@ -15,7 +15,7 @@
|
||||
const t = d.today || {};
|
||||
$('today').textContent = VBB.n(t.shifts) + ' shifts and ' + VBB.n(t.cycles) + ' cycles today';
|
||||
// the loop
|
||||
const ids = d.loop.map(x => x.id).join(',');
|
||||
const ids = d.loop.map(x => x.id + (x.look ? '*' + x.teaser : '')).join(','); // a new banner look repaints too
|
||||
if (ids !== lastLoop) {
|
||||
lastLoop = ids; const g = $('loop'); g.innerHTML = '';
|
||||
const full = d.loop.length >= d.loopSize;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
if (c.perShift) set('perShift', c.perShift);
|
||||
if (c.viewsPerCycle != null) set('views', VBB.n(c.viewsPerCycle));
|
||||
if (c.visitSeconds) set('secs', c.visitSeconds);
|
||||
// planned package prices from config (Marty 2026-11-13); still coming soon, nothing is sold here
|
||||
// package prices from config (the Packages page has its own script, packages.js, with the Buy buttons)
|
||||
const money = v => '$' + (Number.isInteger(v) ? v : Number(v).toFixed(2));
|
||||
const pp = document.getElementById('pkPacks');
|
||||
if (pp && c.packs && c.packs.length) pp.innerHTML = c.packs.map(p => '<li>' + VBB.n(p.credits) + ' post credits for ' + money(p.usd) + '</li>').join('');
|
||||
|
||||
@@ -158,3 +158,17 @@ footer.foot a{color:var(--amber)} footer.foot p{margin:6px 0}
|
||||
/* network zones (2026-11-14): neutral class names, centered, small label */
|
||||
.net-zone{display:flex;flex-direction:column;align-items:center;gap:4px;margin:18px auto;max-width:100%;overflow:hidden}
|
||||
.net-zone-label{font:700 10.5px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
|
||||
/* banner look (SKU 3, 2026-11-14): a bright double border + a teaser line on hover (always shown on touch screens) */
|
||||
.tile.look{border:3px solid var(--hot);box-shadow:0 0 0 3px var(--amber),5px 5px 0 3px var(--ink);animation:lookglow 2.4s ease-in-out infinite}
|
||||
@keyframes lookglow{50%{box-shadow:0 0 0 3px var(--sky),5px 5px 0 3px var(--ink)}}
|
||||
.tile.look::after{content:"\2605";position:absolute;right:4px;top:3px;font:700 13px/1 var(--body);color:var(--amber);-webkit-text-stroke:1px var(--ink)}
|
||||
.tile .teaser{position:absolute;left:0;right:0;bottom:0;padding:6px 6px 7px;background:var(--hot);color:#fff;font:700 11px/1.25 var(--body);text-align:center;transform:translateY(100%);transition:transform .18s ease;white-space:normal;overflow:hidden;max-height:60%}
|
||||
.tile.look:hover .teaser,.tile.look:focus-visible .teaser{transform:none}
|
||||
.tile.look:hover .who,.tile.look:focus-visible .who{opacity:0}
|
||||
@media (hover:none){.tile.look .teaser{transform:none;font-size:9.5px;padding:3px 4px}}
|
||||
.pk-usd{margin:2px 0 8px}.pk-usd b{font:800 22px/1.1 var(--disp)}
|
||||
.pk-intro{text-align:center}
|
||||
.mine .item .look-row{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:6px}
|
||||
.mine .item .look-row input{flex:1;min-width:120px;background:var(--panel);border:2px solid var(--ink);border-radius:8px;padding:6px 8px;font:13px var(--body)}
|
||||
.pill.look{background:var(--hot);color:#fff}
|
||||
.past{display:grid;gap:12px}.past .wk{background:var(--bg2);border:var(--edge);border-radius:14px;padding:12px 14px}
|
||||
|
||||
+36
-2
@@ -1,5 +1,6 @@
|
||||
// Viral Banner Blitz wallet sign-in: Downline Banners' wallet.js (same AppKit build, chain guard, dead-session recovery)
|
||||
// with the buy functions removed. VBB v1 only signs a free sign-in message; it never sends a transaction.
|
||||
// with its buy flow (2026-11-14): sendTx() hard-guards the chain, sets Polygon's fee floor from /api/gas and recovers a dead
|
||||
// WalletConnect session once; waitTx() polls /api/tx; balance() is the pre-flight check. The page builds the call on the server.
|
||||
window.VBBWallet = (function () {
|
||||
const pad = v => BigInt(v).toString(16).padStart(64, '0');
|
||||
const padAddr = a => { if (!a) return pad(0); if (!/^0x[0-9a-fA-F]{40}$/.test(a)) throw new Error('Bad address: ' + a); return a.slice(2).toLowerCase().padStart(64, '0'); };
|
||||
@@ -186,6 +187,39 @@ window.VBBWallet = (function () {
|
||||
return r;
|
||||
}
|
||||
|
||||
async function sendTx(to, data, valueHex) {
|
||||
const c = await VBB.getConfig();
|
||||
const addr = await connect();
|
||||
const wantNum = Number(c.chainId);
|
||||
let cur; try { cur = await eth().request({ method: 'eth_chainId' }); } catch (e) {}
|
||||
if (!isNaN(chainNum(cur)) && chainNum(cur) !== wantNum) {
|
||||
await ensureChain(c);
|
||||
try { cur = await eth().request({ method: 'eth_chainId' }); } catch (e) {}
|
||||
if (!isNaN(chainNum(cur)) && chainNum(cur) !== wantNum)
|
||||
throw new Error('Your wallet is on the wrong network. Switch it to ' + (c.chainName || 'Polygon') + ', then try again.');
|
||||
}
|
||||
const tx = { from: await activeAddress(addr), to, data };
|
||||
if (valueHex) tx.value = valueHex;
|
||||
try { const g = await (await fetch('/api/gas')).json(); if (g && g.maxPriorityFeePerGas && g.maxFeePerGas) { tx.maxPriorityFeePerGas = g.maxPriorityFeePerGas; tx.maxFeePerGas = g.maxFeePerGas; } } catch (e) {}
|
||||
try { return await eth().request({ method: 'eth_sendTransaction', params: [tx] }); }
|
||||
catch (e) {
|
||||
if (!isDead(e)) throw e;
|
||||
tx.from = await freshConnect(c);
|
||||
return eth().request({ method: 'eth_sendTransaction', params: [tx] });
|
||||
}
|
||||
}
|
||||
async function waitTx(hash) {
|
||||
for (let i = 0; i < 120; i++) {
|
||||
try { const r = await (await fetch('/api/tx/' + hash)).json(); if (r.found) return r; } catch (e) { /* app switch on a phone: keep polling */ }
|
||||
await new Promise(res => setTimeout(res, 2500));
|
||||
}
|
||||
throw new Error('Still waiting for the transaction. Check it on the explorer; your credits arrive once it confirms.');
|
||||
}
|
||||
async function balance(addr) {
|
||||
await connect();
|
||||
return BigInt(await eth().request({ method: 'eth_getBalance', params: [addr || currentAddress(), 'latest'] }));
|
||||
}
|
||||
|
||||
async function disconnect() {
|
||||
// AppKit's disconnect can hang on the WalletConnect relay (esp. mobile) —
|
||||
// never block on it, so the UI can't get stuck "disconnecting".
|
||||
@@ -195,5 +229,5 @@ window.VBBWallet = (function () {
|
||||
}
|
||||
|
||||
function walletName() { try { const w = modal && modal.getWalletInfo && modal.getWalletInfo(); return (w && w.name) || ''; } catch (e) { return ''; } }
|
||||
return { connect, signIn, disconnect, address: currentAddress, activeAddress, pickAccount, walletName };
|
||||
return { connect, signIn, sendTx, waitTx, balance, disconnect, address: currentAddress, activeAddress, pickAccount, walletName };
|
||||
})();
|
||||
|
||||
+8
-2
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<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="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -45,11 +45,17 @@
|
||||
<div class="card">
|
||||
<h2>Weekly leaderboards</h2>
|
||||
<p>Share your link (it ends in <span class="mono">?ref=</span> and your network username). The leaderboards count the verified visitors you send each week and how many different websites they came from.</p>
|
||||
<p>Each week the top three on each leaderboard share the prize pot, paid in POL to the wallet of their Viral Banner Blitz account the following Monday. Ties go to whoever reached the count first. Past winners and their payment transactions are on the leaderboard page.</p>
|
||||
<div class="row"><a class="btn small" href="/my">Get my link</a><a class="btn quiet small" href="/leaders">See the leaders</a></div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h2>Packages</h2>
|
||||
<p>Want to post more than once a day? Post credit packs and the banner look (a bright border plus a teaser line) are one-time purchases in POL with SafePal or any other crypto wallet. Never a subscription.</p>
|
||||
<div class="row"><a class="btn small" href="/packages">See the packages</a></div>
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/static.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<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="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/splash.js?v=1"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/splash.js?v=2"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+4
-3
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<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="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -30,9 +30,10 @@
|
||||
<div class="card" id="prizes" hidden><h2>Weekly prizes</h2><p class="muted small" id="potLbl">Paid in POL to the top three on each leaderboard for the week (dollar value, converted to POL).</p><div class="pz" id="pz"></div></div>
|
||||
<div class="card"><h2>Most visitors sent</h2><div class="scroll" id="lbVisitors"></div></div>
|
||||
<div class="card"><h2>Most traffic sources</h2><p class="muted small">Different websites your visitors came from (the referring site), so spreading your link widely counts.</p><div class="scroll" id="lbSources"></div></div>
|
||||
<div class="card" id="pastCard" hidden><h2>Past winners</h2><p class="muted small">Paid in POL from the prize wallet at the POL price at payout time. Every payment is a public Polygon transaction.</p><div class="past" id="past"></div></div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/leaders.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/leaders.js?v=3"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+7
-6
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<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="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<div class="card" id="postCard">
|
||||
<h2>Post a banner</h2>
|
||||
<p class="muted small">125x125 PNG, JPG or GIF, up to 100 KB (250x250 also works for sharp screens). Link: https, a page that loads and allows frames. One post uses one credit.</p>
|
||||
<p class="muted small">125x125 PNG, JPG or GIF, up to 100 KB (250x250 also works for sharp screens). Link: https, a page that loads and allows frames. One post uses one credit. Need more? <a href="/packages">Get a credit pack</a>.</p>
|
||||
<div class="post-grid">
|
||||
<div class="preview" id="preview">125 x 125<br>preview</div>
|
||||
<div>
|
||||
@@ -60,7 +60,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card"><h2>Your banners</h2><div class="mine" id="mine"></div></div>
|
||||
<div class="card"><h2>Your banners</h2><p class="muted small">Add the banner look to any banner that is waiting or in the loop: a bright border, plus a teaser line that shows when someone points at it. One-time, per banner.</p><div class="mine" id="mine"></div></div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Your link</h2>
|
||||
@@ -73,8 +73,9 @@
|
||||
</div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/wallet.js?v=1"></script>
|
||||
<script src="/assets/my.js?v=1"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/wallet.js?v=2"></script>
|
||||
<script src="/assets/buy.js?v=1"></script>
|
||||
<script src="/assets/my.js?v=2"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+18
-13
@@ -3,12 +3,12 @@
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<title>Packages | Viral Banner Blitz</title>
|
||||
<meta name="description" content="Viral Banner Blitz packages are coming soon: one-time purchases, never a subscription. Until then, post free once a day.">
|
||||
<meta name="description" content="Post credit packs and the banner look for Viral Banner Blitz: one-time purchases in POL, never a subscription. Network members also post free once a day.">
|
||||
<link rel="canonical" href="https://viralbannerblitz.com/packages">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="Viral Banner Blitz">
|
||||
<meta property="og:title" content="Packages | Viral Banner Blitz">
|
||||
<meta property="og:description" content="Viral Banner Blitz packages are coming soon: one-time purchases, never a subscription. Until then, post free once a day.">
|
||||
<meta property="og:description" content="Post credit packs and the banner look for Viral Banner Blitz: one-time purchases in POL, never a subscription. Network members also post free once a day.">
|
||||
<meta property="og:url" content="https://viralbannerblitz.com/packages">
|
||||
<meta property="og:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
<meta property="og:image:width" content="1200">
|
||||
@@ -16,31 +16,36 @@
|
||||
<meta property="og:image:alt" content="Viral Banner Blitz: a community banner loop that moves with every verified visitor">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="Packages | Viral Banner Blitz">
|
||||
<meta name="twitter:description" content="Viral Banner Blitz packages are coming soon: one-time purchases, never a subscription. Until then, post free once a day.">
|
||||
<meta name="twitter:description" content="Post credit packs and the banner look for Viral Banner Blitz: one-time purchases in POL, never a subscription. Network members also post free once a day.">
|
||||
<meta name="twitter:image" content="https://viralbannerblitz.com/art/og-share.png">
|
||||
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<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="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=4">
|
||||
</head>
|
||||
<body>
|
||||
<main class="wrap">
|
||||
<section class="hero"><h1>Packages</h1><p class="lead">Extra post credits and banner extras are on the way.</p></section>
|
||||
<div class="soon">
|
||||
<div class="tag">Coming soon</div>
|
||||
<section class="hero"><h1>Packages</h1><p class="lead">More post credits and a banner that stands out. Paid once in POL on Polygon, with SafePal or any other crypto wallet.</p></section>
|
||||
<div class="card center pk-intro">
|
||||
<h2>One-time purchases. Never a subscription.</h2>
|
||||
<p class="muted">Every package will be a single purchase you make once. Nothing renews, nothing bills you again. Here is what is planned.</p>
|
||||
<p class="muted">Every package is a single purchase you make once. Nothing renews and nothing bills you again. The price is in dollars and paid in POL at the live price; anything you send above it comes straight back in the same transaction.</p>
|
||||
<p class="small" id="pkWho"></p>
|
||||
<div class="row" id="pkSign" hidden style="justify-content:center"><a class="btn sec small" href="/my">Sign in on My Banners</a><button class="btn small" id="pkSignBtn">Sign in with a wallet</button></div>
|
||||
</div>
|
||||
<div class="pk" id="pk">
|
||||
<div class="card pk-item"><h3>Post credit packs</h3><ul class="pk-list" id="pkPacks"><li>10 post credits for $3</li><li>40 post credits for $10</li></ul><p class="muted small">Each credit posts one banner into the loop.</p><span class="tag-soon">Coming soon</span></div>
|
||||
<div class="card pk-item"><h3>Banner look</h3><p class="pk-price" id="pkLook">$2 per banner</p><p class="muted small">A border and a hover teaser that make your banner stand out in the loop.</p><span class="tag-soon">Coming soon</span></div>
|
||||
<div class="card pk-item" id="pkPack0"><h3>Post credit pack</h3><p class="pk-price"><span data-pk="credits">10</span> post credits</p><p class="pk-usd"><b data-pk="usd">$3</b> <span class="muted small" data-pk="pol"></span></p><p class="muted small">Each credit posts one banner into the loop.</p><button class="btn" data-pk="buy" disabled>Buy</button></div>
|
||||
<div class="card pk-item" id="pkPack1"><h3>Post credit pack</h3><p class="pk-price"><span data-pk="credits">40</span> post credits</p><p class="pk-usd"><b data-pk="usd">$10</b> <span class="muted small" data-pk="pol"></span></p><p class="muted small">The better value: each credit posts one banner into the loop.</p><button class="btn" data-pk="buy" disabled>Buy</button></div>
|
||||
<div class="card pk-item"><h3>Banner look</h3><p class="pk-price" id="pkLook">$2 per banner</p><p class="muted small">A bright border on your banner in the loop, plus a teaser line that shows when someone points at it. Buy it from My Banners, on the banner you want it on.</p><a class="btn sec" href="/my">Add it on My Banners</a></div>
|
||||
<div class="card pk-item"><h3>Tokens</h3><p class="pk-price">Network visits</p><p class="muted small">Each token is a visit to your site from the network, at the InstantAdPay visit rate.</p><span class="tag-soon">Coming soon</span></div>
|
||||
</div>
|
||||
<div class="card center"><p>Until packages open, every network member (InstantAdPay or LinkSpin) gets one free post credit each day they sign in.</p><a class="btn" href="/my">Use my free credit</a></div>
|
||||
<div class="card"><h3>Where your payment goes</h3><p class="muted small">Each purchase is split on the Polygon blockchain in the same transaction: 30% to the network member who introduced you (to Viral Banner Blitz if nobody did), 10% to the weekly leaderboard prize pot, 60% to Viral Banner Blitz. You buy advertising for your own banners, not an income opportunity.</p></div>
|
||||
<div class="card center"><p>Every network member (InstantAdPay or LinkSpin) also gets one free post credit each day they sign in.</p><a class="btn sec" href="/my">Use my free credit</a></div>
|
||||
<div id="status" class="note" hidden></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/static.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/wallet.js?v=2"></script>
|
||||
<script src="/assets/buy.js?v=1"></script>
|
||||
<script src="/assets/packages.js?v=1"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
<meta name="theme-color" content="#ffd400">
|
||||
<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="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&family=DM+Sans:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=3">
|
||||
<link rel="stylesheet" href="/assets/vbb.css?v=4">
|
||||
<link rel="stylesheet" href="/assets/kit.css?v=1">
|
||||
</head>
|
||||
<body>
|
||||
@@ -34,7 +34,7 @@
|
||||
<div id="status" class="note" hidden></div>
|
||||
<div id="kit"><p class="muted">Loading the kit...</p></div>
|
||||
</main>
|
||||
<script src="/assets/common.js?v=2"></script>
|
||||
<script src="/assets/common.js?v=3"></script>
|
||||
<script src="/assets/kitpage.js?v=1"></script>
|
||||
<script src="/assets/promote.js?v=1"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user