Stack POL Pro pages (Marty 2026-11-09): a Pro member's page shows their own LinkSpin Banner Spins in the ad spots (a spot with no fitting size keeps the network zone), their spin links, a purple Polygon QR to the page (/qr/<username>.svg, qrcode module) and a "Want a personalized page like this?" panel (join under the member, or Unlock Pro in IAP). Every page opened with ?ref=<Pro member> credits them on every call to action (join links, game links, program pages, internal links carry the ref) and shows their banners; no ref or a non-Pro ref = the standard network pages and zones. Blog posts now carry an ad spot after the third paragraph, and personalized posts end with the member's links and the Pro panel. Member pages also get a network spot and the latest blog posts. Indexer reads pro[] from IAP stack-optin.json and adds each Pro member's active spins and spin links (matched by username in LinkSpin).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,13 @@ footer.site b{display:block;color:var(--ink);font:700 14px var(--display);margin
|
||||
.crumb{font-size:13px;color:var(--muted);margin-top:26px}.crumb a{color:var(--muted)}
|
||||
/* ad spots (LinkSpin zones): neutral class names, ad blockers hide .adzone-style names (feedback 2026-10-08) */
|
||||
.spot{display:flex;flex-direction:column;align-items:center;gap:4px;margin:28px auto;max-width:100%;overflow:hidden}.spot .sl{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
|
||||
/* Stack POL Pro (2026-11-09): the member's own links, the purple QR, the get-a-page-like-this panel */
|
||||
.mylinks{margin:26px 0}.mylinks .ml{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
|
||||
.prorow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:22px;align-items:center;background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:20px;margin:28px 0}
|
||||
.qr{background:#fff;border-radius:14px;padding:10px;width:170px;text-align:center}.qr img{display:block;width:150px;height:150px}.qr span{font:700 11px var(--body);color:#5b2bb5;letter-spacing:.06em;text-transform:uppercase}
|
||||
.procta{display:flex;flex-wrap:wrap;gap:12px 16px;align-items:center;border:1px solid var(--violet);border-radius:18px;padding:18px 20px;margin:30px 0;background:linear-gradient(135deg,rgba(130,71,229,.16),transparent)}
|
||||
.procta div{flex:1 1 280px;min-width:0}.procta b{display:block;font:800 18px var(--display);margin-bottom:4px}.procta span{color:var(--muted)}
|
||||
@media (max-width:640px){.prorow{grid-template-columns:1fr}.qr{margin:0 auto}}
|
||||
@media (prefers-reduced-motion:reduce){.card,.btn{transition:none}.card:hover{transform:none}}
|
||||
`;
|
||||
|
||||
@@ -116,7 +123,43 @@ function head(o) {
|
||||
// hidden size never counts a view. Zones are on Marty's LinkSpin account, site stackpol.com (created 2026-11-09).
|
||||
const ZONES = { banner: 'ls-9c2a52', strip: 'ls-dc8bdd', blogBox: 'ls-72413f', ledgerBox: 'ls-1f308f' };
|
||||
const spot = (wide, narrow) => '<div class="spot" data-w="' + (wide || '') + '" data-n="' + (narrow || wide || '') + '"><span class="sl">Sponsored</span></div>';
|
||||
const SPOT_JS = '<script>(function(){var w=innerWidth>=760;document.querySelectorAll(".spot").forEach(function(d){var id=w?d.dataset.w:d.dataset.n;if(!id){d.remove();return;}var s=document.createElement("script");s.async=true;s.src="https://linkspin.app/z.js";s.setAttribute("data-zone",id);d.appendChild(s);});})();</script>';
|
||||
const MEMBER_HOST = 'rubav.com'; // a LinkSpin link domain: /i/<code>.gif image, /c/<code> click, /r/<code> spin link
|
||||
const SPOT_JS = '<script>(function(){var w=innerWidth>=760;document.querySelectorAll(".spot").forEach(function(d){var m=w?d.dataset.mw:d.dataset.mn;if(m){m=m.split("|");var a=document.createElement("a");a.href="https://' + MEMBER_HOST + '/c/"+m[0];a.target="_blank";a.rel="sponsored noopener";var i=document.createElement("img");i.src="https://' + MEMBER_HOST + '/i/"+m[0]+".gif";i.width=+m[1];i.height=+m[2];i.alt="";i.style.cssText="max-width:100%;height:auto";a.appendChild(i);d.appendChild(a);return;}var id=w?d.dataset.w:d.dataset.n;if(!id){d.remove();return;}var s=document.createElement("script");s.async=true;s.src="https://linkspin.app/z.js";s.setAttribute("data-zone",id);d.appendChild(s);});})();</script>';
|
||||
// Stack POL Pro (2026-11-09): a page that belongs to a Pro member (their /<username>, or any page opened with ?ref=<username>) shows
|
||||
// THEIR LinkSpin Banner Spins in the ad spots instead of the network zones (a spot with no spin of a fitting size keeps the network
|
||||
// zone), and every internal link and join link carries their referral. Free members' pages keep the network zones but still credit
|
||||
// the member on join links. Not personalized = the standard network ads.
|
||||
const FIT = { [ZONES.banner]: ['728x90', '468x60'], [ZONES.strip]: ['468x60', '300x250', '125x125'], [ZONES.blogBox]: ['300x250', '125x125', '468x60'], [ZONES.ledgerBox]: ['300x250', '125x125', '468x60'] };
|
||||
function pickSpin(spins, zone) {
|
||||
for (const size of FIT[zone] || []) { const c = spins.filter(x => x.size === size); if (c.length) { const x = c[Math.floor(Math.random() * c.length)]; return x.code + '|' + size.replace('x', '|'); } }
|
||||
return '';
|
||||
}
|
||||
function personalize(html, who, st) {
|
||||
if (!who) return html;
|
||||
const pro = st && st.pro, spins = (pro && pro.spins) || [];
|
||||
if (spins.length) html = html.replace(/<div class="spot" data-w="([^"]*)" data-n="([^"]*)">/g, (m, w, n) => {
|
||||
const mw = pickSpin(spins, w), mn = pickSpin(spins, n);
|
||||
return '<div class="spot mine" data-w="' + w + '" data-n="' + n + '"' + (mw ? ' data-mw="' + mw + '"' : '') + (mn ? ' data-mn="' + mn + '"' : '') + '>';
|
||||
});
|
||||
return html.replace(/href="([^"]*)"/g, (m, h) => {
|
||||
if (/^\/(earn|blog|programs|ledger)(\/|\?|$)/.test(h) && !/\/blog\/feed\.xml/.test(h)) return 'href="' + h + (h.includes('?') ? '&' : '?') + 'ref=' + who + '"';
|
||||
if (h === '/') return 'href="/' + who + '"';
|
||||
if (/^https:\/\/(instantadpay\.com|linkspin\.app)\/?$/.test(h)) return 'href="' + h.replace(/\/?$/, '/join/' + who) + '"';
|
||||
if (/^https:\/\/(instantadpay\.com|linkspin\.app)\//.test(h)) return 'href="' + h.replace(/\/join\/martbost\b/, '/join/' + who).replace(/([?&](?:amp;)?ref=)martbost\b/, '$1' + who) + '"';
|
||||
return m;
|
||||
});
|
||||
}
|
||||
// shown on a Pro page and on articles opened from one: the visitor can get a page like this (Marty 2026-11-09). New visitors join
|
||||
// under the Pro member; members go straight to the Stack POL tab, where Get Pro opens the order a $10+ package fulfils.
|
||||
function proCta(who) {
|
||||
return '<div class="procta"><div><b>Want a personalized page like this?</b><span>Your own Stack POL page with your banners, your links and your QR code. Unlocked one time with any InstantAdPay ad package of $10 or more.</span></div>'
|
||||
+ '<a class="btn" href="https://instantadpay.com/join/' + esc(who) + '?src=stackpol-pro" rel="noopener">Get your own page</a><a class="btn sec" href="https://instantadpay.com/my#promo?s=stackpol" rel="noopener">Already a member? Unlock Pro</a></div>';
|
||||
}
|
||||
// the member's spin links, as a block for their page and the end of articles opened from it
|
||||
function memberLinks(who, st) {
|
||||
const links = (st && st.pro && st.pro.links) || []; if (!links.length) return '';
|
||||
return '<div class="mylinks"><p class="kick">@' + esc(who) + ' recommends</p><div class="ml">' + links.map(l => '<a class="chip" href="https://' + MEMBER_HOST + '/r/' + esc(l.code) + '" target="_blank" rel="sponsored noopener">' + esc(l.name || 'Open link') + ' →</a>').join('') + '</div></div>';
|
||||
}
|
||||
function tail(extra) {
|
||||
const year = new Date().getFullYear();
|
||||
return '<footer class="site"><div><b>Stack POL</b>Every POL payout across the network, stacked in one place and checkable on Polygon.</div>'
|
||||
@@ -126,4 +169,4 @@ function tail(extra) {
|
||||
+ '<p class="disc">© ' + year + ' Stack POL, part of the Crypto Team Build Network. Stack POL shows payouts; it does not hold, invest or pay out anyone\'s money.</p>'
|
||||
+ '</div>' + (extra || '') + SPOT_JS + '</body></html>';
|
||||
}
|
||||
module.exports = { SITE, esc, head, tail, OG, V, ZONES, spot };
|
||||
module.exports = { SITE, esc, head, tail, OG, V, ZONES, spot, personalize, memberLinks, proCta, MEMBER_HOST };
|
||||
|
||||
Reference in New Issue
Block a user