mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
29 lines
665 B
HTML
29 lines
665 B
HTML
<table
|
|
{{- range $k, $v := .Attributes }}
|
|
{{- if $v }}
|
|
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
|
{{- end }}
|
|
{{- end }}>
|
|
<thead>
|
|
{{- range .THead }}
|
|
<tr>
|
|
{{- range . }}
|
|
<th {{ printf "style=%q" (printf "text-align: %s" .Alignment) | safeHTMLAttr }}>
|
|
{{- .Text -}}
|
|
</th>
|
|
{{- end }}
|
|
</tr>
|
|
{{- end }}
|
|
</thead>
|
|
<tbody>
|
|
{{- range .TBody }}
|
|
<tr>
|
|
{{- range . }}
|
|
<td {{ printf "style=%q" (printf "text-align: %s" .Alignment) | safeHTMLAttr }}>
|
|
{{- .Text -}}
|
|
</td>
|
|
{{- end }}
|
|
</tr>
|
|
{{- end }}
|
|
</tbody>
|
|
</table>
|