docs(email): document IMPORT structure + literal-hex brand constraint

This commit is contained in:
2026-06-27 00:02:52 +02:00
parent b9f85d1ac9
commit c1e017a149
2 changed files with 12 additions and 6 deletions
+9 -3
View File
@@ -46,18 +46,24 @@ them to users on various events (password reset, digest, ban, etc.).
## 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.
- `footer.html` — shared footer with the unsubscribe block
(`{{{ if showUnsubscribe }}}`).
- `post-queue-body.html` renders a queued post (category, topic, author,
content) inside `notification.html` for post-queue notifications.
- `post-queue-body.html` — queued-post notification body fragment (category,
topic, author, content), maintained for use by a notification branch/template.
## Editing notes
- These are emails: inline CSS, table layout, MSO/Outlook conditional
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
them in the language files.
- Run `node scripts/check-emails.js` after converting templates. It enforces