Files
yourprogrambuilder/public/assets/front.js
T
martbost a8a1a8eec7 YourProgramBuilder, the Seed Bed (Marty 2026-11-17: "keep fleshing it out"): STAGING build
Plant a program free (referral link with {id}, link check green / yellow / red, daily recheck, reports), members save their
referral IDs in its packet, a sponsor-first link (member page / ?r= / the hub sponsor line, then the planter), the sprout meter
to REVIEW_SAVES (DEFAULT 25) -> Marty's review queue -> approved packets exported for the CTB builder / DownlineHydra wild heads
with every saved ID. Dormant old programs confirmed by their owner, old-link redirects (oldrefs), Spotlight on YPBShop (NOT
deployed; DEFAULT $10 / 1,000 views, 20/5/5/5/5, company 60), verified views with Spotlight delivery, trust pack (ledger,
contract, toasts, Telegram card, terms / disclaimer / privacy, TrustClickz only), network footer row, chatbot, promo kit,
Guides, PolHunter slot, LinkSpin tracked-link and zone hooks, AI writer through the hub. Seed-catalog look from the approved
mockup. Tests: qa/unit.test.cjs 33/33, qa/e2e.mjs 121/121 on a local anvil chain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:30:59 -06:00

21 lines
1.5 KiB
JavaScript

// The Seed Bed (front page): the Spotlight row, the bed of packets with its filters, the verified visit, the PolHunter slot.
(async function () {
const $ = YPB.$;
let d = { bed: [] };
try { d = await YPB.wire('front'); } catch (e) {}
YPB.spotRow($('spots'), d);
const bed = d.bed || [];
let f = 'all';
const keep = x => f === 'all' || (f === 'sprouting' && x.stage === 'sprouting') || (f === 'review' && x.stage === 'review') || (f === 'free' && x.cost === 'free') || (f === 'crypto' && !!x.contract);
const paint = () => {
const l = bed.filter(keep);
$('bedList').innerHTML = l.length ? l.map(x => YPB.packetCard(x, { place: 'bed' })).join('')
: '<p class="empty">' + (bed.length ? 'No packet matches that filter yet.' : 'The Seed Bed is ready for its first program. <a href="/my?tab=plant">Plant yours, free</a>.') + '</p>';
YPB.decorate();
};
document.querySelectorAll('.filters .chip').forEach(b => { b.onclick = () => { f = b.dataset.f; document.querySelectorAll('.filters .chip').forEach(x => x.setAttribute('aria-pressed', String(x === b))); paint(); }; });
paint();
// PolHunter embed (the network pattern): the find code hides in one of the three steps. The mission is added in polhunter.com/admin at go-live.
const ph = document.createElement('script'); ph.async = true; ph.src = 'https://polhunter.com/embed.js'; ph.setAttribute('data-slots', '3'); ph.setAttribute('data-selector', '#how .step'); document.body.appendChild(ph);
})();