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/placeholder.html | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 site/layouts/shortcodes/placeholder.html (limited to 'site/layouts/shortcodes/placeholder.html') diff --git a/site/layouts/shortcodes/placeholder.html b/site/layouts/shortcodes/placeholder.html new file mode 100644 index 0000000..c267bf4 --- /dev/null +++ b/site/layouts/shortcodes/placeholder.html @@ -0,0 +1,33 @@ +{{- /* + Usage: `placeholder args` + + `args` are all optional and can be one of the following: + * title: Used in the SVG `title` tag - default: "Placeholder" + * text: The text to show in the image - default: "width x height" + * class: Class to add to the `svg` - default: "bd-placeholder-img" + * color: The text color (foreground) - default: "#dee2e6" + * background: The background color - default: "#868e96" + * width: default: "100%" + * height: default: "180px" +*/ -}} + +{{- $grays := $.Site.Data.grays -}} +{{- $default_color := (index $grays 2).hex -}} +{{- $default_background := (index $grays 5).hex -}} + +{{- $title := .Get "title" | default "Placeholder" -}} +{{- $class := .Get "class" -}} +{{- $color := .Get "color" | default $default_color -}} +{{- $background := .Get "background" | default $default_background -}} +{{- $width := .Get "width" | default "100%" -}} +{{- $height := .Get "height" | default "180" -}} +{{- $text := .Get "text" | default (printf "%sx%s" $width $height) -}} + +{{- $show_title := not (eq $title "false") -}} +{{- $show_text := not (eq $text "false") -}} + + -- cgit v1.2.3