← back to Jutewallpaper
Revert "rails: tag-aware via shared rail-match helper + editorial LABELS (rescue flat grid)"
3f8097cb7d4858963b4610487b327e34c638063b · 2026-05-26 10:48:51 -0700 · Steve Abrams
This reverts commit f8940a5126a3ff7043c1f9e71b6d9a0ea5b21478.
Files touched
M package-lock.jsonM public/index.htmlM server.jsM site.config.json
Diff
commit 3f8097cb7d4858963b4610487b327e34c638063b
Author: Steve Abrams <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 f8940a5126a3ff7043c1f9e71b6d9a0ea5b21478.
---
package-lock.json | 13 -------------
public/index.html | 2 +-
server.js | 12 ++++++++----
site.config.json | 12 ++++++------
4 files changed, 15 insertions(+), 24 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 7e3093c..7df6be9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,7 +8,6 @@
"name": "jutewallpaper",
"version": "0.1.0",
"dependencies": {
- "dotenv": "^17.4.2",
"express": "^4.21.0",
"helmet": "^8.1.0"
}
@@ -173,18 +172,6 @@
"npm": "1.2.8000 || >= 1.4.16"
}
},
- "node_modules/dotenv": {
- "version": "17.4.2",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
- "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",
- "license": "BSD-2-Clause",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://dotenvx.com"
- }
- },
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
diff --git a/public/index.html b/public/index.html
index 360de3b..6d9fe32 100644
--- a/public/index.html
+++ b/public/index.html
@@ -508,7 +508,7 @@ const HOSTKEY = location.hostname.replace(/\./g, '_');
if (savedSort) state.sort = savedSort;
} catch(e){}
})();
-const LABELS = {"all":"All","natural":"Natural Jute","grasscloth":"Grasscloth","sisal":"Sisal","beige":"Beige & Neutral","woven":"Woven Textures","natural texture":"Natural Texture","textured":"Textured"};
+const LABELS = {"all":"All","natural":"Natural Jute"};
function escAttr(s) { return String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&':'&','<':'<','>':'>','"':'"',"'":''' }[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 7b6347a..435d16f 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 : [];
@@ -183,13 +182,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 713f9b1..0506093 100644
--- a/site.config.json
+++ b/site.config.json
@@ -10,12 +10,12 @@
"accent": "#c89858"
},
"rails": [
- "grasscloth",
- "sisal",
- "beige",
- "woven",
- "natural texture",
- "textured"
+ "fine",
+ "heavy",
+ "natural",
+ "dyed",
+ "metallic",
+ "blended"
],
"port": 9911
}
← f8940a5 rails: tag-aware via shared rail-match helper + editorial LA
·
back to Jutewallpaper
·
sku-redact: wire shared vendor-id display scrubber e6cdbab →