← back to Wallco Ai
feat(pdp): V11 Best-of composite — merge V1+V3+V9 strengths
5c516fe9ed244330f6edfeadc63de9b7fe6d6680 · 2026-05-29 07:41:14 -0700 · Steve Abrams
Pinned hero L (V3) + sticky tabbed buy rail R (V3 tabs in V1 rail) + V9's
3-up Pattern/Room/At-Scale preview row below the fold + full-width Pairs
grid + 3-up footer accordions for deep-tail content (generator, tags,
motifs).
Right rail tabs: Buy (CTAs always visible above tabs + calc + palette +
adjust) · Specs · Coords · Trade · Share. /design/:id/best route + ★
Recommended menu entry placed just below Classic.
Files touched
A public/theme-variants/v11-best.htmlM server.js
Diff
commit 5c516fe9ed244330f6edfeadc63de9b7fe6d6680
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri May 29 07:41:14 2026 -0700
feat(pdp): V11 Best-of composite — merge V1+V3+V9 strengths
Pinned hero L (V3) + sticky tabbed buy rail R (V3 tabs in V1 rail) + V9's
3-up Pattern/Room/At-Scale preview row below the fold + full-width Pairs
grid + 3-up footer accordions for deep-tail content (generator, tags,
motifs).
Right rail tabs: Buy (CTAs always visible above tabs + calc + palette +
adjust) · Specs · Coords · Trade · Share. /design/:id/best route + ★
Recommended menu entry placed just below Classic.
---
public/theme-variants/v11-best.html | 574 ++++++++++++++++++++++++++++++++++++
server.js | 4 +
2 files changed, 578 insertions(+)
diff --git a/public/theme-variants/v11-best.html b/public/theme-variants/v11-best.html
new file mode 100644
index 0000000..4662d09
--- /dev/null
+++ b/public/theme-variants/v11-best.html
@@ -0,0 +1,574 @@
+<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>wallco.ai — Best-of Composite PDP</title>
+<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
+<style>
+ :root {
+ --bg: #faf8f3; --ink: #1a1611; --muted: #8a8276; --line: #e2dccd;
+ --panel: #f3efe5; --panel-2: #ebe5d6; --accent: #c9b07a; --accent-dk: #1a1611;
+ --hero-bg: #e6dfd2; --calc: #ddd4ec; --coord: #d3e3e5;
+ --share: #f3dcce; --room: #cfdac4; --rate: #f0e7c3; --trade: #e6ddd2;
+ --tab-bg: #efe9da; --tab-active: #faf8f3;
+ --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
+ --serif: "Cormorant Garamond", Georgia, serif;
+ --r: 10px;
+ }
+ * { box-sizing: border-box; }
+ html, body { margin: 0; padding: 0; }
+ body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
+ a { color: inherit; } button { font: inherit; cursor: pointer; }
+
+ /* ── topbar ─────────────────────────────────────────────────────────── */
+ header.topbar {
+ position: sticky; top: 0; z-index: 30;
+ background: rgba(250,248,243,.92); backdrop-filter: blur(10px);
+ border-bottom: 1px solid var(--line); padding: 10px 28px;
+ display: flex; align-items: center; gap: 24px;
+ }
+ header .brand { font: 600 18px/1 var(--serif); letter-spacing: .05em; }
+ header nav { font-size: 12.5px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
+ header nav a { text-decoration: none; }
+ header nav a:hover { color: var(--ink); }
+ header .grow { flex: 1; }
+ header .switcher { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
+ header .switcher a { text-decoration: underline; color: var(--ink); }
+ header .badge {
+ background: var(--accent); color: var(--accent-dk);
+ padding: 3px 8px; border-radius: 999px;
+ font: 700 9.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
+ }
+
+ /* ── breadcrumb ─────────────────────────────────────────────────────── */
+ .crumb { max-width: 1640px; margin: 0 auto; padding: 14px 28px 0; display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
+ .crumb .grow { flex: 1; }
+ .crumb a { color: var(--ink); text-decoration: none; }
+ .crumb .nav a { color: var(--muted); }
+
+ /* ── two-column upper: hero L + tabbed buy rail R ─────────────────── */
+ main.best { max-width: 1640px; margin: 0 auto; padding: 14px 28px 60px; display: flex; flex-direction: column; gap: 28px; }
+ .upper {
+ display: grid;
+ grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
+ gap: 28px; align-items: start;
+ }
+
+ .col-hero {
+ position: sticky; top: 62px;
+ height: calc(100vh - 92px);
+ background: var(--hero-bg);
+ border-radius: var(--r);
+ overflow: hidden;
+ box-shadow: 0 1px 0 var(--line);
+ }
+ .col-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
+ .col-hero .pill {
+ position: absolute; top: 14px; right: 14px;
+ background: rgba(250,248,243,.94); color: var(--ink);
+ font: 600 10.5px/1 var(--sans); letter-spacing: .06em;
+ padding: 7px 11px; border-radius: 999px; text-transform: uppercase;
+ }
+ .col-hero .info {
+ position: absolute; left: 14px; bottom: 14px;
+ background: rgba(26,22,17,.78); color: #f0eada;
+ font: 600 11px/1 var(--sans); letter-spacing: .06em;
+ padding: 8px 12px; border-radius: 6px; text-transform: uppercase;
+ }
+
+ /* ── right rail: title + tabs ──────────────────────────────────────── */
+ .col-pane { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
+
+ .title-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
+ .title-card .name { font: 500 28px/1.1 var(--serif); margin: 4px 0 6px; }
+ .title-card .meta { color: var(--muted); font-size: 12.5px; }
+ .title-card .meta .sep { padding: 0 6px; opacity: .5; }
+ .title-card .chips { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
+ .chip {
+ display: inline-flex; align-items: center; gap: 6px;
+ background: var(--panel-2); color: var(--ink);
+ border-radius: 999px; padding: 5px 10px;
+ font: 500 11px/1 var(--sans); border: 1px solid var(--line);
+ }
+ .chip .dot { width: 10px; height: 10px; border-radius: 999px; }
+
+ /* primary CTAs always-visible at top of rail (V1) */
+ .cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
+ .cta {
+ display: flex; align-items: center; justify-content: center;
+ border-radius: var(--r); padding: 0 18px;
+ font: 700 12.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
+ height: 60px; border: 1px solid transparent;
+ }
+ .cta.sample { background: var(--accent); color: var(--accent-dk); }
+ .cta.buy { background: var(--accent-dk); color: #f0eada; }
+ .cta:hover { filter: brightness(1.04); }
+
+ /* tab bar (V3) */
+ .tab-bar {
+ background: var(--tab-bg);
+ border-radius: var(--r) var(--r) 0 0;
+ border: 1px solid var(--line); border-bottom: 0;
+ display: grid; grid-template-columns: repeat(5, 1fr);
+ overflow: hidden;
+ }
+ .tab-btn {
+ background: transparent; border: 0; padding: 12px 6px;
+ font: 600 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
+ color: var(--muted); cursor: pointer;
+ border-bottom: 2px solid transparent;
+ transition: all .12s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
+ }
+ .tab-btn:hover { color: var(--ink); background: rgba(255,255,255,.4); }
+ .tab-btn.active { color: var(--ink); background: var(--tab-active); border-bottom-color: var(--accent); }
+ .tab-pane {
+ background: var(--tab-active);
+ border: 1px solid var(--line); border-top: 0;
+ border-radius: 0 0 var(--r) var(--r);
+ padding: 18px;
+ min-height: 380px;
+ }
+ .tab-panel { display: none; }
+ .tab-panel.active { display: block; }
+
+ /* shared sub-card */
+ .sub {
+ background: var(--panel); border: 1px solid var(--line);
+ border-radius: 8px; padding: 14px;
+ margin-bottom: 12px;
+ }
+ .sub:last-child { margin-bottom: 0; }
+ .sub h4 {
+ margin: 0 0 10px;
+ font: 600 10.5px/1.2 var(--sans);
+ text-transform: uppercase; letter-spacing: .08em;
+ color: var(--muted);
+ }
+
+ .calc { background: var(--calc); }
+ .calc .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
+ .calc label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 2px; }
+ .calc input, .calc select { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
+ .calc .total { margin-top: 6px; padding: 10px; background: rgba(255,255,255,.6); border-radius: 8px; font-size: 12.5px; }
+ .calc .total b { font: 500 16px var(--serif); }
+
+ .swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
+ .sw { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); position: relative; cursor: pointer; }
+ .sw:hover .lbl { display: block; }
+ .sw .lbl { display: none; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 6px; white-space: nowrap; font: 500 10px/1 var(--sans); background: var(--ink); color: var(--bg); padding: 4px 6px; border-radius: 4px; z-index: 5; }
+ .dom { font-size: 11px; color: var(--muted); margin-top: 8px; }
+
+ .adjust .sl { display: grid; grid-template-columns: 70px 1fr 32px; align-items: center; gap: 6px; font-size: 11px; padding: 2px 0; }
+ .adjust .sl input[type=range] { accent-color: var(--accent); width: 100%; }
+ .adjust .sl .v { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
+
+ .specs-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
+ .specs-row:last-child { border-bottom: 0; }
+ .specs-row .k { color: var(--muted); }
+ .specs-row .v { font-weight: 600; text-align: right; }
+
+ .pair-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
+ .pair-grid .pair { aspect-ratio: 1/1; background: rgba(255,255,255,.55); border-radius: 6px; background-size: cover; background-position: center; border: 1px solid var(--line); }
+ .pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
+ .pill { font-size: 11px; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.65); border: 1px solid rgba(0,0,0,.06); }
+ .tile-btns { display: flex; flex-wrap: wrap; gap: 6px; }
+ .tile-btn { flex: 1; min-width: 100px; background: rgba(255,255,255,.7); border: 1px solid rgba(0,0,0,.06); padding: 10px 8px; border-radius: 8px; font: 600 11.5px/1.2 var(--sans); color: var(--ink); text-align: center; text-decoration: none; }
+ .tile-btn:hover { background: #fff; }
+
+ /* ── V9 three-up preview row (Pattern / Room / At-Scale) ───────────── */
+ .preview-row {
+ display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
+ }
+ .preview {
+ background: var(--hero-bg); border-radius: 12px;
+ aspect-ratio: 4/5; overflow: hidden; position: relative;
+ border: 1px solid var(--line);
+ }
+ .preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
+ .preview .badge {
+ position: absolute; top: 12px; left: 12px;
+ background: rgba(26,22,17,.8); color: #f0eada;
+ font: 600 10.5px/1 var(--sans); letter-spacing: .06em;
+ padding: 6px 10px; border-radius: 999px; text-transform: uppercase;
+ }
+ .preview.room { background: var(--room); background-size: cover; background-position: center; }
+ .preview.atscale { background-repeat: repeat; background-size: 220px 220px; }
+ .preview.atscale .scale-pill { position: absolute; right: 12px; bottom: 12px; background: rgba(250,248,243,.94); border-radius: 999px; padding: 6px 12px; font: 500 11px var(--sans); display: flex; gap: 8px; align-items: center; }
+ .preview.atscale .scale-pill input[type=range] { width: 90px; accent-color: var(--accent); }
+ .preview .room-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 12px; font-style: italic; }
+
+ /* ── pairs section (full-width below 3-up) ─────────────────────────── */
+ .pairs-section {
+ background: var(--coord); border: 1px solid var(--line);
+ border-radius: 12px; padding: 22px;
+ }
+ .pairs-section h3 { margin: 0 0 14px; font: 600 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: #2a4540; }
+
+ /* ── footer accordion row (deep specs, share, generator, ratings) ──── */
+ .footer-acc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
+ details.acc { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; font-size: 13px; }
+ details.acc[open] { padding-bottom: 14px; }
+ details.acc summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
+ details.acc summary::after { content: '▾'; color: var(--muted); transition: transform .2s; font-size: 11px; }
+ details.acc[open] summary::after { transform: rotate(180deg); }
+ details.acc summary .hint { font-weight: 400; font-size: 11.5px; color: var(--muted); margin-left: auto; margin-right: 8px; }
+ details.acc .acc-body { margin-top: 12px; font-size: 12.5px; line-height: 1.55; }
+
+ footer.site { border-top: 1px solid var(--line); padding: 28px; text-align: center; color: var(--muted); font-size: 12px; background: var(--panel); margin-top: 30px; }
+ footer.site .h { font: 500 14px/1.4 var(--serif); color: var(--ink); margin-bottom: 4px; }
+ .loading-shell { display: flex; align-items: center; justify-content: center; height: 60vh; color: var(--muted); font-style: italic; }
+
+ /* ── modals ─────────────────────────────────────────────────────────── */
+ dialog.modal { border: 0; border-radius: 14px; padding: 0; max-width: 540px; width: 92vw; box-shadow: 0 24px 80px rgba(0,0,0,.25); background: var(--bg); }
+ dialog.modal::backdrop { background: rgba(20,17,14,.55); backdrop-filter: blur(4px); }
+ dialog.modal header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
+ dialog.modal header h3 { margin: 0; font: 500 18px/1 var(--serif); }
+ dialog.modal .close { background: transparent; border: 0; font-size: 22px; color: var(--muted); }
+ dialog.modal .body { padding: 18px 22px 24px; }
+
+ /* ── responsive ────────────────────────────────────────────────────── */
+ @media (max-width: 1100px) {
+ .upper { grid-template-columns: 1fr; }
+ .col-hero { position: static; height: 62vh; }
+ .preview-row { grid-template-columns: 1fr; }
+ .footer-acc { grid-template-columns: 1fr; }
+ }
+ @media (max-width: 640px) {
+ header.topbar { flex-wrap: wrap; padding: 10px 14px; }
+ main.best { padding: 12px 14px; gap: 18px; }
+ .tab-bar { grid-template-columns: repeat(3, 1fr); }
+ .cta-row { grid-template-columns: 1fr; }
+ .pair-grid { grid-template-columns: repeat(3, 1fr); }
+ }
+</style>
+</head>
+<body>
+
+<header class="topbar">
+ <a href="/" class="brand">wallco.ai</a>
+ <nav>
+ <a href="/designs?sort=newest">Designs</a>
+ <a href="/designs?cat=monterey-mural">Murals</a>
+ <a href="/samples">Samples</a>
+ <a href="/basket">Basket</a>
+ <a href="/designer-studio">Designer Studio</a>
+ </nav>
+ <span class="grow"></span>
+ <span class="switcher">
+ <span class="badge">★ Recommended</span>
+ Theme: Best-of (V11) <a id="back-to-classic" href="#">← Classic</a>
+ </span>
+</header>
+
+<div id="root" class="loading-shell">Loading design…</div>
+
+<dialog class="modal" id="m-share"><header><h3>Share this design</h3><button class="close" onclick="document.getElementById('m-share').close()">×</button></header><div class="body" id="m-share-body"></div></dialog>
+<dialog class="modal" id="m-furnish"><header><h3>Furnish this design</h3><button class="close" onclick="document.getElementById('m-furnish').close()">×</button></header><div class="body" id="m-furnish-body"></div></dialog>
+<dialog class="modal" id="m-trade"><header><h3>Trade tools</h3><button class="close" onclick="document.getElementById('m-trade').close()">×</button></header><div class="body" id="m-trade-body"></div></dialog>
+
+<script>
+(async function () {
+ const pathMatch = location.pathname.match(/\/design\/(\d+)/);
+ const idFromQuery = new URLSearchParams(location.search).get('id');
+ const id = pathMatch ? parseInt(pathMatch[1], 10) : (idFromQuery ? parseInt(idFromQuery, 10) : null);
+ if (!Number.isFinite(id) || id < 1) { document.getElementById('root').textContent = 'No id'; return; }
+ document.getElementById('back-to-classic').href = '/design/' + id;
+
+ let design;
+ try {
+ const r = await fetch('/api/design/' + id, { credentials: 'same-origin' });
+ if (!r.ok) throw new Error('HTTP ' + r.status);
+ const j = await r.json();
+ design = j.design;
+ } catch (e) { document.getElementById('root').textContent = 'Failed: ' + e.message; return; }
+
+ const title = design.title || ('Design No.' + id);
+ const cat = design.category || 'wallpaper';
+ const catDisplay = (cat || '').replace(/^botanical-wonders · /, 'Botanical Wonders — ').replace(/^designer-zoo-calm/, 'Designer Zoo Calm').replace(/^cactus-pine-scenic/, 'Cactus Pine Scenic').replace(/^monterey-mural/, 'Coastal Scenic').replace(/^tree-mural/, 'Full-Room Scenic').replace(/^cactus-11ft-mural/, 'Single-Subject Mural').replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
+ const kindLabel = design.kind === 'seamless_tile' ? 'Seamless Tile (24×24")' : design.kind === 'mural_panel' ? 'Mural Panel' : design.kind === 'mural' ? 'Single-Subject Mural' : (design.kind || 'pattern');
+ const isMural = design.kind === 'mural_panel' || design.kind === 'mural';
+ const palette = Array.isArray(design.palette) ? design.palette : [];
+ const dominant = design.dominant_hex || (palette[0] && palette[0].hex) || '#888';
+ const img = design.image_url || ('/designs/img/by-id/' + id);
+ const w = Number(design.width_in) || 24, h = Number(design.height_in) || 24;
+ const repeatLabel = w + '"' + (w !== h ? ' × ' + h + '"' : '');
+ const rollOrPanel = isMural ? 'Per panel (36" × 11 ft)' : 'Per roll (27 ft)';
+ const handle = design.handle || ('wallco-' + id);
+ const generator = design.generator || 'wallco.ai';
+ const roomMockup = (design.room_mockups && (typeof design.room_mockups === 'object' && !Array.isArray(design.room_mockups) ? Object.keys(design.room_mockups)[0] : design.room_mockups[0])) || null;
+ const roomImgUrl = roomMockup ? ('/designs/room/design_' + id + '_' + roomMockup + '.png') : null;
+
+ const root = document.getElementById('root');
+ root.className = '';
+ root.innerHTML = `
+<div class="crumb">
+ <a href="/designs">Designs</a><span>›</span><a href="/designs?cat=${encodeURIComponent(cat)}">${escapeHtml(catDisplay)}</a>
+ <span class="grow"></span>
+ <span class="nav"><a href="/design/${id - 2}?theme=best">← prev</a> · <a href="/design/${id + 2}?theme=best">next →</a></span>
+</div>
+
+<main class="best">
+
+ <!-- UPPER: pinned hero L + sticky tabbed rail R -->
+ <div class="upper">
+
+ <div class="col-hero">
+ <img loading="eager" src="${img}" alt="${escapeAttr(title)}">
+ <span class="pill">${design.is_published ? 'Live' : 'Curating'}</span>
+ <span class="info">${escapeHtml(title)}</span>
+ </div>
+
+ <div class="col-pane">
+
+ <div class="title-card">
+ <div class="name">${escapeHtml(title)}</div>
+ <div class="meta">${escapeHtml(catDisplay)}<span class="sep">·</span>${escapeHtml(kindLabel)}<span class="sep">·</span>${rollOrPanel}</div>
+ <div class="chips">
+ <span class="chip"><span class="dot" style="background:${escapeAttr(dominant)}"></span>${escapeHtml(dominant)}</span>
+ <span class="chip">No.${id}</span>
+ <span class="chip">${escapeHtml(handle)}</span>
+ </div>
+ </div>
+
+ <!-- Primary CTAs always visible (V1) -->
+ <div class="cta-row">
+ <button class="cta sample" onclick="addSample()">Add sample · $4.25</button>
+ <button class="cta buy" onclick="document.querySelector('[data-tab=buy]').click(); setTimeout(()=>document.getElementById('calc-input')?.focus(),100)">Buy by the roll →</button>
+ </div>
+
+ <!-- Tab bar (V3) -->
+ <div class="tab-bar" role="tablist">
+ <button class="tab-btn active" data-tab="buy" role="tab" aria-selected="true">Buy</button>
+ <button class="tab-btn" data-tab="specs" role="tab" aria-selected="false">Specs</button>
+ <button class="tab-btn" data-tab="coords" role="tab" aria-selected="false">Coords</button>
+ <button class="tab-btn" data-tab="trade" role="tab" aria-selected="false">Trade</button>
+ <button class="tab-btn" data-tab="share" role="tab" aria-selected="false">Share</button>
+ </div>
+
+ <div class="tab-pane">
+
+ <div class="tab-panel active" data-tab="buy" role="tabpanel">
+ <div class="sub calc">
+ <h4 style="color:#5a4f73">Calculator</h4>
+ <div class="row">
+ <div><label>Wall W (ft)</label><input id="calc-input" type="number" min="1" max="80" step="0.5" value="10"></div>
+ <div><label>Wall H (ft)</label><input id="calc-h" type="number" min="1" max="20" step="0.5" value="9"></div>
+ </div>
+ <div class="row">
+ <div><label>Roll width</label>
+ <select id="calc-rw">
+ <option value="24">24" residential</option>
+ <option value="36">36" wide-roll</option>
+ <option value="52">52" commercial</option>
+ </select>
+ </div>
+ <div><label>Repeat</label><input value='${repeatLabel}' readonly></div>
+ </div>
+ <div class="total" id="calc-total">— rolls · $—</div>
+ </div>
+ <div class="sub">
+ <h4>Palette · drag to recolor</h4>
+ <div class="swatches">
+ ${palette.length ? palette.slice(0, 5).map(p => `<div class="sw" style="background:${escapeAttr(p.hex)}"><span class="lbl">${escapeHtml(p.hex)} · ${(p.pct || 0).toFixed(1)}%</span></div>`).join('') : `<div class="sw" style="background:${escapeAttr(dominant)}"><span class="lbl">${escapeHtml(dominant)}</span></div>`}
+ </div>
+ <div class="dom">Dominant ${escapeHtml(dominant)}</div>
+ </div>
+ <div class="sub adjust">
+ <h4>Image adjustments</h4>
+ <div class="sl"><label>Hue</label><input type="range" min="-180" max="180" value="0"><span class="v">0</span></div>
+ <div class="sl"><label>Sat</label><input type="range" min="0" max="200" value="100"><span class="v">100</span></div>
+ <div class="sl"><label>Bri</label><input type="range" min="50" max="150" value="100"><span class="v">100</span></div>
+ <div class="sl"><label>Con</label><input type="range" min="50" max="150" value="100"><span class="v">100</span></div>
+ </div>
+ </div>
+
+ <div class="tab-panel" data-tab="specs" role="tabpanel">
+ <div class="sub">
+ <h4>Pattern specifications</h4>
+ <div class="specs-row"><span class="k">Category</span><span class="v">${escapeHtml(catDisplay)}</span></div>
+ <div class="specs-row"><span class="k">Kind</span><span class="v">${escapeHtml(kindLabel)}</span></div>
+ <div class="specs-row"><span class="k">Width</span><span class="v">${w}"</span></div>
+ <div class="specs-row"><span class="k">Repeat</span><span class="v">${repeatLabel}</span></div>
+ <div class="specs-row"><span class="k">Sold by</span><span class="v">${rollOrPanel}</span></div>
+ <div class="specs-row"><span class="k">${isMural ? 'Panel size' : 'Roll length'}</span><span class="v">${isMural ? (w + '" × 11 ft') : '27 ft'}</span></div>
+ <div class="specs-row"><span class="k">Material</span><span class="v">Type II vinyl, water-resist</span></div>
+ <div class="specs-row"><span class="k">Designed by</span><span class="v">${escapeHtml(generator)}</span></div>
+ <div class="specs-row"><span class="k">Pattern No.</span><span class="v">${id}</span></div>
+ <div class="specs-row"><span class="k">Handle</span><span class="v">${escapeHtml(handle)}</span></div>
+ <div class="specs-row"><span class="k">Dominant hex</span><span class="v">${escapeHtml(dominant)}</span></div>
+ <div class="specs-row"><span class="k">Status</span><span class="v">${design.is_published ? 'Live on wallco.ai' : 'Curating'}</span></div>
+ </div>
+ </div>
+
+ <div class="tab-panel" data-tab="coords" role="tabpanel">
+ <div class="sub" style="background:var(--coord)">
+ <h4>Coordinate paints</h4>
+ <div class="pill-list">
+ <a class="pill" href="#">Sherwin-Williams</a>
+ <a class="pill" href="#">Dunn-Edwards</a>
+ <a class="pill" href="#">Benjamin Moore</a>
+ <a class="pill" href="#">Farrow & Ball</a>
+ <a class="pill" href="#">Behr</a>
+ <a class="pill" href="#">PPG</a>
+ <a class="pill" href="#">RAL</a>
+ </div>
+ </div>
+ <div class="sub" style="background:var(--coord)">
+ <h4>Coordinate stripes & plaids · 24 generated</h4>
+ <div class="pair-grid" style="grid-template-columns:repeat(6,1fr)">
+ ${Array.from({length: 12}).map(() => '<div class="pair"></div>').join('')}
+ </div>
+ </div>
+ </div>
+
+ <div class="tab-panel" data-tab="trade" role="tabpanel">
+ <div class="sub" style="background:var(--trade)">
+ <h4>Trade tools</h4>
+ <div class="tile-btns">
+ <a class="tile-btn" href="/design/${id}/tearsheet" target="_blank">Tear sheet PDF</a>
+ <a class="tile-btn" href="#" onclick="openTrade();return false">Email client</a>
+ <a class="tile-btn" href="#" onclick="openTrade();return false">Compare 2</a>
+ <a class="tile-btn" href="#" onclick="saveDesign(${id});return false">Save</a>
+ </div>
+ </div>
+ <div class="sub" style="background:var(--rate)">
+ <h4>Ratings & reviews</h4>
+ <div style="font-size:22px; letter-spacing:4px; color:#b89a4a">★★★★☆</div>
+ <div style="font-size:11.5px; color:var(--muted); margin-top:4px">Curated · 4.2 · ${escapeHtml(design.user_vote_count || 0)} votes</div>
+ </div>
+ </div>
+
+ <div class="tab-panel" data-tab="share" role="tabpanel">
+ <div class="sub" style="background:var(--share)">
+ <h4>Share this design</h4>
+ <div class="tile-btns">
+ <a class="tile-btn" href="#" onclick="openShare();return false">Pinterest</a>
+ <a class="tile-btn" href="#" onclick="openShare();return false">Instagram</a>
+ <a class="tile-btn" href="#" onclick="copyLink();return false">Copy link</a>
+ </div>
+ </div>
+ <div class="sub" style="background:var(--share)">
+ <h4>Furnish this design</h4>
+ <div class="tile-btns">
+ <a class="tile-btn" href="#" onclick="openFurnish();return false">Residential</a>
+ <a class="tile-btn" href="#" onclick="openFurnish();return false">Commercial</a>
+ <a class="tile-btn" href="#" onclick="openFurnish();return false">Hospitality</a>
+ <a class="tile-btn" href="#" onclick="openFurnish();return false">Healthcare</a>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div>
+
+ <!-- BELOW THE FOLD — V9 3-up preview row -->
+ <div class="preview-row">
+ <div class="preview">
+ <img loading="lazy" src="${img}" alt="${escapeAttr(title)}">
+ <span class="badge">Pattern · ${escapeHtml(title)}</span>
+ </div>
+ <div class="preview room" ${roomImgUrl ? `style="background-image:url('${roomImgUrl}')"` : ''}>
+ <span class="badge">See in a room</span>
+ ${roomImgUrl ? '' : '<div class="room-placeholder">Room mockup not yet generated</div>'}
+ </div>
+ <div class="preview atscale" id="atscale-preview" style="background-image:url('${img}')">
+ <span class="badge">At-scale · 10 × 9 ft wall</span>
+ <span class="scale-pill">scale <input type="range" min="120" max="360" value="220" id="scale-slider"></span>
+ </div>
+ </div>
+
+ <!-- Full-width pairs grid -->
+ <div class="pairs-section">
+ <h3>Pairs well with — 6 designer wallpapers</h3>
+ <div class="pair-grid">
+ <div class="pair"></div><div class="pair"></div><div class="pair"></div>
+ <div class="pair"></div><div class="pair"></div><div class="pair"></div>
+ </div>
+ </div>
+
+ <!-- Footer accordions for the deep-tail content -->
+ <div class="footer-acc">
+ <details class="acc"><summary>Generator + prompt <span class="hint">wallco.ai · seed ${escapeHtml(design.seed || '—')}</span></summary>
+ <div class="acc-body"><pre style="font:11px/1.5 ui-monospace,Menlo,monospace; background:var(--panel); padding:10px; border-radius:6px; max-height:200px; overflow:auto; margin:0; white-space:pre-wrap; word-break:break-word">${escapeHtml((design.prompt || '').slice(0, 1200))}${(design.prompt && design.prompt.length > 1200) ? '\n…[truncated]' : ''}</pre></div>
+ </details>
+ <details class="acc"><summary>Tags <span class="hint">${(Array.isArray(design.tags) ? design.tags.length : 0)}</span></summary>
+ <div class="acc-body">${(Array.isArray(design.tags) ? design.tags : []).map(t => `<span class="pill">${escapeHtml(t)}</span>`).join(' ') || '<span style="color:var(--muted)">none</span>'}</div>
+ </details>
+ <details class="acc"><summary>Motifs <span class="hint">${(Array.isArray(design.motifs) ? design.motifs.length : 0)}</span></summary>
+ <div class="acc-body">${(Array.isArray(design.motifs) ? design.motifs : []).map(m => `<span class="pill">${escapeHtml(m)}</span>`).join(' ') || '<span style="color:var(--muted)">none</span>'}</div>
+ </details>
+ </div>
+
+</main>
+
+<footer class="site">
+ <div class="h">wallco.ai — Curated-original wallpaper & murals</div>
+ <div>A Designer Wallcoverings company · Sherman Oaks, CA · steve@designerwallcoverings.com</div>
+</footer>
+`;
+
+ // ── tab switching ──
+ const tabBtns = root.querySelectorAll('.tab-btn');
+ const tabPanels = root.querySelectorAll('.tab-panel');
+ tabBtns.forEach(btn => btn.addEventListener('click', () => {
+ const name = btn.getAttribute('data-tab');
+ tabBtns.forEach(b => {
+ const a = b.getAttribute('data-tab') === name;
+ b.classList.toggle('active', a);
+ b.setAttribute('aria-selected', a ? 'true' : 'false');
+ });
+ tabPanels.forEach(p => p.classList.toggle('active', p.getAttribute('data-tab') === name));
+ }));
+
+ // ── calculator ──
+ const calcW = root.querySelector('#calc-input');
+ const calcH = root.querySelector('#calc-h');
+ const calcRW = root.querySelector('#calc-rw');
+ const total = root.querySelector('#calc-total');
+ function recalc() {
+ const ww = parseFloat(calcW.value) || 0, wh = parseFloat(calcH.value) || 0;
+ const rwInches = parseFloat(calcRW.value) || 24;
+ if (ww < 1 || wh < 1) { total.textContent = '— rolls · $—'; return; }
+ if (isMural) {
+ const panels = Math.ceil((ww * 12) / rwInches); const cost = panels * 245;
+ total.innerHTML = '<b>' + panels + '</b> panels · <b>$' + cost.toLocaleString() + '</b>';
+ } else {
+ const widthPanels = Math.ceil((ww * 12) / rwInches);
+ const rollsPerPanel = Math.ceil(wh / 27);
+ const rolls = widthPanels * rollsPerPanel; const cost = rolls * 165;
+ total.innerHTML = '<b>' + rolls + '</b> rolls · <b>$' + cost.toLocaleString() + '</b> · ' + widthPanels + ' panels wide';
+ }
+ }
+ [calcW, calcH, calcRW].forEach(el => el.addEventListener('input', recalc));
+ recalc();
+
+ // ── at-scale slider ──
+ const scale = document.getElementById('scale-slider');
+ const ascale = document.getElementById('atscale-preview');
+ scale.addEventListener('input', () => { ascale.style.backgroundSize = scale.value + 'px ' + scale.value + 'px'; });
+
+ // ── adjust sliders ──
+ root.querySelectorAll('.adjust .sl').forEach(row => {
+ const r = row.querySelector('input[type=range]'); const v = row.querySelector('.v');
+ r.addEventListener('input', () => { v.textContent = r.value; });
+ });
+
+ // ── modal bodies ──
+ document.getElementById('m-share-body').innerHTML = '<p>Share <b>' + escapeHtml(title) + '</b></p><div class="tile-btns"><a class="tile-btn" href="#">Pinterest</a><a class="tile-btn" href="#">Instagram</a><a class="tile-btn" href="#" onclick="copyLink();return false">Copy link</a></div>';
+ document.getElementById('m-furnish-body').innerHTML = '<p>Generate AI furnishings curated to this palette.</p><div class="tile-btns"><a class="tile-btn" href="#">Residential</a><a class="tile-btn" href="#">Commercial</a><a class="tile-btn" href="#">Hospitality</a><a class="tile-btn" href="#">Healthcare</a></div>';
+ document.getElementById('m-trade-body').innerHTML = '<p>Trade-only tools.</p><div class="tile-btns"><a class="tile-btn" href="/design/' + id + '/tearsheet" target="_blank">Tear sheet PDF</a><a class="tile-btn" href="#">Email client</a><a class="tile-btn" href="#">Compare 2 patterns</a><a class="tile-btn" href="#">Add to saved</a></div>';
+})();
+
+function openShare() { document.getElementById('m-share').showModal(); }
+function openFurnish() { document.getElementById('m-furnish').showModal(); }
+function openTrade() { document.getElementById('m-trade').showModal(); }
+async function copyLink() { try { await navigator.clipboard.writeText(location.href.replace(/\/best$/, '')); alert('Link copied'); } catch { alert('Copy failed'); } }
+function addSample() { alert('Sample added (stub — wire to /api/cart/sample/' + (new URL(location).pathname.match(/\d+/) || [0])[0] + ')'); }
+function saveDesign(id) { alert('Saved #' + id + ' (stub)'); }
+function escapeHtml(v) { if (v == null) return ''; return String(v).replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); }
+function escapeAttr(v) { return escapeHtml(v); }
+</script>
+</body>
+</html>
diff --git a/server.js b/server.js
index a891979..1b7d24c 100644
--- a/server.js
+++ b/server.js
@@ -465,6 +465,7 @@ app.get('/design/:id/editorial', (req, res) => themeVariantSend(req, res, 'v7-ed
app.get('/design/:id/spec', (req, res) => themeVariantSend(req, res, 'v8-spec.html'));
app.get('/design/:id/config', (req, res) => themeVariantSend(req, res, 'v9-config.html'));
app.get('/design/:id/stack', (req, res) => themeVariantSend(req, res, 'v10-stack.html'));
+app.get('/design/:id/best', (req, res) => themeVariantSend(req, res, 'v11-best.html'));
// ── Lightweight in-memory search across the catalog.
// /api/designs/search?q=<term>&limit=20
@@ -11354,6 +11355,9 @@ try {
<a class="hb-menu-item" data-hb-theme="classic" role="menuitem" href="/design/${design.id}">
<span class="hb-menu-icon" aria-hidden="true">●</span> Classic <span class="hb-active">(current)</span>
</a>
+ <a class="hb-menu-item hb-recommended" data-hb-theme="best" role="menuitem" href="/design/${design.id}/best">
+ <span class="hb-menu-icon" aria-hidden="true" style="background:#d2b15c;color:#1a1611">★</span> Best-of <span class="hb-active" style="color:#d2b15c">(recommended)</span>
+ </a>
<a class="hb-menu-item" data-hb-theme="compact" role="menuitem" href="/design/${design.id}/compact">
<span class="hb-menu-icon" aria-hidden="true">▥</span> V1 · Two-Column Compact
</a>
← 74ee628 docs: SHOPIFY-WEBHOOK-REGISTRATION one-pager (UI registratio
·
back to Wallco Ai
·
fix(by-id-image): add IMG_DIR + basename(local_path) candida 4781d58 →