fix(postcard): print the site name literally in the built-in layouts' footer
- the footer partial gains a text argument, printed as a paragraph through html/template and verbatim in the text part; body stays Markdown for callers that pass Markdown on purpose - the default and system layouts pass the copyright line as text, so *Acme*, Acme <Studio> and [x](url) appear as typed, as in the header (WR-01) - README partial table, layouts and Branding paragraphs; docs partials table and built-in layouts paragraph - TestMailSafetySmoke/literal_footer
This commit is contained in:
@@ -2,7 +2,7 @@ name = "Default"
|
||||
==
|
||||
{{ .Content }}
|
||||
|
||||
{{ $copy := printf "© %v" .year }}{{ with .siteName }}{{ $copy = printf "%s %s" $copy . }}{{ end }}{{ partial "footer" "body" $copy }}
|
||||
{{ $copy := printf "© %v" .year }}{{ with .siteName }}{{ $copy = printf "%s %s" $copy . }}{{ end }}{{ partial "footer" "text" $copy }}
|
||||
==
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -31,7 +31,7 @@ name = "Default"
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{ $copy := printf "© %v" .year }}{{ with .siteName }}{{ $copy = printf "%s %s" $copy . }}{{ end }}{{ partial "footer" "body" $copy }}
|
||||
{{ $copy := printf "© %v" .year }}{{ with .siteName }}{{ $copy = printf "%s %s" $copy . }}{{ end }}{{ partial "footer" "text" $copy }}
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
name = "Footer"
|
||||
==
|
||||
-------------------
|
||||
{{ .body }}
|
||||
{{ if .text }}{{ .text }}{{ else }}{{ .body }}{{ end }}
|
||||
==
|
||||
<tr>
|
||||
<td>
|
||||
<table class="footer" align="center" width="570" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="content-cell" align="center">
|
||||
{{ markdown .body }}
|
||||
{{ if .text }}<p>{{ .text }}</p>{{ else }}{{ markdown .body }}{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -6,7 +6,7 @@ name = "System layout"
|
||||
---
|
||||
This is an automatic message. Please do not reply to it.
|
||||
|
||||
{{ $copy := printf "© %v" .year }}{{ with .siteName }}{{ $copy = printf "%s %s" $copy . }}{{ end }}{{ partial "footer" "body" $copy }}
|
||||
{{ $copy := printf "© %v" .year }}{{ with .siteName }}{{ $copy = printf "%s %s" $copy . }}{{ end }}{{ partial "footer" "text" $copy }}
|
||||
==
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -36,7 +36,7 @@ This is an automatic message. Please do not reply to it.
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{ $copy := printf "© %v" .year }}{{ with .siteName }}{{ $copy = printf "%s %s" $copy . }}{{ end }}{{ partial "footer" "body" $copy }}
|
||||
{{ $copy := printf "© %v" .year }}{{ with .siteName }}{{ $copy = printf "%s %s" $copy . }}{{ end }}{{ partial "footer" "text" $copy }}
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user