Member ads everywhere they belong: text strip under every pane title, banner at the foot of each main pane, wall + plays slots; Network views as its own campaign column
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -129,6 +129,7 @@ window.IAP = (function () {
|
||||
const { ad } = await (await fetch(q)).json();
|
||||
const el = $(elId);
|
||||
if (!ad || !el) return;
|
||||
el.hidden = false;
|
||||
if (ad.imageUrl) {
|
||||
el.style.textAlign = 'center';
|
||||
el.innerHTML = '<a href="' + ad.targetUrl + '" target="_blank" rel="noopener nofollow">'
|
||||
|
||||
+7
-4
@@ -462,6 +462,9 @@
|
||||
document.querySelectorAll('.bo-menu [data-pane]').forEach(b =>
|
||||
b.classList.toggle('on', b.dataset.pane === name));
|
||||
if ($('boTitle')) $('boTitle').textContent = TITLES[name];
|
||||
// member ads: a fresh text ad in the strip under the title, and a banner at the foot of the pane
|
||||
IAP.adSlot('text', 'adStripTop');
|
||||
if ($('adSlotPane-' + name)) IAP.adSlot('banner', 'adSlotPane-' + name);
|
||||
if (name === 'earn') setEarnSub(earnSub); // refresh whichever sub-tab is active
|
||||
if (name === 'profile') loadLineBanner();
|
||||
if (name === 'line') { loadLineage(); loadUplineMessages(); loadCoach(); loadLinkStats(); loadProspects(); }
|
||||
@@ -602,13 +605,13 @@
|
||||
if (!r.campaigns.length) { el.innerHTML = '<p class="muted small">No campaigns yet. Launch your first below.</p>'; return; }
|
||||
const tbl = document.createElement('div');
|
||||
tbl.className = 'tablewrap';
|
||||
tbl.innerHTML = '<table><thead><tr><th>Name</th><th>Type</th><th class="num">Views</th><th class="num">Clicks</th>'
|
||||
tbl.innerHTML = '<table><thead><tr><th>Name</th><th>Type</th><th class="num">Views here</th><th class="num" title="Impressions delivered by Network Ad Space across the wider network (banner and text ads only)">Network views</th><th class="num">Clicks</th>'
|
||||
+ '<th class="num">Spent</th><th class="num">Budget</th><th>Status</th><th></th></tr></thead><tbody>'
|
||||
+ r.campaigns.map(c => '<tr><td><b>' + c.name + '</b></td>'
|
||||
+ '<td>' + c.type + (c.type === 'banner' && c.width ? ' <span class="muted small">' + c.width + '×' + c.height + '</span>' : '') + '</td>'
|
||||
+ '<td class="num">' + c.imps.toLocaleString()
|
||||
+ (c.impsNas ? ' <span class="muted small" title="views across the network">+' + c.impsNas.toLocaleString() + ' network</span>' : '')
|
||||
+ '</td><td class="num">' + c.clicks + '</td>'
|
||||
+ '<td class="num">' + c.imps.toLocaleString() + '</td>'
|
||||
+ '<td class="num">' + (['banner', 'text'].includes(c.type) ? (c.impsNas || 0).toLocaleString() : '<span class="muted small" title="only banner and text ads syndicate to the network">n/a</span>') + '</td>'
|
||||
+ '<td class="num">' + c.clicks + '</td>'
|
||||
+ '<td class="num">' + c.spent + '</td><td class="num">' + c.budget + '</td>'
|
||||
+ '<td>' + (c.status === 'out' ? '<span class="badge amber">budget spent</span>' : c.status) + '</td>'
|
||||
+ '<td>' + (c.status === 'active' ? '<button class="btn small sec" data-camp="' + c.id + '" data-act="pause">Pause</button>'
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
document.getElementById('gate').style.display = signedIn ? 'none' : 'block';
|
||||
document.getElementById('body').style.display = signedIn ? 'block' : 'none';
|
||||
if (!signedIn) return;
|
||||
try { IAP.adSlot('banner', 'adSlotPlays'); } catch (e) {}
|
||||
const pb = document.getElementById('printBtn'); if (pb) pb.addEventListener('click', () => window.print());
|
||||
const tok = me.username || me.refCode || me.memberId;
|
||||
if (tok) document.querySelectorAll('[data-link]').forEach(el => { el.textContent = location.origin + '/join/' + tok; });
|
||||
|
||||
@@ -213,6 +213,11 @@ tr:last-child td{border-bottom:0}
|
||||
.boot-spin{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;min-height:60vh}
|
||||
.boot-spin .ring{width:46px;height:46px;border-radius:50%;border:4px solid rgba(67,232,195,.18);border-top-color:var(--mint);animation:bootspin .9s linear infinite}
|
||||
@keyframes bootspin{to{transform:rotate(360deg)}}
|
||||
.bo-top{flex-wrap:wrap}
|
||||
.ad-strip{flex:1 1 100%;font-size:13.5px;padding:8px 0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.ad-strip a{color:var(--ink)}
|
||||
.ad-strip b{color:var(--mint)}
|
||||
.ad-foot{text-align:center}
|
||||
.done-big{display:flex;flex-direction:column;align-items:center;gap:6px;padding:26px 16px;text-align:center}
|
||||
.done-big .tick{width:84px;height:84px;border-radius:50%;display:grid;place-items:center;font-size:48px;font-weight:800;color:var(--mint-ink);background:var(--mint);box-shadow:0 0 0 10px rgba(67,232,195,.15),0 10px 30px rgba(67,232,195,.35)}
|
||||
.done-big b{font-family:var(--disp);font-size:22px;margin-top:8px}
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
try { viewed = JSON.parse(localStorage.getItem(VKEY) || '{}'); } catch (e) {}
|
||||
const DWELL = 10;
|
||||
const grid = IAP.$('wallGrid');
|
||||
IAP.adSlot('text', 'adSlotWallText'); IAP.adSlot('banner', 'adSlotWallBanner');
|
||||
grid.innerHTML = '';
|
||||
// join is gated: you must view every ad on the wall before you can join
|
||||
const joinBtn = IAP.$('wallJoin'), gate = IAP.$('wallGate');
|
||||
|
||||
Reference in New Issue
Block a user