diff options
Diffstat (limited to 'vendor/twbs/bootstrap/site/layouts/shortcodes')
8 files changed, 86 insertions, 0 deletions
diff --git a/vendor/twbs/bootstrap/site/layouts/shortcodes/callout.html b/vendor/twbs/bootstrap/site/layouts/shortcodes/callout.html new file mode 100644 index 000000000..007f8a8e8 --- /dev/null +++ b/vendor/twbs/bootstrap/site/layouts/shortcodes/callout.html @@ -0,0 +1,10 @@ +{{- /* + Usage: `callout "type"`, + where type is one of info (default), danger, warning +*/ -}} + +{{- $css_class := .Get 0 | default "info" -}} + +<div class="bd-callout bd-callout-{{ $css_class }}"> +{{ .Inner | markdownify }} +</div> diff --git a/vendor/twbs/bootstrap/site/layouts/shortcodes/docsref.html b/vendor/twbs/bootstrap/site/layouts/shortcodes/docsref.html new file mode 100644 index 000000000..88e43d172 --- /dev/null +++ b/vendor/twbs/bootstrap/site/layouts/shortcodes/docsref.html @@ -0,0 +1 @@ +{{- relref . ((printf "docs/%s%s" $.Site.Params.docs_version (.Get 0)) | relURL) -}} diff --git a/vendor/twbs/bootstrap/site/layouts/shortcodes/example.html b/vendor/twbs/bootstrap/site/layouts/shortcodes/example.html new file mode 100644 index 000000000..fd20839cb --- /dev/null +++ b/vendor/twbs/bootstrap/site/layouts/shortcodes/example.html @@ -0,0 +1,26 @@ +{{- /* + Usage: `example [args]` + + `args` are optional and can be one of the following: + id: the `div`'s id - default: "" + class: any extra class(es) to be added to the `div` - default "" + show_preview: if the preview should be output in the HTML - default: `true` + show_markup: if the markup should be output in the HTML - default: `true` +*/ -}} + +{{- $lang := .Get "lang" | default "html" -}} +{{- $show_preview := .Get "show_preview" | default true -}} +{{- $show_markup := .Get "show_markup" | default true -}} +{{- $input := .Inner -}} + +{{- if eq $show_preview true -}} +<div{{ with .Get "id" }} id="{{ . }}"{{ end }} class="bd-example{{ with .Get "class" }} {{ . }}{{ end }}"> + {{- $input -}} +</div> +{{- end -}} + +{{- if eq $show_markup true -}} + {{- $content := replaceRE `<svg class="bd\-placeholder\-img(?:\-lg)?(?: *?bd\-placeholder\-img\-lg)? ?(.*?)".*?<\/svg>\n` `<img src="..." class="$1" alt="...">` $input -}} + {{- $content = replaceRE ` (class=" *?")` "" $content -}} + {{- highlight (trim $content "\n") $lang "" -}} +{{- end -}} diff --git a/vendor/twbs/bootstrap/site/layouts/shortcodes/markdown.html b/vendor/twbs/bootstrap/site/layouts/shortcodes/markdown.html new file mode 100644 index 000000000..82107bcef --- /dev/null +++ b/vendor/twbs/bootstrap/site/layouts/shortcodes/markdown.html @@ -0,0 +1 @@ +{{- .Inner | markdownify -}} diff --git a/vendor/twbs/bootstrap/site/layouts/shortcodes/param.html b/vendor/twbs/bootstrap/site/layouts/shortcodes/param.html new file mode 100644 index 000000000..50e2060ae --- /dev/null +++ b/vendor/twbs/bootstrap/site/layouts/shortcodes/param.html @@ -0,0 +1,12 @@ +{{- /* + Work around wrong escapes in integrity attributes. +*/ -}} + +{{- $name := .Get 0 -}} +{{- with $name -}} +{{- $value := $.Page.Param . -}} +{{- if in $name "_hash" -}} + {{- $value = $value | safeHTML -}} +{{- end -}} +{{- with $value }}{{ . }}{{ else }}{{ errorf "Param %q not found: %s" $name $.Position }}{{ end -}} +{{- else }}{{ errorf "Missing param key: %s" $.Position }}{{ end -}} diff --git a/vendor/twbs/bootstrap/site/layouts/shortcodes/partial.html b/vendor/twbs/bootstrap/site/layouts/shortcodes/partial.html new file mode 100644 index 000000000..c9d3496de --- /dev/null +++ b/vendor/twbs/bootstrap/site/layouts/shortcodes/partial.html @@ -0,0 +1 @@ +{{ partial (.Get 0) . }} diff --git a/vendor/twbs/bootstrap/site/layouts/shortcodes/placeholder.html b/vendor/twbs/bootstrap/site/layouts/shortcodes/placeholder.html new file mode 100644 index 000000000..2373bc927 --- /dev/null +++ b/vendor/twbs/bootstrap/site/layouts/shortcodes/placeholder.html @@ -0,0 +1,30 @@ +{{- /* + Usage: `placeholder args` + + args 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: 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 -}} +{{- $title := .Get "title" | default "Placeholder" -}} +{{- $class := .Get "class" -}} +{{- $color := .Get "color" | default (index $grays 2).hex -}} +{{- $background := .Get "background" | default (index $grays 5).hex -}} +{{- $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") -}} + +<svg class="bd-placeholder-img{{ with $class }} {{ . }}{{ end }}" width="{{ $width }}" height="{{ $height }}" xmlns="http://www.w3.org/2000/svg"{{ if (or $show_title $show_text) }} role="img" aria-label="{{ if $show_title }}{{ $title }}{{ if $show_text }}: {{ end }}{{ end }}{{ if ($show_text) }}{{ $text }}{{ end }}"{{ else }} aria-hidden="true"{{ end }} preserveAspectRatio="xMidYMid slice" focusable="false"> + {{- if $show_title -}}<title>{{ $title }}</title>{{- end -}} + <rect width="100%" height="100%" fill="{{ $background }}"/> + {{- if $show_text -}}<text x="50%" y="50%" fill="{{ $color }}" dy=".3em">{{ $text }}</text>{{- end -}} +</svg> diff --git a/vendor/twbs/bootstrap/site/layouts/shortcodes/year.html b/vendor/twbs/bootstrap/site/layouts/shortcodes/year.html new file mode 100644 index 000000000..bc9dd300d --- /dev/null +++ b/vendor/twbs/bootstrap/site/layouts/shortcodes/year.html @@ -0,0 +1,5 @@ +{{- /* + Output the current year +*/ -}} + +{{- now.Format "2006" -}} |