diff --git a/public/art/og-share.png b/public/art/og-share.png new file mode 100644 index 0000000..60bd00e Binary files /dev/null and b/public/art/og-share.png differ diff --git a/public/assets/common.js b/public/assets/common.js index c13539c..90d2000 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -31,6 +31,8 @@ window.BL = (function () { if (framed) document.querySelectorAll('nav a[href="/join"], nav a[href="/my"]').forEach(a => { a.target = '_blank'; a.rel = 'noopener'; }); } function renderFooter() { + const za = document.createElement('div'); za.className = 'wrap bl-zone-foot'; document.body.appendChild(za); + zone(za, window.innerWidth >= 760 ? 'footWide' : 'footPhone'); const f = document.createElement('footer'); f.className = 'bl-foot'; f.innerHTML = '

Part of the Crypto Team Build Network

' @@ -75,6 +77,15 @@ window.BL = (function () { }; tick(); setInterval(tick, 25000); } + // network ad zones (Marty 2026-11-13): LinkSpin zones on Marty's account, one per placement, mounted once (never re-rendered, + // so a view is counted once); a small 'Network' label so they never pass for a member's spot + const ZONES = { ledger: 'ls-d53e5d', footWide: 'ls-fd1e0a', footPhone: 'ls-46cbab', bought: 'ls-03783e', mySpots: 'ls-50eaeb', how: 'ls-79e849', contract: 'ls-bd7632' }; + function zone(el, key) { + if (!el || el.dataset.zoned || !ZONES[key]) return; el.dataset.zoned = '1'; el.classList.add('bl-zone'); + const lab = document.createElement('div'); lab.className = 'bl-zone-label'; lab.textContent = 'Network'; + const s = document.createElement('script'); s.async = true; s.src = 'https://linkspin.app/z.js'; s.setAttribute('data-zone', ZONES[key]); + el.appendChild(lab); el.appendChild(s); + } function withRef(href, sponsor) { if (!sponsor) return href; return href + (href.includes('?') ? '&' : '?') + 'ref=' + encodeURIComponent(sponsor); } - return { $, esc, getConfig, fmtPol, short, framed, status, getJSON, post, renderNav, renderFooter, tile, withRef }; + return { $, esc, getConfig, fmtPol, short, framed, status, getJSON, post, renderNav, renderFooter, tile, withRef, zone }; })(); diff --git a/public/assets/contract.js b/public/assets/contract.js index f67d30b..bbb8613 100644 --- a/public/assets/contract.js +++ b/public/assets/contract.js @@ -19,5 +19,6 @@ ['Momentum fund', d.fundBalance ? fmtPol(d.fundBalance) + ' POL' : '-'], ['Sales', d.paused === 'true' ? 'paused' : 'open']]; $('facts').innerHTML = '' + rows.map(r => '').join('') + '
' + r[0] + '' + r[1] + '
'; + BL.zone($('zContract'), 'contract'); $('split').innerHTML = 'ShareTo' + d.split.map(s => '' + esc(s.share) + '' + esc(s.to) + '').join(''); })(); diff --git a/public/assets/how.js b/public/assets/how.js index 193b37a..7444060 100644 --- a/public/assets/how.js +++ b/public/assets/how.js @@ -1 +1 @@ -(async function () { await BL.renderNav("/how"); BL.renderFooter(); })(); +(async function () { await BL.renderNav("/how"); BL.renderFooter(); BL.zone(document.getElementById("zHow"), "how"); })(); diff --git a/public/assets/join.js b/public/assets/join.js index a0a12d7..3491132 100644 --- a/public/assets/join.js +++ b/public/assets/join.js @@ -29,7 +29,7 @@ const r = forAddr ? await BLWallet.buyFor(forAddr, sponsor, q.sendWei) : await BLWallet.buy(sponsor, q.sendWei); if (r.receipt.status !== '0x1') throw new Error('The transaction reverted. Nothing was charged except gas.'); BL.status(''); - $('doneCard').hidden = false; $('buyCard').hidden = true; + $('doneCard').hidden = false; $('buyCard').hidden = true; BL.zone($('zBought'), 'bought'); $('txLink').innerHTML = c.explorer ? 'View the transaction' : BL.esc(r.hash); if (forAddr) $('doneCard').querySelector('h3').textContent = 'The spot is in the line for ' + BL.short(forAddr); } catch (e) { BL.status(String(e && e.message || e).slice(0, 300), 'err'); } diff --git a/public/assets/ledger.js b/public/assets/ledger.js index 706fc9b..8cdf187 100644 --- a/public/assets/ledger.js +++ b/public/assets/ledger.js @@ -10,7 +10,7 @@ const t = d.totals || {}; $('totals').innerHTML = [['Spots sold', t.spots || 0], ['Members', t.members || 0], ['POL paid out by the contract', fmtPol(t.paidOutWei || '0', 2)], ['Momentum fund', t.fundWei ? fmtPol(t.fundWei, 2) + ' POL' : '-']] .map(x => '
' + esc(x[1]) + '' + esc(x[0]) + '
').join(''); - $('rows').innerHTML = d.items.length ? d.items.map(it => { + const html = d.items.map(it => { const when = it.at ? new Date(it.at).toLocaleString() : ''; const pays = it.pays.map(p => '
  • ' + (p.failed ? 'Bounced (to the fund): ' : '') + (p.role === 'sponsor' ? 'Sponsor' : 'Line ' + p.level + ' (spot #' + (it.spotId - p.level) + ')') + ': ' + fmtPol(p.wei) + ' POL' + usd(p.wei, it.usd) + ' to ' + who(p.name, p.to) + '
  • ').join(''); @@ -19,7 +19,10 @@ + (pays ? '' : '

    No earlier spots or sponsor to pay yet.

    ') + '

    Company + momentum fund: ' + fmtPol(it.houseWei) + ' POL' + usd(it.houseWei, it.usd) + ' · Verify on Polygonscan

    '; - }).join('') : '

    No spot sales yet.

    '; + }); + $('rows').innerHTML = html.length ? html.slice(0, 10).join('') : '

    No spot sales yet.

    '; + $('rows2').innerHTML = html.slice(10).join(''); + BL.zone($('zLedger'), 'ledger'); $('upd').textContent = 'Updated ' + new Date().toLocaleTimeString(); } await load(); setInterval(load, 20000); diff --git a/public/assets/my.js b/public/assets/my.js index ca1af16..52886a5 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -20,7 +20,7 @@ async function load() { const d = await BL.getJSON('/api/my'); if (d.error) return BL.status(d.error, 'err'); - $('dash').hidden = false; $('me').textContent = d.username ? '@' + d.username + ' (' + BL.short(d.address) + ')' : d.address; + $('dash').hidden = false; BL.zone($('zMySpots'), 'mySpots'); $('me').textContent = d.username ? '@' + d.username + ' (' + BL.short(d.address) + ')' : d.address; const delivered = d.spots.reduce((t, s) => t + s.views, 0); $('stats').innerHTML = [['Spots owned', d.spots.length], ['Views delivered', delivered + ' of ' + d.spots.filter(s => s.kind !== 3).length * c.viewsOwed], ['POL paid in', BL.fmtPol(d.paidInWei)], ['POL paid out to you', BL.fmtPol(d.paidOutWei)]] diff --git a/public/board.html b/public/board.html index 256f48f..b4cd76d 100644 --- a/public/board.html +++ b/public/board.html @@ -3,11 +3,25 @@ Board | Downline Banners - + + + + + + + + + + + + + + + - +
    @@ -17,7 +31,7 @@

    The line so far

    - + diff --git a/public/contract.html b/public/contract.html index b886837..75ac947 100644 --- a/public/contract.html +++ b/public/contract.html @@ -3,11 +3,25 @@ Contract proof | Downline Banners - + + + + + + + + + + + + + + + - +
    @@ -19,8 +33,9 @@
  • Open the contract on Polygonscan (link above) and choose the Contract tab: the source code shows a green check for "verified".
  • Under Read Contract, compare owner, keeper, fee wallets and fund balance with this page.
  • Open any sale in the live ledger and look at its Logs: one SpotBought event, then one Paid event per payment.
  • +
    - - + + diff --git a/public/how.html b/public/how.html index 5d9c2e3..cf42623 100644 --- a/public/how.html +++ b/public/how.html @@ -3,11 +3,25 @@ How it works | Downline Banners - + + + + + + + + + + + + + + + - +
    @@ -20,11 +34,12 @@ 10%the company 5%the momentum fund, which can only buy spots

    The contract holds nothing except the momentum fund. The splits cannot be changed and there is no owner withdraw.

    +

    What is not promised

    Nothing is promised. You are paid only when spots sell after yours. The line pays each spot at most 10 times ($2.75), so a member who refers nobody always gets back less than $5. This is advertising with a share of later sales, not an investment.

    The momentum fund

    When no spot has sold for 4 hours, the fund buys one (at most 12 a day). It gifts the spot to an active member who owns a paid spot and has not had a gift in 7 days, members who referred someone recently first. If nobody qualifies, the fund keeps the spot and its line money goes back into the fund.

    The rest of the network

    Open board slots show network sites such as InstantAdPay and LinkSpin. On InstantAdPay, ad credits buy advertising, not income.

    - - + + diff --git a/public/index.html b/public/index.html index eeeee6a..486bf42 100644 --- a/public/index.html +++ b/public/index.html @@ -3,11 +3,26 @@ Downline Banners | Banner real estate in one line - + + + + + + + + + + + + + + + + - +
    @@ -37,7 +52,7 @@
    - + diff --git a/public/join.html b/public/join.html index 3e5c0d8..f1c1249 100644 --- a/public/join.html +++ b/public/join.html @@ -3,11 +3,25 @@ Get a spot | Downline Banners - + + + + + + + + + + + + + + + - +
    @@ -32,10 +46,10 @@ - +
    - + - + diff --git a/public/ledger.html b/public/ledger.html index d562fe6..64eb159 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -3,20 +3,34 @@ Live ledger | Downline Banners - + + + + + + + + + + + + + + + - +

    Live ledger

    Every spot sale and every payment, read from the Polygon blockchain. Each row links to the transaction so you can check it yourself. Contract proof

    Spot sales

    -

    Loading the ledger...

    +

    Loading the ledger...

    - - + + diff --git a/public/my.html b/public/my.html index c979289..f6ca84e 100644 --- a/public/my.html +++ b/public/my.html @@ -3,11 +3,26 @@ My Spots | Downline Banners - + + + + + + + + + + + + + + + + - +
    @@ -15,7 +30,7 @@

    Your share link

    People who join through this link have you as their sponsor. It is set once, on their first spot.

    Spots

    Image: 468x60 PNG, JPG or GIF up to 150 KB, or an https image address. Link: https only. Change them any time. A spot with no image shows your default, or a network image until you add one.

    @@ -26,8 +41,8 @@
    - + - + diff --git a/public/robots.txt b/public/robots.txt index 27d3e51..9d8b777 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -2,3 +2,6 @@ User-agent: * Allow: / Disallow: /my Disallow: /api/ +Disallow: /go/ + +Sitemap: https://downlinebanners.com/sitemap.xml diff --git a/server.js b/server.js index e9cf6ee..4708942 100644 --- a/server.js +++ b/server.js @@ -37,8 +37,8 @@ const hmac = s => crypto.createHmac('sha256', SECRET).update(s).digest('hex').sl // ---- http helpers ---- const MIME = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': 'text/javascript', '.png': 'image/png', '.jpg': 'image/jpeg', '.gif': 'image/gif', '.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.json': 'application/json', '.txt': 'text/plain; charset=utf-8' }; -const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; " - + "img-src 'self' data: blob: https:; connect-src 'self' https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org " +const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://linkspin.app; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; " + + "img-src 'self' data: blob: https:; connect-src 'self' https://linkspin.app https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org " + "https://*.reown.com wss://*.reown.com https://*.reown.org wss://*.reown.org https://*.web3modal.org https://*.drpc.org https://*.publicnode.com https://*.coinbase.com; " + "font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: 'self'"; function headers(extra) { return Object.assign({ 'Content-Security-Policy': CSP, 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'strict-origin-when-cross-origin' }, extra || {}); } @@ -227,7 +227,14 @@ const server = http.createServer(async (req, res) => { return sendFile(res, path.join(PUB, PAGES[p]), ex); } if (/^\/r\/[^/]+$/.test(p)) { res.writeHead(302, { Location: '/?ref=' + encodeURIComponent(decodeURIComponent(p.slice(3))) }); return res.end(); } - if (p.startsWith('/assets/') || p.startsWith('/art/house-') || p === '/art/mark.svg' || p === '/logo-icon.png' || p === '/robots.txt') { + // sitemap (2026-11-13, SEO): the public pages only + if (p === '/sitemap.xml') { + const day = new Date().toISOString().slice(0, 10); + const urls = ['/', '/board', '/how', '/ledger', '/contract', '/join'].map(u => 'https://' + C.site + u + '' + day + '').join(''); + res.writeHead(200, headers({ 'Content-Type': 'application/xml; charset=utf-8', 'Cache-Control': 'public, max-age=3600' })); + return res.end('' + urls + ''); + } + if (p.startsWith('/assets/') || p.startsWith('/art/house-') || p === '/art/mark.svg' || p === '/art/og-share.png' || p === '/logo-icon.png' || p === '/robots.txt') { const f = path.normalize(path.join(PUB, p)); if (!f.startsWith(PUB)) { res.writeHead(400); return res.end(); } return sendFile(res, f); } @@ -415,7 +422,8 @@ const server = http.createServer(async (req, res) => { if (p.startsWith('/api/')) return json(res, 404, { error: 'Not found' }); res.writeHead(404, headers({ 'Content-Type': 'text/html; charset=utf-8' })); - return res.end('Not found

    Not found. Downline Banners home

    '); + return res.end('Not found

    Not found. Downline Banners home

    ' + + '

    Network

    '); } catch (e) { console.error('request', p, e.message); if (!res.headersSent) json(res, 500, { error: 'Server error' });