feat(postcard): header, logo, footer and padding in the system and minimal layouts

- system.htm: the header partial (logo or site name) above the card and
  the copyright footer below it; its text wrapper ends with the footer
- brand CSS: the system layout's content cell keeps WinterCMS's 35px
  side padding (the 35px 0 override is gone)
- minimal.htm: the logo above the message when logoUrl is set
- TestMailPartialsSmoke/built_in_layouts covers the three layouts and the
  inlined brand colour on the button in each
- 35-06 Task 3 (G-35-8)
This commit is contained in:
Jakub Zych
2026-11-13 21:17:02 +01:00
parent d320733510
commit 09a5338d9a
6 changed files with 74 additions and 18 deletions

View File

@@ -64,12 +64,12 @@ Three layouts are available to every plugin's templates without declaring an ali
| `layout` | Renders |
|----------|---------|
| `default` | WinterCMS's default layout: a header with the Branding logo (or the site name when no logo is set), the message on a white card, and a footer with the copyright year and the site name. Used when the template names no layout. |
| `system` | WinterCMS's system layout: the message in a centred table, then a note that it was sent automatically. |
| `minimal` | The message directly in the page body, with the style block only. |
| `system` | WinterCMS's system layout: the same header and footer as `default`, the message on a padded white card, then a note that it was sent automatically. |
| `minimal` | The message directly in the page body, with the Branding logo above it when one is set. |
A plugin's own alias wins over `system` and `minimal`; `default` cannot be redefined.
Every layout gets these values besides `{{ .Content }}`: `{{ .Subject }}`, the CSS slots `{{ .brandCss }}` and `{{ .css }}`, `{{ .logoUrl }}` (see [Branding](#branding)), `{{ .siteName }}`, the site name, and `{{ .year }}`, the current year. The default layout uses the `header` and `footer` partials with them; the footer reads `© <year> <site name>`, or `© <year>` when there is no name, and the header row is left out when there is neither a logo nor a name.
Every layout gets these values besides `{{ .Content }}`: `{{ .Subject }}`, the CSS slots `{{ .brandCss }}` and `{{ .css }}`, `{{ .logoUrl }}` (see [Branding](#branding)), `{{ .siteName }}`, the site name, and `{{ .year }}`, the current year. The default and system layouts use the `header` and `footer` partials with them; the footer reads `© <year> <site name>`, or `© <year>` when there is no name, and the header row is left out when there is neither a logo nor a name.
## Branding