← back to Rentv 2026
TK-10350: verify 5 distinct template variants + wire template D video cards into ad inventory (all 123 videos sponsorable)
931727116ae6a3ce834680e60e742f163f2d1420 · 2026-08-07 14:00:28 -0700 · Steve
- Verified /2026/{a,b,c,d,e}.html all render (HTTP 200, no JS errors — only
cosmetic favicon + prod-only news-thumbnail 404s) and are genuinely distinct
UI/UX directions: A Video Wall (dark, video-forward), B Editorial (serif
news river), C Cinematic (pure-black, red accent), D Magazine (navy serif
front page), E Dashboard (monospace CRE terminal).
- Confirmed all 123 vimeo-library videos are wired as sponsorable ad inventory
via src/ad-system.cjs (/api/ad/inventory: total 154, vimeo 123, 0 missing,
every item drillable via view_url/embed).
- FIX: template D had sponsoredFlag() helper + CSS defined but never called —
its /api/videos-driven cards showed no per-video sponsorship layer that
A/B/C/E have. Added loadSponsorMap() + sponsorForVideo() to merge
/api/ad/inventory sponsorship state onto D's review cards + Video-of-Week
hero. Verified headless: D now renders SPONSORED flags (Kidder Mathews, JLL)
+ Sponsor-this offers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit 931727116ae6a3ce834680e60e742f163f2d1420
Author: Steve <steve@designerwallcoverings.com>
Date: Fri Aug 7 14:00:28 2026 -0700
TK-10350: verify 5 distinct template variants + wire template D video cards into ad inventory (all 123 videos sponsorable)
- Verified /2026/{a,b,c,d,e}.html all render (HTTP 200, no JS errors — only
cosmetic favicon + prod-only news-thumbnail 404s) and are genuinely distinct
UI/UX directions: A Video Wall (dark, video-forward), B Editorial (serif
news river), C Cinematic (pure-black, red accent), D Magazine (navy serif
front page), E Dashboard (monospace CRE terminal).
- Confirmed all 123 vimeo-library videos are wired as sponsorable ad inventory
via src/ad-system.cjs (/api/ad/inventory: total 154, vimeo 123, 0 missing,
every item drillable via view_url/embed).
- FIX: template D had sponsoredFlag() helper + CSS defined but never called —
its /api/videos-driven cards showed no per-video sponsorship layer that
A/B/C/E have. Added loadSponsorMap() + sponsorForVideo() to merge
/api/ad/inventory sponsorship state onto D's review cards + Video-of-Week
hero. Verified headless: D now renders SPONSORED flags (Kidder Mathews, JLL)
+ Sponsor-this offers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
public/2026/d.html | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/public/2026/d.html b/public/2026/d.html
index 8dd90156..c8e6b7d1 100644
--- a/public/2026/d.html
+++ b/public/2026/d.html
@@ -1419,9 +1419,28 @@ function sponsoredFlag(sp) {
return '<a href="/advertise?video=' + encodeURIComponent(sp.uid||'') + '" class="sponsor-hover" tabindex="-1" aria-label="Sponsor this video">Sponsor this →</a>';
}
+/* ─── Sponsorship inventory map (uid → {status, advertiser, uid, price_monthly}) ─── */
+let SPONSOR_BY_UID = {};
+async function loadSponsorMap() {
+ try {
+ const r = await fetch('/api/ad/inventory');
+ const j = await r.json();
+ (j.items || []).forEach(function(it) {
+ if (it.uid) SPONSOR_BY_UID[it.uid] = Object.assign({ uid: it.uid }, it.sponsorship || {});
+ });
+ } catch (e) { console.warn('ad inventory failed:', e); }
+}
+// Resolve a /api/videos row to its ad-inventory sponsorship record.
+function sponsorForVideo(v) {
+ if (!v) return null;
+ const uid = v.uid || (v.id != null ? 'yt-' + v.id : null);
+ return (uid && SPONSOR_BY_UID[uid]) || null;
+}
+
/* ─── Load videos (pinned + REview grid) ─── */
async function loadVideos() {
try {
+ await loadSponsorMap();
const r = await fetch('/api/videos');
const data = await r.json();
const items = data.items || [];
@@ -1440,7 +1459,7 @@ async function loadVideos() {
const t = document.getElementById('votw-title');
const d = document.getElementById('votw-desc');
if (t) t.textContent = pinned.title;
- if (d) d.textContent = pinned.desc || '';
+ if (d) d.innerHTML = esc(pinned.desc || '') + ' ' + sponsoredFlag(sponsorForVideo(pinned));
}
// REview grid
@@ -1456,6 +1475,7 @@ async function loadVideos() {
'<div class="review-vid-meta">' +
'<div class="cat-tag-dark">' + esc(v.cat || 'Video') + '</div>' +
'<h4>' + esc(v.title) + '</h4>' +
+ sponsoredFlag(sponsorForVideo(v)) +
'</div>' +
'</article>';
}).join('');
← 1add61c9 docs: surgical deploy handoff for claude-rentv-max (toggle +
·
back to Rentv 2026
·
TK-10350: render-proof screenshots for the 5 template varian 72de4de2 →