From 3ea39841c8049525e31e9f4d6300f0c60cdb42de Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 24 Jan 2023 13:33:51 +0100 Subject: Adding upstream version 5.2.3+dfsg. Signed-off-by: Daniel Baumann --- site/layouts/shortcodes/table.html | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 site/layouts/shortcodes/table.html (limited to 'site/layouts/shortcodes/table.html') diff --git a/site/layouts/shortcodes/table.html b/site/layouts/shortcodes/table.html new file mode 100644 index 0000000..a98b5eb --- /dev/null +++ b/site/layouts/shortcodes/table.html @@ -0,0 +1,31 @@ +{{- /* + 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 := .Get "class" -}} +{{- $simplified := .Get "simplified" | default true -}} + +{{- $table_attributes := "" -}} +{{- $table_content := " ...\n" -}} + +{{- with $class -}} + {{- $table_attributes = printf ` class="%s"` . -}} +{{- end -}} + +{{- if eq $simplified "false" -}} + {{- $table_content = partialCached "table-content" . -}} +{{- end -}} + +{{- $table := printf "\n%s" $table_attributes $table_content -}} + +
+ + {{ partialCached "table-content" . }} + +
+ +{{- highlight $table "html" "" -}} -- cgit v1.2.3