[object Object]

← back to 1950swallpaper

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

32e412ef376003780c04c8859ca353e0ddcb91fc · 2026-05-26 10:48:51 -0700 · SteveStudio2

This reverts commit 074230b3ed8f4f082cb5af4fb676ff9e83fd4af8.

Files touched

Diff

commit 32e412ef376003780c04c8859ca353e0ddcb91fc
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 074230b3ed8f4f082cb5af4fb676ff9e83fd4af8.
---
 public/index.html |  2 +-
 server.js         | 12 ++++++++----
 site.config.json  | 10 ++++++----
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/public/index.html b/public/index.html
index 0e30178..4e4753c 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","mid-century":"Mid-Century Atomic","mid-century modern":"Mid-Century Modern","geometric":"Geometric","abstract":"Abstract","contemporary":"Contemporary"};
+const LABELS = {"all":"All","mid-century":"Mid-Century Atomic"};
 
 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 0b806e0..8981d5f 100644
--- a/server.js
+++ b/server.js
@@ -19,7 +19,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 : [];
@@ -200,13 +199,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 ff7e709..739022c 100644
--- a/site.config.json
+++ b/site.config.json
@@ -10,10 +10,12 @@
     "accent": "#d8a878"
   },
   "rails": [
-    "mid-century modern",
-    "geometric",
-    "abstract",
-    "contemporary"
+    "atomic",
+    "boomerang",
+    "starburst",
+    "pastel",
+    "mid-century",
+    "geometric"
   ],
   "port": 9908
 }

← 074230b rails: tag-aware via shared rail-match helper + editorial LA  ·  back to 1950swallpaper  ·  sku-redact: wire shared vendor-id display scrubber 03eb1ff →