← back to Marketing Command Center

data/campaign-drafts/build-classics.mjs

95 lines

// Build "The Classics" DW email — Commercial-Edit template, VERIFIED dw_unified data.
import fs from 'fs';
const PDP = 'https://designerwallcoverings.com/products/';
const SITE = 'https://designerwallcoverings.com';
const houses = [
  { house: 'Lee Jofa', col: 'lee-jofa', tag: 'Peony & pagoda toiles', picks: [
    { name: 'Pagoda Toile Paper', color: 'Blue', h: 'dwkk-139923', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/P2020110_535_c58ce264-a932-4882-a1f9-d3083009e06f.jpg?v=1753302399' },
    { name: 'Chinese Peony', color: 'Blue', h: 'dwkk-140051', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/P2023118_153_cfc42a8b-4c81-4e0b-8c3c-3bc5424cba49.jpg?v=1753294782' },
    { name: 'Pagoda Toile Paper', color: 'Coal', h: 'dwkk-139924', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/P2020110_816_8a38eb7e-eedf-4eef-a4e4-3ae164fd40fb.jpg?v=1753302396' },
  ]},
  { house: 'Cole & Son', col: 'cole-son', tag: 'English stripes & trellis', picks: [
    { name: 'Treillage', color: 'Cerulean', h: 'dwkk-g484adc07', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/116_6024_CS_7333130a-8aa4-4648-8c2c-cb9c252cf52f.jpg?v=1753305092' },
    { name: 'Cambridge Stripe', color: 'Pale Blue', h: 'dwkk-g9a236836', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/110_8039_CS_cb0b16e0-7fef-4502-9d97-a0b6495da6a5.jpg?v=1753305646' },
    { name: 'Coleridge', color: 'Blue & White', h: 'dwkk-g373f33d4', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/94_9051_CS_944fa4da-2d8a-4bdc-b613-38eefa4d78ea.jpg?v=1753303983' },
  ]},
  { house: 'Brunschwig & Fils', col: 'brunschwig-fils', tag: 'Embroidered chinoiserie', picks: [
    { name: 'La Pagode', color: 'Mist Turquoise', h: 'dwkk-102330', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/P8020108_13_b025d536-e70d-4b5b-9aee-3b79cf1601e6.jpg?v=1725922724' },
    { name: 'Nouvelle', color: 'Blue', h: 'dwkk-102411', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/P8022112_5_f2509d55-cfa0-4eb7-9289-948a2d7c582d.jpg?v=1725922928' },
    { name: 'Treillage Sidewall', color: 'Blue', h: 'dwkk-101521', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/BR-60100_5_f988b3b7-e1a0-429d-94c3-3591232f9e20.jpg?v=1725921048' },
  ]},
  { house: 'G P & J Baker', col: 'gp-j-baker', tag: 'Botanical — Iris Meadow', picks: [
    { name: 'Iris Meadow', color: 'Blue', h: 'dwkk-137800', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/BW45101_5_eb1d6de5-5819-46bf-839f-a44dc990fae6.jpg?v=1753303397' },
    { name: 'Iris Meadow', color: 'Aqua / Green', h: 'dwkk-137798', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/BW45101_3_29de0f4d-27ca-4cc5-b527-106e774be76d.jpg?v=1753303401' },
    { name: 'Iris Meadow', color: 'Linen', h: 'dwkk-137799', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/BW45101_4_a37f33a4-d5e6-4050-982b-1c3a05cb416c.jpg?v=1753303399' },
  ]},
  { house: 'Kravet Couture', col: 'kravet', tag: 'Chinoiserie fret — Jan Showers', picks: [
    { name: 'Bambu Fret', color: 'Ciel', h: 'dwkk-128273', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/W3404_15_f8eb18d6-2570-4a43-a3ce-4cde14e1f0d4.jpg?v=1753122504' },
    { name: 'Bambu Fret', color: 'Celery', h: 'dwkk-128274', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/W3404_23_b215112c-0cbd-4315-8c34-3719bca30577.jpg?v=1753122500' },
    { name: 'Bambu Fret', color: 'Pewter', h: 'dwkk-128275', img: 'https://cdn.shopify.com/s/files/1/0015/4117/7456/files/W3404_416_9a275042-b210-4473-b7ef-0688d3b5fe46.jpg?v=1753122498' },
  ]},
];

// Shop-by-Category chips — all verified live (200) on 2026-08-18
const cats = [
  { label: 'Chinoiserie', h: 'chinoiserie' },
  { label: 'Toile',       h: 'toile' },
  { label: 'Stripes',     h: 'stripes' },
  { label: 'Trellis',     h: 'trellis' },
  { label: 'Damask',      h: 'damask' },
  { label: 'Blue',        h: 'blue-wallpaper' },
];

const card = (p) => `
        <td width="33.33%" valign="top" style="padding:0 5px;">
          <a href="${PDP}${p.h}" style="text-decoration:none;color:inherit;display:block;">
            <img src="${p.img}" alt="${p.name} — ${p.color}" width="176" style="width:100%;height:150px;object-fit:cover;display:block;border:1px solid #e4e0d6;">
            <div style="font-size:13px;color:#20211f;margin-top:8px;line-height:1.3;">${p.name}</div>
            <div style="font-size:12px;color:#8a8578;margin-top:2px;">${p.color}</div>
          </a>
        </td>`;

const houseBlock = (h) => `
      <tr><td style="padding:22px 30px 4px;border-top:1px solid #ece8de;">
        <div style="font-size:15px;letter-spacing:2px;text-transform:uppercase;color:#20211f;"><a href="${SITE}/collections/${h.col}" style="color:#20211f;text-decoration:none;">${h.house}</a></div>
        <div style="font-size:12px;color:#8a8578;margin:3px 0 12px;">${h.tag}</div>
      </td></tr>
      <tr><td style="padding:0 25px 14px;">
        <table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr>${h.picks.map(card).join('')}</tr></table>
      </td></tr>`;

const html = `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>The Classics</title></head>
<body style="margin:0;padding:0;background:#f3f1ec;font-family:Georgia,'Times New Roman',serif;color:#20211f;">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#f3f1ec;"><tr><td align="center" style="padding:26px 12px;">
  <table role="presentation" width="600" cellpadding="0" cellspacing="0" style="width:600px;max-width:600px;background:#ffffff;border:1px solid #e4e0d6;">
    <tr><td align="center" style="padding:26px 30px 14px;border-bottom:1px solid #ece8de;">
      <a href="${SITE}" style="text-decoration:none;color:#20211f;display:inline-block;">
        <div style="font-size:22px;letter-spacing:3px;text-transform:uppercase;">Designer Wallcoverings</div>
      </a>
      <div style="font-size:12px;letter-spacing:2px;color:#8a8578;margin-top:6px;">TO THE TRADE &middot; SINCE 2003</div>
    </td></tr>
    <tr><td align="center" style="padding:28px 34px 6px;">
      <div style="font-size:13px;letter-spacing:3px;text-transform:uppercase;color:#9a7b3f;">The Classics &middot; Traditional &amp; Chinoiserie</div>
      <div style="font-size:29px;line-height:1.2;margin:12px 0 10px;">Classic, Romantic Motifs</div>
      <div style="font-size:15px;line-height:1.6;color:#4a4940;">Timeless interiors begin here &mdash; embroidered chinoiserie from Brunschwig &amp; Fils, peony &amp; pagoda toiles from Lee Jofa, English stripes and trellis from Cole &amp; Son, Iris Meadow botanicals from G P &amp; J Baker, and Jan Showers fret from Kravet Couture. A serene sweep of blue, aqua and green &mdash; every one stocked to the trade.</div>
    </td></tr>
    ${houses.map(houseBlock).join('')}
    <tr><td align="center" style="padding:26px 34px 8px;border-top:1px solid #ece8de;">
      <div style="font-size:14px;line-height:1.6;color:#4a4940;margin-bottom:16px;">Request a memo sample of any pattern &mdash; or shop the whole collection of classics at trade pricing.</div>
      <a href="${SITE}/collections/kravet" style="display:inline-block;background:#20211f;color:#ffffff;text-decoration:none;font-size:13px;letter-spacing:2px;text-transform:uppercase;padding:13px 30px;">Shop the Classics</a>
    </td></tr>
    <tr><td align="center" style="padding:18px 34px 4px;">
      <div style="font-size:11px;letter-spacing:2px;text-transform:uppercase;color:#8a8578;margin-bottom:10px;">Shop by Category</div>
      <div style="font-size:13px;color:#4a4940;">${cats.map((c,i)=>`<a href="${SITE}/collections/${c.h}" style="color:#4a4940;text-decoration:none;border-bottom:1px solid #d8d3c6;">${c.label}</a>`).join(' &nbsp;&middot;&nbsp; ')}</div>
    </td></tr>
    <tr><td align="center" style="padding:26px 34px 30px;border-top:1px solid #ece8de;">
      <div style="font-size:14px;letter-spacing:2px;text-transform:uppercase;">Designer Wallcoverings</div>
      <div style="font-size:12px;color:#8a8578;margin:6px 0 12px;">The Classics &middot; August 2026 &middot; To the trade — Los Angeles, since 2003</div>
      <div style="font-size:11px;line-height:1.7;color:#9a958a;">Designer Wallcoverings &amp; Fabrics &middot; 15442 Ventura Bl, Sherman Oaks, CA 91403 &middot; (888) 373-4564<br>You received this because you're a Designer Wallcoverings customer or trade contact.<br><a href="{{unsubscribe_url}}" style="color:#9a958a;">Unsubscribe</a> &nbsp;|&nbsp; <a href="{{update_profile_url}}" style="color:#9a958a;">Update Profile</a></div>
    </td></tr>
  </table>
</td></tr></table></body></html>`;

fs.writeFileSync(process.argv[2] || '/tmp/classics.html', html);
console.log('bytes:', html.length, '· houses:', houses.length, '· picks:', houses.reduce((n,h)=>n+h.picks.length,0));