[object Object]

← back to 1930swallpaper

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

c673a832ce5d16221ff2c51fb2135dfea8c8c63d · 2026-06-01 14:16:25 -0700 · SteveStudio2

Files touched

Diff

commit c673a832ce5d16221ff2c51fb2135dfea8c8c63d
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Mon Jun 1 14:16:25 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      |   8 +---
 3 files changed, 2 insertions(+), 231 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 468de58..0000000
--- a/public/hero-4grid.json
+++ /dev/null
@@ -1,113 +0,0 @@
-{
-  "cells": [
-    {
-      "kind": "room",
-      "sku": "poona-stone-arte",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/Indienne_Poona_18300_Roomshot_Web_LR-og_2018d1c6-6247-46e3-959d-95569075202b.jpg?v=1775597785",
-      "title": "Poona Stone Wallcovering | Arte International"
-    },
-    {
-      "kind": "pattern",
-      "sku": "agra-okra-arte-international",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/Indienne_Agra_18310_Roomshot_Web_LR-medium-two-thirds.jpg?v=1775694511",
-      "title": "Agra Okra Wallcovering | Arte International"
-    },
-    {
-      "kind": "room",
-      "sku": "vaticano-durable-vinyl-dur-72375",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/DUR-72375-sample-clean.jpg?v=1774485261",
-      "title": "Vaticano Durable Vinyl | Hollywood Wallcoverings"
-    },
-    {
-      "kind": "pattern",
-      "sku": "vaticano-durable-vinyl-dur-72381",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/DUR-72381-sample-clean.jpg?v=1774485290",
-      "title": "Vaticano Durable Vinyl | Hollywood Wallcoverings"
-    }
-  ],
-  "rotation_pool": [
-    {
-      "sku": "poona-stone-arte",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/Indienne_Poona_18300_Roomshot_Web_LR-og_2018d1c6-6247-46e3-959d-95569075202b.jpg?v=1775597785",
-      "title": "Poona Stone Wallcovering | Arte International"
-    },
-    {
-      "sku": "agra-okra-arte-international",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/Indienne_Agra_18310_Roomshot_Web_LR-medium-two-thirds.jpg?v=1775694511",
-      "title": "Agra Okra Wallcovering | Arte International"
-    },
-    {
-      "sku": "vaticano-durable-vinyl-dur-72375",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/DUR-72375-sample-clean.jpg?v=1774485261",
-      "title": "Vaticano Durable Vinyl | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "vaticano-durable-vinyl-dur-72381",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/DUR-72381-sample-clean.jpg?v=1774485290",
-      "title": "Vaticano Durable Vinyl | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "dwss-72659",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/710-28_image1_9e478367-7370-40ce-8720-e8907ec4f887.jpg?v=1646104975",
-      "title": "Bok light green Sample Wallcovering | Sandberg"
-    },
-    {
-      "sku": "i-love-baroque-medusa-stripe-mauve-wallcovering-versace-2",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/2329a841d3f94e6c2323aed9612df77f.webp?v=1773710682",
-      "title": "I Love Baroque Medusa Stripe Mauve Wallcovering | Versace"
-    },
-    {
-      "sku": "dwtt-72109-designer-wallcoverings-los-angeles",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/T1870.jpg?v=1733892727",
-      "title": "Prescott Metallic on Taupe | Thibaut"
-    },
-    {
-      "sku": "regal-lattice-screen-printed-wallpaper-tre-12907",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/3547fe79068d43fd86725b501b7c7f01.jpg?v=1572309178",
-      "title": "Regal Lattice - Screen Printed Wallcovering"
-    },
-    {
-      "sku": "medusa-circle-silver-gold-pink-wallcovering-versace",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/593e809cff01210ceeddec366f315919.jpg?v=1773706334",
-      "title": "Medusa Circle Silver, Gold, Pink Wallcovering | Versace"
-    },
-    {
-      "sku": "dwtt-71757-designer-wallcoverings-los-angeles",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/products/T35144_6dbe5e19-7f3c-4ec9-8978-784a24cbf7da.jpg?v=1733893466",
-      "title": "Bahia Metallic Gold on Metallic Gold on Aqua | Thibaut"
-    },
-    {
-      "sku": "cubism-drive-hlw-73049",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/HLW-73049-sample-clean.jpg?v=1774483215",
-      "title": "Cubism Drive | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "st-lawrence-embossed-contemporary-durable-vinyl-walls-xwq-52904",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/XWQ-52904-sample-clean.jpg?v=1774481680",
-      "title": "St Lawrence Embossed Contemporary Durable Vinyl | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "vaticano-durable-vinyl-dur-72376",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/DUR-72376-sample-clean.jpg?v=1774485266",
-      "title": "Vaticano Durable Vinyl | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "st-lawrence-embossed-contemporary-durable-vinyl-walls-xws-52896",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/XWS-52896-sample-clean.jpg?v=1774481671",
-      "title": "St Lawrence Embossed Contemporary Durable Vinyl | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "hollywood-tower-deco-xhw-201053",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/avant-cinema.jpg?v=1777480927",
-      "title": "Hollywood Tower Deco | Hollywood Wallcoverings"
-    },
-    {
-      "sku": "ikeley-type-ii-vinyl-wallcovering-xls-47821",
-      "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/xls-47821-sample-ikeley-type-ii-vinyl-hollywood-wallcoverings.jpg?v=1775719403",
-      "title": "Ikeley Type II Vinyl | Hollywood Wallcoverings"
-    }
-  ],
-  "autocycle_seconds": 6,
-  "updated_at": "2026-05-14T15:38:53.341Z",
-  "generated_by": "dw-4grid-fanout.js"
-}
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 549e3a5..51dd9b4 100644
--- a/public/index.html
+++ b/public/index.html
@@ -213,7 +213,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) -->
@@ -407,10 +407,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">
@@ -1209,7 +1206,6 @@ window.IDEA_RAIL_TAGS = ["art deco","geometric","sophisticated","modern"];
 </script>
 
 <!-- corner-nav disabled (UL-hamburger rebuild) -->
-<!-- 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> -->
 <!-- Big Red customer chat — lower-left, woman-avatar, vendor-redacted retail persona. -->
 <script data-bigred-widget src="https://chat.designerwallcoverings.com/widget.js"

← cb9adf0 disable hero-4grid overlay so the unique high-res room/patte  ·  back to 1930swallpaper  ·  header name → domain name '1930s Wallpaper' (remove odd bran 0becc41 →