diff options
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/tplimpl/embedded/templates/_default/_markup/render-table.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tpl/tplimpl/embedded/templates/_default/_markup/render-table.html b/tpl/tplimpl/embedded/templates/_default/_markup/render-table.html new file mode 100644 index 000000000..307f0a5a3 --- /dev/null +++ b/tpl/tplimpl/embedded/templates/_default/_markup/render-table.html @@ -0,0 +1,29 @@ +<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 | safeHTML -}} + </th> + {{- end }} + </tr> + {{- end }} + </thead> + <tbody> + {{- range .TBody }} + <tr> + {{- range . }} + <td {{ printf "style=%q" (printf "text-align: %s" .Alignment) | safeHTMLAttr }}> + {{- .Text | safeHTML -}} + </td> + {{- end }} + </tr> + {{- end }} + </tbody> +</table> |