mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
See #13541 for details. Fixes #13545 Fixes #13515 Closes #7964 Closes #13365 Closes #12988 Closes #4891
38 lines
844 B
HTML
38 lines
844 B
HTML
<table
|
|
{{- range $k, $v := .Attributes }}
|
|
{{- if $v }}
|
|
{{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr }}
|
|
{{- end }}
|
|
{{- end }}>
|
|
<thead>
|
|
{{- range .THead }}
|
|
<tr>
|
|
{{- range . }}
|
|
<th
|
|
{{- with .Alignment }}
|
|
{{- printf " style=%q" (printf "text-align: %s" .) | safeHTMLAttr }}
|
|
{{- end -}}
|
|
>
|
|
{{- .Text -}}
|
|
</th>
|
|
{{- end }}
|
|
</tr>
|
|
{{- end }}
|
|
</thead>
|
|
<tbody>
|
|
{{- range .TBody }}
|
|
<tr>
|
|
{{- range . }}
|
|
<td
|
|
{{- with .Alignment }}
|
|
{{- printf " style=%q" (printf "text-align: %s" .) | safeHTMLAttr }}
|
|
{{- end -}}
|
|
>
|
|
{{- .Text -}}
|
|
</td>
|
|
{{- end }}
|
|
</tr>
|
|
{{- end }}
|
|
</tbody>
|
|
</table>
|