diff --git a/public/assets/site.css b/public/assets/site.css index df82ebd..cd6e341 100644 --- a/public/assets/site.css +++ b/public/assets/site.css @@ -365,6 +365,11 @@ textarea{resize:vertical;font:inherit} .wall-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:16px;text-align:center} .wall-card img{max-width:100%;border-radius:10px;border:1px solid var(--line-strong)} .wall-pos{font-family:var(--mono);font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px} +.wc-creative img{max-width:100%;border-radius:10px;border:1px solid var(--line-strong)} +.wc-action{margin-top:10px;min-height:32px;display:flex;justify-content:center;align-items:center} +.wc-check{color:var(--mint);font-weight:800;border:1px solid var(--mint);border-radius:999px;padding:4px 14px; + box-shadow:0 0 14px rgba(67,232,195,.3)} +.wc-timer{color:var(--amber);font-weight:700;font-family:var(--mono);font-size:13px} /* ── modal (sponsor message) ── */ .modal-back{position:fixed;inset:0;z-index:100;background:rgba(2,6,5,.72);display:flex;align-items:center;justify-content:center;padding:20px} .modal-card{background:var(--panel-solid);border:1px solid var(--line-strong);border-radius:var(--radius); diff --git a/public/assets/wall.js b/public/assets/wall.js index ea8d7b5..6498d75 100644 --- a/public/assets/wall.js +++ b/public/assets/wall.js @@ -20,19 +20,47 @@ if (w.qrUrl) IAP.$('bioQr').src = w.qrUrl; IAP.$('wallCtaHead').textContent = 'Join ' + w.name + '’s line'; IAP.$('wallJoin').href = w.joinUrl; + // per-wall viewed-position memory (survives revisits; anonymous-friendly) + const VKEY = 'iap-wall-' + name; + let viewed = {}; + try { viewed = JSON.parse(localStorage.getItem(VKEY) || '{}'); } catch (e) {} + const DWELL = 10; const grid = IAP.$('wallGrid'); grid.innerHTML = ''; w.ladder.forEach((m, i) => { const d = document.createElement('div'); d.className = 'wall-card'; const safe = String(m.name || 'member').replace(/[&<>]/g, ''); + const creative = m.bannerUrl + ? '' + safe + ' banner' + : '' + safe + '
' + (m.targetUrl ? 'visit their site' : 'banner slot open') + ''; d.innerHTML = '
Position ' + (i + 1) + (i === 0 ? ' · this wall' : '') + '
' - + (m.bannerUrl - ? '' + safe + ' banner' - : m.targetUrl - ? '' + safe + '
visit their site
' - : '' + safe + '
banner slot open') + + '
' + creative + '
' + + '
' + '
' + safe + '
'; + const act = d.querySelector('.wc-action'); + const done = () => { act.innerHTML = '✓ viewed'; }; + if (!m.targetUrl) { act.innerHTML = 'no ad yet'; } + else if (viewed[i]) { done(); } + else { + const btn = document.createElement('button'); + btn.className = 'btn small'; btn.textContent = 'View this ad'; + btn.addEventListener('click', () => { + window.open(m.targetUrl, '_blank'); // real visit to the advertiser + let left = DWELL; + btn.disabled = true; + act.innerHTML = 'Viewing… ' + left + 's'; + const t = setInterval(() => { + left--; + if (left > 0) { act.querySelector('.wc-timer').textContent = 'Viewing… ' + left + 's'; return; } + clearInterval(t); + viewed[i] = 1; + try { localStorage.setItem(VKEY, JSON.stringify(viewed)); } catch (e) {} + done(); + }, 1000); + }); + act.appendChild(btn); + } grid.appendChild(d); }); })(); diff --git a/public/contract.html b/public/contract.html index d112fca..a42efe2 100644 --- a/public/contract.html +++ b/public/contract.html @@ -5,7 +5,7 @@ The contract | InstantAdPay - +
@@ -129,8 +129,8 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.
- - - + + + diff --git a/public/index.html b/public/index.html index 169340f..6ce1f09 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ InstantAdPay: advertise and earn, locked in code - + @@ -410,9 +410,9 @@ - - - - + + + + diff --git a/public/ledger.html b/public/ledger.html index 1251ed4..f376f1a 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -5,7 +5,7 @@ Live ledger | InstantAdPay - +
@@ -25,8 +25,8 @@
InstantAdPay · how it works · contract source ↗
- - - + + + diff --git a/public/my.html b/public/my.html index be34e90..46fea02 100644 --- a/public/my.html +++ b/public/my.html @@ -4,7 +4,7 @@ Member area | InstantAdPay - + @@ -555,9 +555,9 @@ - - - - + + + + diff --git a/public/tx.html b/public/tx.html index 751b335..4e20e85 100644 --- a/public/tx.html +++ b/public/tx.html @@ -4,7 +4,7 @@ Transaction | InstantAdPay - + @@ -33,7 +33,7 @@

← Back to the live ledger · Read the contract review

- - + + diff --git a/public/view.html b/public/view.html index 1620966..e3b6844 100644 --- a/public/view.html +++ b/public/view.html @@ -4,7 +4,7 @@ Viewing ad — InstantAdPay - +