← back to 1890swallpaper
hero/ideas: single big full-bleed hero (remove 2x2 four-square grid + hero-4grid.js/json + inert CSS), collapse Ideas to one rail
c4d48b2f92730c4f5c8db7d03ae22a30ca6ff509 · 2026-06-01 14:16:24 -0700 · SteveStudio2
Files touched
D public/hero-4grid.jsD public/hero-4grid.jsonM public/index.html
Diff
commit c4d48b2f92730c4f5c8db7d03ae22a30ca6ff509
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date: Mon Jun 1 14:16:24 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 887a86b..0000000
--- a/public/hero-4grid.json
+++ /dev/null
@@ -1,113 +0,0 @@
-{
- "cells": [
- {
- "kind": "room",
- "sku": "eur-70764-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/w7142-03.webp?v=1738615697",
- "title": "Orangery Lace Damask | Osborne & Little Europe"
- },
- {
- "kind": "pattern",
- "sku": "dwkk-g08a1abfc",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/114_3007_CS_d903f6dc-8ade-42fb-98a6-f6c776c0151a.jpg?v=1753305310",
- "title": "Nuvole Al Tramonto - Dusk/Pink Multi | Cole & Son Fornasetti | Wallcovering Print"
- },
- {
- "kind": "room",
- "sku": "noah-skulls-wallcovering-class-a-fire-rated",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/Screenshot2025-11-05at9.21.47AM.png?v=1762363328",
- "title": "Noah Skulls Gray on Black Baroque | Architectural Wallcoverings"
- },
- {
- "kind": "pattern",
- "sku": "mono-graham-brown",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/119661_TILE_COPPICE_2520MONO_01__76125.1769760946.jpg?v=1772336426",
- "title": "Mono | Graham & Brown"
- }
- ],
- "rotation_pool": [
- {
- "sku": "eur-70764-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/w7142-03.webp?v=1738615697",
- "title": "Orangery Lace Damask | Osborne & Little Europe"
- },
- {
- "sku": "dwkk-g08a1abfc",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/114_3007_CS_d903f6dc-8ade-42fb-98a6-f6c776c0151a.jpg?v=1753305310",
- "title": "Nuvole Al Tramonto - Dusk/Pink Multi | Cole & Son Fornasetti | Wallcovering Print"
- },
- {
- "sku": "noah-skulls-wallcovering-class-a-fire-rated",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/Screenshot2025-11-05at9.21.47AM.png?v=1762363328",
- "title": "Noah Skulls Gray on Black Baroque | Architectural Wallcoverings"
- },
- {
- "sku": "mono-graham-brown",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/119661_TILE_COPPICE_2520MONO_01__76125.1769760946.jpg?v=1772336426",
- "title": "Mono | Graham & Brown"
- },
- {
- "sku": "dwkk-g87eedcca",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/116_4014_CS_9df95485-34fc-4dd6-8b7f-259f5855c811.jpg?v=1753305118",
- "title": "Midsummer Bloom - Oran/Rose Multi | Cole & Son Pearwood |Botanical & Floral Wallcovering"
- },
- {
- "sku": "dwwm-14407-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/mary-isobel-morris-and-co-pink-ivory-wallpaper-214728-image01_dbbbdf48-c141-49e3-9321-f6e4e128dcc8.jpg?v=1741111442",
- "title": "Mary Isobel Ivory Pink Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14558-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/mary-isobel-morris-and-co-rose-artichoke-wallpaper-214729-image01_62c749b6-2ade-48fe-9a19-35878c75ec85.jpg?v=1741111674",
- "title": "Mary Isobel Artichoke Rose Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14870-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/marigold-morris-and-co-wedgwood-wallpaper-210368-image01_219b31c0-0487-4b6a-b3d4-73e5bcefa73a.jpg?v=1741112154",
- "title": "Marigold Wedgwood Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14251-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/marigold-morris-and-co-orange-wallpaper-217093-image01_b62c9bd5-25ec-4fc7-9d91-84348723e904.jpg?v=1741111174",
- "title": "Marigold Orange Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14869-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/marigold-morris-and-co-brick-manilla-wallpaper-210367-image01_469f6014-1342-4bae-945a-76934baae735.jpg?v=1741112152",
- "title": "Marigold Manilla Brick Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14153-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/marigold-morris-and-co-brick-manilla-wallpaper-210367-image01_8838cde0-b487-4ec9-8e96-a2da35abf898.jpg?v=1741110977",
- "title": "Marigold Manilla Brick Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14249-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/marigold-morris-and-co-sap-green-wallpaper-217090-image01_7d28022d-7143-4c4c-940e-d3ba88f864ed.jpg?v=1741111170",
- "title": "Marigold Green Sap Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14772-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/marigold-morris-and-co-chocolate-cream-wallpaper-216955-image01_f6f22b8b-9892-41a1-890d-2ab31eaf6086.jpg?v=1741112000",
- "title": "Marigold Cream Chocolate Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14250-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/marigold-morris-and-co-chartreuse-wallpaper-217092-image01_f8e96998-0479-4376-95df-f99556ffefd0.jpg?v=1741111172",
- "title": "Marigold Chartreuse Wallcovering | William Morris"
- },
- {
- "sku": "dwwm-14398-william-morris-designer-wallcoverings-los-angeles",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/marigold-morris-and-co-artichoke-wallpaper-210369-image01_852dd67a-cf9c-4721-ab25-1224c6146bf9.jpg?v=1741111419",
- "title": "Marigold Artichoke Wallcovering | William Morris"
- },
- {
- "sku": "dwkk-gc9e77257",
- "image_url": "https://cdn.shopify.com/s/files/1/0015/4117/7456/files/66_1002_CS_714e7d3f-9b89-4573-bd18-f3ac725b218c.jpg?v=1753304506",
- "title": "Malabar - Stone/G Beige | Cole & Son New Contemporary | Wallcovering"
- }
- ],
- "autocycle_seconds": 6,
- "updated_at": "2026-05-14T15:38:53.259Z",
- "generated_by": "dw-4grid-fanout.js"
-}
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 2f1b15c..37a2348 100644
--- a/public/index.html
+++ b/public/index.html
@@ -213,13 +213,8 @@ 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; }
-/* 2×2 hero grid (hero-4grid.js) — product images are too small for a crisp
- full-bleed hero, so quarter-cells keep them sharp (Steve's rule: high-res OR 4 squares). */
-.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; background-repeat:no-repeat; }
-[data-hero-mode="four-square"] .cinema-bg { display:none !important; }
</style>
<!-- Meta Pixel — INERT until set-fb-pixel.sh is run (does NOT load fbevents.js or hit Meta until flipped) -->
<script>
@@ -412,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">
← 232881a disable hero-4grid overlay so the unique high-res room/patte
·
back to 1890swallpaper
·
hero: graphic-designer-vetted clean replacement (no baked te 9a26a03 →