docs(email): document IMPORT structure + literal-hex brand constraint
This commit is contained in:
@@ -630,11 +630,11 @@ git commit -m "feat(email): convert digest.html to shared partials + brand, loop
|
|||||||
**Files:**
|
**Files:**
|
||||||
- Modify: `email/README.md`
|
- Modify: `email/README.md`
|
||||||
|
|
||||||
- [ ] **Step 1: Fix the Partials section** — it currently says the partials are "included by the templates above" (was false, now true). State that every non-partial template `IMPORT`s `header.html` first and `footer.html` last, using the form confirmed in Task 3 (`emails/partials/header.html` or `.tpl`), and that `notification.html` imports `post-queue-body.html` for post-queue items.
|
- [x] **Step 1: Fix the Partials section** — it currently says the partials are "included by the templates above" (was false, now true). State that every non-partial template `IMPORT`s `header.html` first and `footer.html` last, using the form confirmed in Task 3 (`emails/partials/header.html`), and document `post-queue-body.html` as the queued-post notification body fragment without claiming the current `notification.html` imports it.
|
||||||
|
|
||||||
- [ ] **Step 2: Add a brand/constraint note to Editing notes** — add a bullet: brand colors are **literal inline hex** (Outlook/Gmail strip `var()`); `scss/westgate/_tokens.scss` holds the source values but cannot be referenced at runtime. Note the dark letterhead band + light cream card pattern, and that preheader copy lives in `languages/en-GB/email.json`.
|
- [x] **Step 2: Add a brand/constraint note to Editing notes** — add a bullet: brand colors are **literal inline hex** (Outlook/Gmail strip `var()`); `scss/westgate/_tokens.scss` holds the source values but cannot be referenced at runtime. Note the dark letterhead band + light cream card pattern, and that preheader copy lives in `languages/en-GB/email.json`.
|
||||||
|
|
||||||
- [ ] **Step 3: Commit**
|
- [x] **Step 3: Commit**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git add email/README.md
|
git add email/README.md
|
||||||
|
|||||||
+9
-3
@@ -46,18 +46,24 @@ them to users on various events (password reset, digest, ban, etc.).
|
|||||||
|
|
||||||
## Partials
|
## Partials
|
||||||
|
|
||||||
`partials/` holds fragments included by the templates above:
|
`partials/` holds fragments imported by the templates above. Every
|
||||||
|
non-partial template starts with `<!-- IMPORT emails/partials/header.html -->`
|
||||||
|
and ends with `<!-- IMPORT emails/partials/footer.html -->`.
|
||||||
|
|
||||||
- `header.html` — shared email head/header markup.
|
- `header.html` — shared email head/header markup.
|
||||||
- `footer.html` — shared footer with the unsubscribe block
|
- `footer.html` — shared footer with the unsubscribe block
|
||||||
(`{{{ if showUnsubscribe }}}`).
|
(`{{{ if showUnsubscribe }}}`).
|
||||||
- `post-queue-body.html` — renders a queued post (category, topic, author,
|
- `post-queue-body.html` — queued-post notification body fragment (category,
|
||||||
content) inside `notification.html` for post-queue notifications.
|
topic, author, content), maintained for use by a notification branch/template.
|
||||||
|
|
||||||
## Editing notes
|
## Editing notes
|
||||||
|
|
||||||
- These are emails: inline CSS, table layout, MSO/Outlook conditional
|
- These are emails: inline CSS, table layout, MSO/Outlook conditional
|
||||||
comments. Keep that structure — don't refactor into modern CSS.
|
comments. Keep that structure — don't refactor into modern CSS.
|
||||||
|
- Brand colors are literal inline hex because Outlook/Gmail strip `var()`.
|
||||||
|
`scss/westgate/_tokens.scss` holds the source values but is not available at
|
||||||
|
runtime; keep the dark letterhead band + light cream card pattern. Preheader
|
||||||
|
copy lives in `languages/en-GB/email.json`.
|
||||||
- Don't hardcode user-facing copy; add/replace `[[email:…]]` keys and define
|
- Don't hardcode user-facing copy; add/replace `[[email:…]]` keys and define
|
||||||
them in the language files.
|
them in the language files.
|
||||||
- Run `node scripts/check-emails.js` after converting templates. It enforces
|
- Run `node scripts/check-emails.js` after converting templates. It enforces
|
||||||
|
|||||||
Reference in New Issue
Block a user