[object Object]

← back to Restaurantwallpaper

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

933edf76bc7fd881c662b14cbbc1da5b4e22511d · 2026-06-01 14:16:31 -0700 · Steve Abrams

Files touched

Diff

commit 933edf76bc7fd881c662b14cbbc1da5b4e22511d
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jun 1 14:16:31 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      |   9 +---
 3 files changed, 2 insertions(+), 232 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 fff6514..0000000
--- a/public/hero-4grid.json
+++ /dev/null
@@ -1,113 +0,0 @@
-{
-  "cells": [
-    {
-      "kind": "room",
-      "sku": "norman-aqua-medallion-wallpaper-cca-82952",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/22e04683791b6dc154d192c7a042faf0.jpg?v=1572309963",
-      "title": "Norman Aqua Medallion Wallcovering"
-    },
-    {
-      "kind": "pattern",
-      "sku": "komo-diamond-bamboo-wallpaper-trf-56824",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/b6dbc5bfb9ee9ce55a73ce425eefbdbb.jpg?v=1750789757",
-      "title": "Komo Diamond Bamboo | Jeffrey Stevens"
-    },
-    {
-      "kind": "room",
-      "sku": "mediterranean-texture-red-wallcovering-versace",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/53086f4f5bab1216d70527e04b8f1b93.jpg?v=1773706326",
-      "title": "Mediterranean Texture Red Wallcovering | Versace"
-    },
-    {
-      "kind": "pattern",
-      "sku": "eur-80256-ncw4207-designer-wallcoverings-los-angeles",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/nina_crop_7513501204531.jpg?v=1775522996",
-      "title": "Fontibre Fontibre Blue/Green - Blue Wallcovering | Nina Campbell"
-    }
-  ],
-  "rotation_pool": [
-    {
-      "sku": "norman-aqua-medallion-wallpaper-cca-82952",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/22e04683791b6dc154d192c7a042faf0.jpg?v=1572309963",
-      "title": "Norman Aqua Medallion Wallcovering"
-    },
-    {
-      "sku": "komo-diamond-bamboo-wallpaper-trf-56824",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/b6dbc5bfb9ee9ce55a73ce425eefbdbb.jpg?v=1750789757",
-      "title": "Komo Diamond Bamboo | Jeffrey Stevens"
-    },
-    {
-      "sku": "mediterranean-texture-red-wallcovering-versace",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/53086f4f5bab1216d70527e04b8f1b93.jpg?v=1773706326",
-      "title": "Mediterranean Texture Red Wallcovering | Versace"
-    },
-    {
-      "sku": "eur-80256-ncw4207-designer-wallcoverings-los-angeles",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/nina_crop_7513501204531.jpg?v=1775522996",
-      "title": "Fontibre Fontibre Blue/Green - Blue Wallcovering | Nina Campbell"
-    },
-    {
-      "sku": "natalia-purple-curly-scroll-wallpaper-wallpaper-cca-82822",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/b4fbd757fe54a9cd5ca21316c7591e1b.jpg?v=1572309955",
-      "title": "Natalia Purple Curly Scroll Wallcovering Wallcovering"
-    },
-    {
-      "sku": "dwkk-127810",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/W0130_02_CAC_70fda95b-a855-42cb-855f-b5135ffc0653.jpg?v=1753321603",
-      "title": "Golden Parrot Wp - Ivory Multi By Clarke And Clarke | Clarke & Clarke Botanical Wonders Wallcovering |Animal/Insects Novelty Wallcovering Print"
-    },
-    {
-      "sku": "captiva-aqua-floral-toss-wallpaper-cca-83043",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/dd5a13e38f10a5abd5e0e23cf1d6fad0.jpg?v=1572309966",
-      "title": "Captiva Aqua Floral Toss Wallcovering"
-    },
-    {
-      "sku": "xara-s-retro-geometric-scr-8054",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/2f3bdf1c2a278d2beb9128124e8679d1.jpg?v=1572309105",
-      "title": "Xara's Retro Geometric"
-    },
-    {
-      "sku": "moroccan-gold-wash-wbs-39664",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/wbs-39664-sample-moroccan-gold-wash-hollywood-wallcoverings.jpg?v=1775726592",
-      "title": "Moroccan Gold Wash | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "wolfgordonwallcovering_dwwg_dcpa-450-jpg",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/DCPA-450.jpg?v=1762290936",
-      "title": "Catalpa - Redwood | Wolf Gordon Wallcoverings"
-    },
-    {
-      "sku": "ashbourne-type-ii-vinyl-wallcovering-xjg-47104",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/xjg-47104-sample-ashbourne-type-ii-vinyl-hollywood-wallcoverings.jpg?v=1775699774",
-      "title": "Ashbourne Type II Vinyl | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "vanessa-light-blue-henna-brocade-wallpaper-wallpaper-cca-82838",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/1f39a4b6ad79ff0d6cf00f874a0691e9.jpg?v=1572309957",
-      "title": "Vanessa Light Blue Henna Brocade Wallcovering Wallcovering"
-    },
-    {
-      "sku": "ncw4356-04",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/nina_crop_4497265164339.jpg?v=1775520663",
-      "title": "Nina Campbell Wallcoverings - Natural Wallcovering | Nina Campbell"
-    },
-    {
-      "sku": "wolfgordonwallcovering_dwwg_krn-5611_8-jpg",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/reh-5510.webp?v=1762299016",
-      "title": "Keren - Maize | Wolf Gordon Wallcoverings"
-    },
-    {
-      "sku": "ncw4396-04",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/nina_crop_4497267097651.jpg?v=1775520905",
-      "title": "Nina Campbell Wallcoverings - Ecru Wallcovering | Nina Campbell"
-    },
-    {
-      "sku": "wolfgordonwallcovering_dwwg_sm10238-jpg",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/WolfGordonWallcovering_DWWG_sm10237.jpg?v=1733872484",
-      "title": "SM10238 | Wolf Gordon Wallcoverings"
-    }
-  ],
-  "autocycle_seconds": 6,
-  "updated_at": "2026-05-14T15:38:53.348Z",
-  "generated_by": "dw-4grid-fanout.js"
-}
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index ca1e168..2a11c70 100644
--- a/public/index.html
+++ b/public/index.html
@@ -210,7 +210,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) -->
@@ -404,10 +404,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">
@@ -1350,8 +1347,6 @@ async function renderRailSections(){
 })();
 </script>
 
-<!-- hero4-fix: activate 2x2 hero (self-contained; was commented placeholder) -->
-<script src="/hero-4grid.js" defer></script>
 
 <!-- Big Red customer chat — lower-left, woman-avatar, vendor-redacted retail persona. -->
 <script data-bigred-widget src="https://chat.designerwallcoverings.com/widget.js"

← 69c9fba disable hero-4grid overlay so the unique high-res room/patte  ·  back to Restaurantwallpaper  ·  header: remove dw-header.js — fixes overlapping hamburgers ( 316db7e →