[object Object]

← back to 1920swallpaper

Revert "rails: tag-aware via shared rail-match helper + editorial LABELS (rescue flat grid)"

9a65133d6dc7852e70eec45bbcb489eb6fda41fc · 2026-05-26 10:48:51 -0700 · SteveStudio2

This reverts commit 73c49ec1e0e728a503b506df106eb1111991df11.

Files touched

Diff

commit 9a65133d6dc7852e70eec45bbcb489eb6fda41fc
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Tue May 26 10:48:51 2026 -0700

    Revert "rails: tag-aware via shared rail-match helper + editorial LABELS (rescue flat grid)"
    
    This reverts commit 73c49ec1e0e728a503b506df106eb1111991df11.
---
 public/index.html |  2 +-
 server.js         | 12 ++++++++----
 site.config.json  | 12 ++++++------
 3 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/public/index.html b/public/index.html
index 9c2e6f2..2dfab3d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -509,7 +509,7 @@ const TOUCH = window.matchMedia('(hover: none)').matches;
     document.documentElement.dataset.view = state.view;
   } catch(e){}
 })();
-const LABELS = {"all":"All","art-deco":"Art Deco","sophisticated":"Sophisticated","abstract":"Abstract","gold":"Gold & Gilded","glamorous":"Glamorous","fretwork":"Fretwork","gray":"Gray Tones"};
+const LABELS = {"all":"All","art-deco":"Art Deco"};
 
 function escAttr(s) { return String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;' }[c])); }
 // Image-URL allowlist: only DW Shopify CDN + designerwallcoverings.com (defends against XSS via crafted products.json)
diff --git a/server.js b/server.js
index 5b2ed94..a46ced9 100644
--- a/server.js
+++ b/server.js
@@ -20,7 +20,6 @@ if (ADMIN_ENABLED) {
   try { catalog = require('../_shared/admin-catalog'); }
   catch (e) { console.error(`[${__SITE}] admin-catalog unavailable (${e.message}) — falling back to static JSON`); }
 }
-const { buildRails, railFacets } = require('../_shared/rail-match');
 const siteCfg = JSON.parse(fs.readFileSync(path.join(__dirname, 'site.config.json'), 'utf8'));
 const SITE_SLUG = siteCfg.slug || __SITE;
 const SITE_RAILS = Array.isArray(siteCfg.rails) ? siteCfg.rails : [];
@@ -181,13 +180,18 @@ app.get('/api/products', (req, res) => {
 });
 
 app.get('/api/sliders', (req, res) => {
-  res.json({ rails: buildRails(PRODUCTS_NICHE, SITE_RAILS) });
+  const out = [];
+  for (const a of SITE_RAILS) {
+    const items = PRODUCTS_NICHE.filter(p => p.aesthetic === a).slice(0, 12);
+    if (items.length >= 4) out.push({ aesthetic: a, items });
+  }
+  res.json({ rails: out });
 });
 
 app.get('/api/facets', (req, res) => {
-  const aesthetics = railFacets(PRODUCTS_NICHE, SITE_RAILS);
-  const vendors = {};
+  const aesthetics = {}; const vendors = {};
   for (const p of PRODUCTS_NICHE) {
+    aesthetics[p.aesthetic] = (aesthetics[p.aesthetic] || 0) + 1;
     vendors[p.vendor] = (vendors[p.vendor] || 0) + 1;
   }
   res.json({ aesthetics, vendors, total: PRODUCTS_NICHE.length });
diff --git a/site.config.json b/site.config.json
index a307c93..8f25c29 100644
--- a/site.config.json
+++ b/site.config.json
@@ -10,11 +10,11 @@
     "accent": "#d4a847"
   },
   "rails": [
-    "sophisticated",
-    "abstract",
-    "gold",
-    "glamorous",
-    "fretwork",
-    "gray"
+    "art-deco",
+    "geometric",
+    "metallic",
+    "jazz",
+    "egyptian-revival",
+    "flapper"
   ]
 }

← 73c49ec rails: tag-aware via shared rail-match helper + editorial LA  ·  back to 1920swallpaper  ·  sku-redact: wire shared vendor-id display scrubber 4817f01 →