mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
c35dce56d0
resolve #503
46 lines
1.1 KiB
HTML
46 lines
1.1 KiB
HTML
{{- /*
|
|
Add a table wrapper to better style overflow tables
|
|
The reset of the template is the same as the default render-table.html
|
|
See https://gohugo.io/render-hooks/tables/
|
|
*/ -}}
|
|
<div class="table-wrapper">
|
|
<table
|
|
{{- range $k, $v := .Attributes }}
|
|
{{- if $v }}
|
|
{{- printf " %s=%q" $k $v | 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>
|
|
</div>
|
|
{{- /* EOF */ -}}
|