[object Object]

← back to Silkwallpaper

hero/ideas: single big full-bleed hero (remove 2x2 four-square grid + hero-4grid.js/json + inert CSS), collapse Ideas to one rail

3e1a585b0644505876e1c79b3a5e6417093370ce · 2026-06-01 14:16:32 -0700 · Steve Abrams

Files touched

Diff

commit 3e1a585b0644505876e1c79b3a5e6417093370ce
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jun 1 14:16:32 2026 -0700

    hero/ideas: single big full-bleed hero (remove 2x2 four-square grid + hero-4grid.js/json + inert CSS), collapse Ideas to one rail
---
 public/hero-4grid.js   | 112 ------------------------------------------------
 public/hero-4grid.json | 113 -------------------------------------------------
 public/index.html      |  12 +-----
 3 files changed, 2 insertions(+), 235 deletions(-)

diff --git a/public/hero-4grid.js b/public/hero-4grid.js
deleted file mode 100644
index 54a9cbb..0000000
--- a/public/hero-4grid.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * hero-4grid.js — universal 2×2 rotating hero for DW-family sites.
- *
- * What it does:
- *   - Fetches /data/hero-4grid.json on load
- *   - Switches the hero to 4-square mode (data-hero-mode="four-square")
- *   - Paints 4 cells with the configured images
- *   - Auto-cycles each cell every N seconds, rotating through the pool
- *   - Applies object-fit: cover; object-position: center 12% to ENFORCE
- *     the "never show image with header" rule
- *
- * Drop-in:  <script src="/hero-4grid.js" defer></script>
- *
- * Per-site override: set window.Hero4GridConfig = { url, autocycle } before load.
- */
-(function () {
-  'use strict';
-  if (window.__hero4GridLoaded) return;
-  window.__hero4GridLoaded = true;
-
-  var CFG = window.Hero4GridConfig || {};
-  var URL = CFG.url || '/hero-4grid.json';
-
-  function inject(cellEls, grid) {
-    // Switch hero mode
-    document.documentElement.dataset.heroMode = 'four-square';
-    var cinema = document.querySelector('.cinema');
-    if (!cinema) return;
-    // Build .cinema-grid if absent
-    var gridEl = cinema.querySelector('.cinema-grid');
-    if (!gridEl) {
-      gridEl = document.createElement('div');
-      gridEl.className = 'cinema-grid';
-      cinema.appendChild(gridEl);
-    }
-    gridEl.innerHTML = '';
-    for (var i = 0; i < 4; i++) {
-      var cell = document.createElement('div');
-      cell.className = 'cell hero4-cell';
-      cell.dataset.idx = i;
-      gridEl.appendChild(cell);
-    }
-    // Anti-header crop CSS — applied via inline so it ALWAYS wins
-    var style = document.createElement('style');
-    style.id = 'hero4-crop';
-    // Self-contained: inject the 2×2 LAYOUT too (not just the crop), so the grid
-    // works on any site that has the <script> tag even if its index.html never
-    // shipped .cinema-grid CSS. Hides the single .cinema-bg only once four-square
-    // mode is actually active (set in inject()), so a fetch failure keeps the
-    // static hero. Appended last → wins over any per-site .cinema-grid at equal
-    // specificity; identical values so sites that DO define it are unaffected.
-    style.textContent =
-      '.cinema-grid{position:absolute;inset:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:0;z-index:0;}' +
-      '.hero4-cell{width:100%;height:100%;background-size:cover !important;background-position:center 12% !important;background-repeat:no-repeat;transition:opacity 600ms ease;}' +
-      '.hero4-cell.swap-out{opacity:0;}' +
-      '[data-hero-mode="four-square"] .cinema-bg{display:none !important;}';
-    document.head.appendChild(style);
-
-    paint(grid);
-    if (grid.rotation_pool && grid.rotation_pool.length > 4) {
-      startRotation(grid);
-    }
-  }
-
-  function paint(grid) {
-    var cells = document.querySelectorAll('.hero4-cell');
-    for (var i = 0; i < cells.length; i++) {
-      var c = grid.cells[i];
-      if (c && c.image_url) {
-        cells[i].style.backgroundImage = "url('" + c.image_url + "')";
-        cells[i].title = c.title || '';
-      }
-    }
-  }
-
-  function startRotation(grid) {
-    var sec = Number(grid.autocycle_seconds) || 6;
-    var pool = grid.rotation_pool.slice();
-    // Index per cell — start with the next image after the initial 4
-    var nextIdx = [4 % pool.length, 5 % pool.length, 6 % pool.length, 7 % pool.length];
-    var cellIdx = 0;
-    setInterval(function () {
-      if (document.hidden) return; // pause when tab hidden
-      var cells = document.querySelectorAll('.hero4-cell');
-      var cell = cells[cellIdx];
-      if (!cell) return;
-      var next = pool[nextIdx[cellIdx] % pool.length];
-      if (!next || !next.image_url) { cellIdx = (cellIdx + 1) % 4; return; }
-      // Preload then swap
-      var pre = new Image();
-      pre.onload = function () {
-        cell.classList.add('swap-out');
-        setTimeout(function () {
-          cell.style.backgroundImage = "url('" + next.image_url + "')";
-          cell.title = next.title || '';
-          cell.classList.remove('swap-out');
-        }, 600);
-      };
-      pre.src = next.image_url;
-      nextIdx[cellIdx] = (nextIdx[cellIdx] + 4) % pool.length;
-      cellIdx = (cellIdx + 1) % 4;
-    }, sec * 1000);
-  }
-
-  fetch(URL, { credentials: 'same-origin' })
-    .then(function (r) { return r.ok ? r.json() : null; })
-    .then(function (grid) {
-      if (!grid || !grid.cells || !Array.isArray(grid.cells)) return;
-      inject(null, grid);
-    })
-    .catch(function (e) { console.warn('[hero-4grid] fetch failed:', e); });
-})();
diff --git a/public/hero-4grid.json b/public/hero-4grid.json
deleted file mode 100644
index d624af1..0000000
--- a/public/hero-4grid.json
+++ /dev/null
@@ -1,113 +0,0 @@
-{
-  "cells": [
-    {
-      "kind": "room",
-      "sku": "misheo-mint-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/misheo-mint.jpg?v=1762145354",
-      "title": "Misheo - Mint Wallcovering | Phillipe Romano"
-    },
-    {
-      "kind": "pattern",
-      "sku": "misheo-jasmine-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/misheo-jasmine.jpg?v=1762145396",
-      "title": "Misheo - Jasmine Wallcovering | Phillipe Romano"
-    },
-    {
-      "kind": "room",
-      "sku": "althea-plain-wool-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/althea-plain-wool.jpg?v=1762145310",
-      "title": "Althea Plain - Wool Wallcovering | Phillipe Romano"
-    },
-    {
-      "kind": "pattern",
-      "sku": "carrington-water-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/carrington-water.jpg?v=1762143762",
-      "title": "Water Lilies Bracken Wallcovering | Architectural Wallcoverings"
-    }
-  ],
-  "rotation_pool": [
-    {
-      "sku": "misheo-mint-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/misheo-mint.jpg?v=1762145354",
-      "title": "Misheo - Mint Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "misheo-jasmine-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/misheo-jasmine.jpg?v=1762145396",
-      "title": "Misheo - Jasmine Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "althea-plain-wool-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/althea-plain-wool.jpg?v=1762145310",
-      "title": "Althea Plain - Wool Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "carrington-water-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/carrington-water.jpg?v=1762143762",
-      "title": "Water Lilies Bracken Wallcovering | Architectural Wallcoverings"
-    },
-    {
-      "sku": "althea-crush-auburn-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/althea-crush-auburn.jpg?v=1762144424",
-      "title": "Althea Crush - Auburn Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "ambrose-fog-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/ambrose-fog.jpg?v=1762144556",
-      "title": "Ambrose - Fog Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "grayson-gold-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/grayson-gold.jpg?v=1762144690",
-      "title": "Grayson - Gold Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "ambrose-sand-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/ambrose-sand.jpg?v=1762144025",
-      "title": "Ambrose - Sand Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "kaisa-jasmine-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/kaisa-jasmine.jpg?v=1762144381",
-      "title": "Kaisa - Jasmine Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "grayson-mud-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/grayson-mud.jpg?v=1762143981",
-      "title": "Grayson - Mud Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "misheo-lilac-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/misheo-lilac.jpg?v=1762144069",
-      "title": "Misheo - Lilac Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "ambrose-ivory-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/ambrose-ivory.jpg?v=1762144600",
-      "title": "Ambrose - Ivory Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "grayson-seashell-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/grayson-seashell.jpg?v=1762144733",
-      "title": "Grayson - Seashell Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "carrington-oyster-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/carrington-oyster.jpg?v=1762144113",
-      "title": "Carrington - Oyster Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "carrington-silver-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/carrington-silver.jpg?v=1762143805",
-      "title": "Carrington - Silver Wallcovering | Phillipe Romano"
-    },
-    {
-      "sku": "carrington-porcelain-wallcovering-phillipe-romano",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/carrington-porcelain.jpg?v=1762144912",
-      "title": "Carrington - Porcelain Wallcovering | Phillipe Romano"
-    }
-  ],
-  "autocycle_seconds": 6,
-  "updated_at": "2026-05-14T15:38:53.252Z",
-  "generated_by": "dw-4grid-fanout.js"
-}
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 9da40dd..99791fa 100644
--- a/public/index.html
+++ b/public/index.html
@@ -68,10 +68,6 @@ header { position:fixed; top:0; left:0; right:0; display:flex; justify-content:s
 .cinema-bg { position:absolute; inset:0; background-size:cover; background-position:center; background-image:url('/hero-bg.jpg') }
 .cinema-bg::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%) }
 /* Hero-mode hooks (R4): both modes share the same min-height — CLS-free */
-[data-hero-mode="four-square"] .cinema-bg { display:none }
-[data-hero-mode="four-square"] .cinema-grid { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; position:absolute; inset:0 }
-[data-hero-mode="four-square"] .cinema-grid .cell { background-size:cover; background-position:center; border:1px solid rgba(0,0,0,0.4) }
-.cinema-grid { display:none }
 .cinema-logo { position:absolute; top:22px; left:32px; font-family: ui-serif, Georgia, serif; font-size:18px; font-weight:500; letter-spacing:0.02em; color:#fff; text-decoration:none; z-index:6; text-shadow:0 1px 4px rgba(0,0,0,0.5) }
 /* Below-photo wordmark (R2): brand display lives below the hero, not painted on it */
 .hero-wordmark-block { position:relative; padding:38px 32px 24px; text-align:center; background:var(--bg) }
@@ -242,7 +238,7 @@ textarea:focus-visible,
 /* Never-show-images-with-headers rule (2026-05-14): every hero image
    is cropped to center 12% from the top to defeat vendor watermarks /
    scraped-site chrome / banner overlays. */
-.cinema-bg, .hero4-cell, .cell { background-position: center 12% !important; }
+.cinema-bg, .cell { background-position: center 12% !important; }
 .card img, .product img { object-position: center 12% !important; }
 </style>
 <!-- Meta Pixel — INERT until set-fb-pixel.sh is run (does NOT load fbevents.js or hit Meta until flipped) -->
@@ -553,10 +549,7 @@ textarea:focus-visible,
     <h2 class="rail-title">New this week</h2>
     <div class="rail" id="railNewest"></div>
   </div>
-  <div class="rail-block">
-    <h2 class="rail-title">Curated picks</h2>
-    <div class="rail" id="railCurated"></div>
-  </div>
+  
 </section>
 
 <section class="section" id="shop">
@@ -1445,7 +1438,6 @@ document.addEventListener('DOMContentLoaded', function(){ try { renderRailSectio
 
 <!-- corner-nav disabled (UL-hamburger rebuild) -->
 <script src="/sku-redact.js" defer></script>
-<!-- hero4-fix: activate 2x2 hero (self-contained; was commented placeholder) -->
 <!-- hero-4grid grid DISABLED so the single high-res hero shows full-bleed --><!-- <script src="/hero-4grid.js" defer></script> -->
 </body>
 </html>

← 0a32c4d disable hero-4grid overlay so the unique high-res room/patte  ·  back to Silkwallpaper  ·  hero: huge 2520px clean hero from dw_unified (graphic-design 70d1b36 →