diff options
| author | XhmikosR <[email protected]> | 2021-09-09 15:01:58 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-09 15:01:58 +0300 |
| commit | e961454738f4033eb2be68bde4b257ea9e0a7765 (patch) | |
| tree | 507ca252e706a9c692b133b6e18fb8504c488837 /site/layouts/shortcodes/table.html | |
| parent | 86d5d5ea79e8eaa15a28b9da92bbee53036640f6 (diff) | |
| parent | 1df098361cac04217d6a464c80e890c4335ecb5c (diff) | |
| download | bootstrap-main-xmr-docs-render-heading.tar.xz bootstrap-main-xmr-docs-render-heading.zip | |
Merge branch 'main' into main-xmr-docs-render-headingmain-xmr-docs-render-heading
Diffstat (limited to 'site/layouts/shortcodes/table.html')
| -rw-r--r-- | site/layouts/shortcodes/table.html | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/site/layouts/shortcodes/table.html b/site/layouts/shortcodes/table.html index 43f230ab8..a98b5eb89 100644 --- a/site/layouts/shortcodes/table.html +++ b/site/layouts/shortcodes/table.html @@ -2,27 +2,28 @@ Usage: `table [args]` `args` are optional and can be one of the following: - class: any class(es) to be added to the `table` - default "" - simplified: show a simplified version in the examples - default `true` + * class: any class(es) to be added to the `table` - default "" + * simplified: show a simplified version in the examples - default `true` */ -}} +{{- $class := .Get "class" -}} {{- $simplified := .Get "simplified" | default true -}} {{- $table_attributes := "" -}} {{- $table_content := " ...\n" -}} -{{- with .Get "class" -}} -{{- $table_attributes = printf ` class="%s"` . -}} +{{- with $class -}} + {{- $table_attributes = printf ` class="%s"` . -}} {{- end -}} {{- if eq $simplified "false" -}} -{{- $table_content = partialCached "table-content" . -}} + {{- $table_content = partialCached "table-content" . -}} {{- end -}} {{- $table := printf "<table%s>\n%s</table>" $table_attributes $table_content -}} <div class="bd-example"> - <table{{ with .Get "class" }} class="{{ . }}"{{ end }}> + <table{{ with $class }} class="{{ . }}"{{ end }}> {{ partialCached "table-content" . }} </table> </div> |
