feat(postcard): finished default layout with logo header, footer and site name
- default.htm ports WinterCMS's default layout: wrapper, header row with the Branding logo (or the site name), the inner-body card and a copyright footer; its text wrapper ends with the footer - built-in header and footer partials (logo/body/url, body) - layouts get siteName (Branding site name, else the display name of mail.from) and year; Brand.SiteName and migration 202611130002_mail_brand_site_name - cabana Branding form gets site_name (trimmed, max 255), mapped into the Branding preview draft; en/pl copy; img.logo brand CSS - 35-06 Task 1 (G-35-8)
This commit is contained in:
@@ -310,7 +310,7 @@ func (e *Editor) renderPartial(d Draft, ov Overrides, opts renderOptions) (Rende
|
||||
}
|
||||
|
||||
// renderBrand renders the sample message in the default layout with the
|
||||
// draft's colours and logo in place of the saved Branding.
|
||||
// draft's colours, logo and site name in place of the saved Branding.
|
||||
func (e *Editor) renderBrand(d Draft, ov Overrides, opts renderOptions) (RenderedMessage, error) {
|
||||
brand := DefaultBrand()
|
||||
if d.Brand != nil {
|
||||
@@ -321,6 +321,7 @@ func (e *Editor) renderBrand(d Draft, ov Overrides, opts renderOptions) (Rendere
|
||||
return RenderedMessage{}, err
|
||||
}
|
||||
opts.brandCSS, opts.logoURL = css, brand.LogoURL
|
||||
opts.siteName = siteName(&brand, e.m.opts.From)
|
||||
opts.overrides = ov
|
||||
sample := sampleMessage()
|
||||
return e.m.catalog.renderFrom(Message{
|
||||
|
||||
Reference in New Issue
Block a user