Stack POL Pro: the member's LinkSpin Video Spin on their page ('Watch @user's videos', up to three Social Tube posters, every tap opens the spin link); Video Spins no longer listed among the plain spin links; My Stack POL says which Video Spin shows or how to make a first video (Marty 2026-11-23)
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -92,6 +92,7 @@ footer.site b{display:block;color:var(--ink);font:700 14px var(--display);margin
|
||||
.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}}
|
||||
.myvids{margin:28px 0}.vrow{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,220px));gap:14px}.vcard{position:relative;display:block;aspect-ratio:9/16;max-width:100%;border-radius:16px;overflow:hidden;background:var(--panel);border:1px solid var(--line);color:#fff;text-decoration:none}.vcard img{width:100%;height:100%;object-fit:cover;display:block}.vcard .vplay{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:54px;height:54px;border-radius:50%;background:rgba(20,10,40,.72);display:grid;place-items:center}.vcard b{position:absolute;left:0;right:0;bottom:0;padding:26px 10px 10px;font:700 13px/1.3 var(--body);background:linear-gradient(transparent,rgba(10,5,25,.85))}
|
||||
/* My Stack POL (2026-11-19) */
|
||||
nav.top a.mylink{color:#160b02;background:var(--gold);border-radius:999px;padding:3px 12px;margin-left:2px}nav.top a.mylink:hover,nav.top a.mylink[aria-current]{color:#160b02;background:#ffd27a}
|
||||
.myhero{padding:26px 0 4px}.myhead{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.soform{margin:0}
|
||||
@@ -186,6 +187,16 @@ 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>';
|
||||
}
|
||||
// Stack POL Pro (Marty 2026-11-23): the member's LinkSpin Video Spin. One short link that opens a different one of their Social Tube
|
||||
// videos each visit (made on Video App Income); LinkSpin counts the plays. Up to three posters, every one opens the same spin link.
|
||||
function memberVideos(who, st) {
|
||||
const v = st && st.pro && st.pro.video; if (!v || !/^[A-Za-z0-9]{3,20}$/.test(v.code || '')) return '';
|
||||
const url = 'https://' + MEMBER_HOST + '/r/' + v.code, ps = (v.posters || []).filter(p => /^https:\/\/socialtube\.club\//.test(p.poster || '')).slice(0, 3);
|
||||
const a = inner => '<a class="vcard" href="' + url + '" target="_blank" rel="noopener">' + inner + '</a>';
|
||||
const play = '<span class="vplay" aria-hidden="true"><svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></span>';
|
||||
const cards = ps.length ? ps.map(p => a('<img src="' + esc(p.poster) + '" alt="' + esc(p.label || 'Video') + '" loading="lazy">' + play + (p.label ? '<b>' + esc(p.label) + '</b>' : ''))).join('') : a(play + '<b>' + esc(v.name || 'Watch a video') + '</b>');
|
||||
return '<div class="myvids"><div class="sec-head"><h2>Watch @' + esc(who) + '\'s videos</h2><p>' + (v.count > 1 ? v.count + ' short videos. Each tap opens a different one.' : 'A short video, made on a phone.') + '</p></div><div class="vrow">' + cards + '</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>'
|
||||
@@ -200,4 +211,4 @@ function tail(extra) {
|
||||
// program cards (3 slots, which one rotates per hunter per day)
|
||||
+ '</div>' + (extra || '') + SPOT_JS + '<script src="https://polhunter.com/embed.js" data-slots="3" data-selector=".card" async></script><script src="/assets/chat.js?v=hide1" defer></script><script src="/assets/netweekend.js?v=20261117" data-site="stackpol" defer></script></body></html>';
|
||||
}
|
||||
module.exports = { SITE, esc, head, tail, OG, V, ZONES, spot, personalize, memberLinks, proCta, MEMBER_HOST };
|
||||
module.exports = { SITE, esc, head, tail, OG, V, ZONES, spot, personalize, memberLinks, memberVideos, proCta, MEMBER_HOST };
|
||||
|
||||
@@ -154,6 +154,8 @@ function memberPage(s, v, q) {
|
||||
const pr = v.stack && v.stack.pro;
|
||||
h += '<p class="mysub">Your page shows your own LinkSpin Banner Spins in the ad spots and your spin links, with your QR code. Any page opened with ?ref=' + esc(un) + ' carries your referral.</p>';
|
||||
if (pr) h += '<p class="mysub">On your page now: ' + fmtInt((pr.spins || []).length) + ' Banner Spin' + ((pr.spins || []).length === 1 ? '' : 's') + ', ' + fmtInt((pr.links || []).length) + ' spin link' + ((pr.links || []).length === 1 ? '' : 's') + '. <a href="https://linkspin.app/my" rel="noopener">Manage them in LinkSpin</a></p>';
|
||||
if (pr) h += pr.video ? '<p class="mysub">Your videos: the Video Spin "' + esc(pr.video.name) + '" (' + fmtInt(pr.video.count) + ' video' + (pr.video.count === 1 ? '' : 's') + ') shows on your page. <a href="https://linkspin.app/links" rel="noopener">Change it in LinkSpin</a></p>'
|
||||
: '<p class="mysub">No videos on your page yet. Make a video on Video App Income (the first one is free), then add it to a Video Spin in LinkSpin and it shows here. <a href="https://videoappincome.com/join?ref=' + esc(un) + '" rel="noopener">Make your first video</a></p>';
|
||||
h += copyRow('refurl', D.SITE + '/?ref=' + un, 'Any Stack POL page with your referral');
|
||||
} else {
|
||||
h += '<p class="mysub">Pro unlocks one time with any InstantAdPay ad package of $10 or more: your banners in the ad spots, your links and your QR code on your page.</p><div class="cta" style="margin-top:12px"><a class="btn sec" href="https://instantadpay.com/my#promo?s=stackpol" rel="noopener">See Pro in InstantAdPay</a></div>';
|
||||
|
||||
@@ -15,7 +15,7 @@ const path = require('path');
|
||||
const DATA_DIR = process.env.DATA_DIR || path.join(__dirname, 'data');
|
||||
const docstore = require('./docstore'); docstore.install(DATA_DIR); // before any module reads data
|
||||
const zlib = require('zlib');
|
||||
const { SITE, esc, head, tail, ZONES, spot, personalize, memberLinks, proCta } = require('./layout');
|
||||
const { SITE, esc, head, tail, ZONES, spot, personalize, memberLinks, memberVideos, proCta } = require('./layout');
|
||||
let QR = null; try { QR = require('qrcode'); } catch (e) { console.error('[stackpol] qrcode module missing: no QR on Pro pages'); }
|
||||
const { PROGRAMS, BY_KEY, BY_SLUG } = require('./programs');
|
||||
const blog = require('./blog');
|
||||
@@ -146,6 +146,7 @@ function stackPage(u, st) {
|
||||
if (st.pro) { // Stack POL Pro (2026-11-09): the member's own links and a purple Polygon QR that opens this page
|
||||
h += '<div class="prorow"><div style="min-width:0">' + (memberLinks(u, st) || '<p class="kick">@' + esc(u) + '\'s page</p>') + '<p class="lead" style="margin:6px 0 0">Scan the code to open @' + esc(u) + '\'s stack on your phone, or share it anywhere people can see it.</p></div>'
|
||||
+ (QR ? '<div class="qr"><img src="/qr/' + esc(u) + '.svg" alt="QR code for stackpol.com/' + esc(u) + '" width="150" height="150"><span>stackpol.com/' + esc(u) + '</span></div>' : '') + '</div>';
|
||||
h += memberVideos(u, st); // their LinkSpin Video Spin (2026-11-23)
|
||||
}
|
||||
h += spot(ZONES.banner, ZONES.strip);
|
||||
h += '<div class="sec-head"><h2>@' + esc(u) + '\'s latest payouts</h2></div>' + tableHead(false) + ledgerRows(st.recent || [], false) + '</tbody></table></div>';
|
||||
|
||||
+15
-1
@@ -509,8 +509,22 @@ def main():
|
||||
spins = [{'code': x['code'], 'size': x.get('size', ''), 'name': str(x.get('name') or '')[:60]} for x in bs
|
||||
if str(x.get('owner', '')).lower() in mine and not x.get('paused') and any(b.get('active', True) for b in x.get('banners') or [])]
|
||||
links = [{'code': x['code'], 'name': str(x.get('name') or '')[:60]} for x in rt
|
||||
if str(x.get('owner', '')).lower() in mine and not x.get('paused') and any(d.get('active', True) for d in x.get('destinations') or [])]
|
||||
if not x.get('kind') and str(x.get('owner', '')).lower() in mine and not x.get('paused') and any(d.get('active', True) for d in x.get('destinations') or [])]
|
||||
stacks[un]['pro'] = {'spins': spins[:40], 'links': links[:20]}
|
||||
# Video Spins (Marty 2026-11-23): a LinkSpin spin link of kind 'video' rotates the member's Social Tube video pages. The page shows
|
||||
# ONE: the Video Spin with the most live videos, newest on a tie (play counts are not in this document). Posters come from Social Tube.
|
||||
vs = []
|
||||
for x in rt:
|
||||
if x.get('kind') != 'video' or str(x.get('owner', '')).lower() not in mine or x.get('paused'):
|
||||
continue
|
||||
live = [d for d in (x.get('destinations') or []) if d.get('active', True) and not d.get('autoPaused')]
|
||||
if live:
|
||||
vs.append((len(live), x.get('created') or 0, x, live))
|
||||
if vs:
|
||||
n, _, x, live = max(vs, key=lambda t: (t[0], t[1]))
|
||||
posters = [{'poster': str(d.get('poster'))[:200], 'label': str(d.get('label') or '')[:80]} for d in live
|
||||
if str(d.get('poster') or '').startswith('https://socialtube.club/')][:3]
|
||||
stacks[un]['pro']['video'] = {'code': x['code'], 'name': str(x.get('name') or '')[:60], 'count': n, 'posters': posters}
|
||||
# My Stack POL (Marty 2026-11-19): the signed-in member area. Every paid member's own rows (newest first, up to 500), their totals
|
||||
# (the same sums as their public stack), the wallets mapped to them, whether their page is on, plus IAP's explicit switches and Pro
|
||||
# owners. Read only by /my for the member who is signed in; never rendered on a public page, so a switched-off member stays hidden.
|
||||
|
||||
Reference in New Issue
Block a user