← back to Dw Discovery
Created + Launch toggle chips; every SKU has created date; launch chip = Launches(staged)/Launched(active)
ede7996360c2884b6c6419ed7f4d6f19225a38e3 · 2026-06-24 09:50:05 -0700 · Steve Abrams
Files touched
M dw-discovery.jsM index.html
Diff
commit ede7996360c2884b6c6419ed7f4d6f19225a38e3
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed Jun 24 09:50:05 2026 -0700
Created + Launch toggle chips; every SKU has created date; launch chip = Launches(staged)/Launched(active)
---
dw-discovery.js | 5 +++--
index.html | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dw-discovery.js b/dw-discovery.js
index 54d2d8b..e363daf 100644
--- a/dw-discovery.js
+++ b/dw-discovery.js
@@ -53,7 +53,7 @@
sort: LS('sort', 'featured'),
cols: LS('cols', 4),
layout: LS('layout', 'sidebar'), // Filter layout
- cardFields: LS('cardFields', { price: true, vendor: true, swatch: true, contents: true, pattern: false, color: true, sku: true }),
+ cardFields: LS('cardFields', { price: true, vendor: true, swatch: true, contents: true, pattern: false, color: true, sku: true, created: true, launch: true }),
merchandising: LS('merch', { featuredFirst: true, inStockFirst: true }),
query: ''
};
@@ -272,9 +272,10 @@
${thumb}
<div class="dwd-meta">
${p.status ? `<span class="dwd-status s-${String(p.status).toLowerCase().replace(/[^a-z]+/g,'-')}">${p.status}</span>` : ''}
- ${p.goLiveAt ? `<span class="dwd-golive" title="Launches ${p.goLiveAt}">🚀 Launches ${new Date(p.goLiveAt).toLocaleString(undefined,{year:'numeric',month:'short',day:'numeric',hour:'numeric',minute:'2-digit'})}</span>` : ''}
+ ${cf.launch ? (p.goLiveAt ? `<span class="dwd-golive" title="Launches ${p.goLiveAt}">🚀 Launches ${new Date(p.goLiveAt).toLocaleString(undefined,{year:'numeric',month:'short',day:'numeric',hour:'numeric',minute:'2-digit'})}</span>` : (/active|published/i.test(p.status||'') && p.created_at ? `<span class="dwd-golive launched" title="Launched ${p.created_at}">🚀 Launched ${new Date(p.created_at).toLocaleString(undefined,{year:'numeric',month:'short',day:'numeric',hour:'numeric',minute:'2-digit'})}</span>` : '')) : ''}
<div class="dwd-title">${p.title}</div>
${cf.vendor ? `<div class="dwd-vendor">${p.vendor}</div>` : ''}
+ ${cf.created && p.created_at ? `<div class="dwd-when" title="Created ${p.created_at}">🕓 Created ${new Date(p.created_at).toLocaleString(undefined,{year:'numeric',month:'short',day:'numeric',hour:'numeric',minute:'2-digit'})}</div>` : ''}
${cf.pattern && p.title ? `<div class="dwd-fld"><b>Pattern</b> ${p.title}</div>` : ''}
${cf.contents && p.subtype ? `<div class="dwd-fld"><b>Contents</b> ${p.subtype}</div>` : ''}
${cf.color && p.colorName ? `<div class="dwd-fld"><b>Color</b> ${p.colorName}</div>` : ''}
diff --git a/index.html b/index.html
index 787a4eb..c946c1c 100644
--- a/index.html
+++ b/index.html
@@ -89,7 +89,9 @@
.dwd-pal{display:flex;height:12px;border-radius:3px;overflow:hidden;margin:6px 0 3px;border:1px solid var(--line)}
.dwd-pal span{display:block;height:100%}
.dwd-pal-legend{font-size:10px;color:var(--mut);line-height:1.3;margin-bottom:2px}
- .dwd-golive{display:inline-block;font-size:10px;font-weight:600;color:#9a6a00;background:#fff7e6;border:1px solid #e7c98a;border-radius:4px;padding:2px 6px;margin:0 0 4px 4px}
+ .dwd-golive{display:inline-block;font-size:10px;font-weight:600;color:#9a6a00;background:#fff7e6;border:1px solid #e7c98a;border-radius:4px;padding:2px 6px;margin:0 4px 4px 0}
+ .dwd-golive.launched{color:#1c7a3e;background:#e6f4ea;border-color:#bfe3cb}
+ .dwd-when{font-size:10.5px;color:#9a6a00;margin-top:4px;display:flex;align-items:center;gap:4px}
.dwd-fld{font-size:11px;color:var(--mut);line-height:1.35}
.dwd-fld b{color:var(--ink);font-weight:600;text-transform:uppercase;font-size:9px;letter-spacing:.04em;margin-right:4px}
.dwd-meta{padding:11px 13px 14px}
← b5e553d Staged-for-New chip: show full launch date+time with year (�
·
back to Dw Discovery
·
dw-discovery: add name + image card-field toggle chips (merg 7bd0398 →