Adding upstream version 5.2.3+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b80f12a01d
commit
bc475d7d0d
617 changed files with 89471 additions and 0 deletions
5
site/layouts/shortcodes/added-in.html
Normal file
5
site/layouts/shortcodes/added-in.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{- /* Outputs badge to identify the first version something was added */ -}}
|
||||
|
||||
{{- $version := .Get 0 -}}
|
||||
|
||||
<small class="d-inline-flex mb-3 px-2 py-1 fw-semibold text-success bg-success bg-opacity-10 border border-success border-opacity-10 rounded-2">Added in v{{ $version }}</small>
|
9
site/layouts/shortcodes/bs-table.html
Normal file
9
site/layouts/shortcodes/bs-table.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{- /*
|
||||
Usage: `bs-table "class class-foo"`, where class can be any string
|
||||
*/ -}}
|
||||
|
||||
{{- $css_class := .Get 0 | default "table" -}}
|
||||
{{- $html_table := .Inner | markdownify -}}
|
||||
{{- $html_table = replace $html_table "<table>" (printf `<div class="table-responsive"><table class="%s">` $css_class) -}}
|
||||
{{- $html_table = replace $html_table "</table>" "</table></div>" -}}
|
||||
{{- $html_table | safeHTML -}}
|
9
site/layouts/shortcodes/callout.html
Normal file
9
site/layouts/shortcodes/callout.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{- /*
|
||||
Usage: `callout "type"`, where `type` is one of info (default), danger, or warning
|
||||
*/ -}}
|
||||
|
||||
{{- $css_class := .Get 0 | default "info" -}}
|
||||
|
||||
<div class="bd-callout bd-callout-{{ $css_class }}">
|
||||
{{ .Inner | markdownify }}
|
||||
</div>
|
1
site/layouts/shortcodes/docsref.html
Normal file
1
site/layouts/shortcodes/docsref.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{- relref . ((path.Join "docs" $.Site.Params.docs_version (.Get 0)) | relURL) -}}
|
47
site/layouts/shortcodes/example.html
Normal file
47
site/layouts/shortcodes/example.html
Normal file
|
@ -0,0 +1,47 @@
|
|||
{{- /*
|
||||
Usage: `example args`
|
||||
|
||||
`args` are all 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: ""
|
||||
* lang: language used to display the code - default: "html"
|
||||
* show_markup: if the markup should be output in the HTML - default: `true`
|
||||
* show_preview: if the preview should be output in the HTML - default: `true`
|
||||
* stackblitz_add_js: if extra JS snippet should be added to StackBlitz - default: `false`
|
||||
*/ -}}
|
||||
|
||||
{{- $id := .Get "id" -}}
|
||||
{{- $class := .Get "class" -}}
|
||||
{{- $lang := .Get "lang" | default "html" -}}
|
||||
{{- $stackblitz_add_js := .Get "stackblitz_add_js" | default false -}}
|
||||
{{- $show_markup := .Get "show_markup" | default true -}}
|
||||
{{- $show_preview := .Get "show_preview" | default true -}}
|
||||
{{- $input := .Inner -}}
|
||||
|
||||
<div class="bd-example-snippet bd-code-snippet">
|
||||
{{- if eq $show_preview true -}}
|
||||
<div{{ with $id }} id="{{ . }}"{{ end }} class="bd-example{{ with $class }} {{ . }}{{ end }}">
|
||||
{{- $input -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $show_markup true -}}
|
||||
{{- if eq $show_preview true -}}
|
||||
<div class="d-flex align-items-center highlight-toolbar bg-light ps-3 pe-2 py-1">
|
||||
<small class="font-monospace text-muted text-uppercase">{{- $lang -}}</small>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn-edit text-nowrap"{{ with $stackblitz_add_js }} data-sb-js-snippet="{{ $stackblitz_add_js }}"{{ end }} title="Try it on StackBlitz">
|
||||
<svg class="bi" role="img" aria-label="Try it"><use xlink:href="#lightning-charge-fill"/></svg>
|
||||
</button>
|
||||
<button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
|
||||
<svg class="bi" role="img" aria-label="Copy"><use xlink:href="#clipboard"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- $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 -}}
|
||||
</div>
|
15
site/layouts/shortcodes/js-dismiss.html
Normal file
15
site/layouts/shortcodes/js-dismiss.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{- /* Usage: js-dismiss "ComponentName" */ -}}
|
||||
|
||||
{{- $name := .Get 0 -}}
|
||||
|
||||
Dismissal can be achieved with the `data` attribute on a button **within the {{ $name }}** as demonstrated below:
|
||||
|
||||
```html
|
||||
<button type="button" class="btn-close" data-bs-dismiss="{{ $name }}" aria-label="Close"></button>
|
||||
```
|
||||
|
||||
or on a button **outside the {{ $name }}** using the `data-bs-target` as demonstrated below:
|
||||
|
||||
```html
|
||||
<button type="button" class="btn-close" data-bs-dismiss="{{ $name }}" data-bs-target="#my-{{ $name }}" aria-label="Close"></button>
|
||||
```
|
1
site/layouts/shortcodes/markdown.html
Normal file
1
site/layouts/shortcodes/markdown.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{- .Inner | markdownify -}}
|
14
site/layouts/shortcodes/param.html
Normal file
14
site/layouts/shortcodes/param.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{- /*
|
||||
Work around wrong escapes in integrity attributes.
|
||||
Original: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/param.html
|
||||
*/ -}}
|
||||
|
||||
{{- $name := .Get 0 -}}
|
||||
{{- with $name -}}
|
||||
{{- $value := $.Page.Param . -}}
|
||||
{{- /* If any parameter ends with `_hash`, mark the string as safe HTML */ -}}
|
||||
{{- if (strings.HasSuffix $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 -}}
|
1
site/layouts/shortcodes/partial.html
Normal file
1
site/layouts/shortcodes/partial.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{ partial (.Get 0) . }}
|
33
site/layouts/shortcodes/placeholder.html
Normal file
33
site/layouts/shortcodes/placeholder.html
Normal file
|
@ -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") -}}
|
||||
|
||||
<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>
|
43
site/layouts/shortcodes/scss-docs.html
Normal file
43
site/layouts/shortcodes/scss-docs.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
{{- /*
|
||||
Usage: `scss-docs name="name" file="file/_location.scss"`
|
||||
|
||||
Prints everything between `// scss-docs-start "name"` and `// scss-docs-end "name"`
|
||||
comments in the docs.
|
||||
|
||||
Optional parameters:
|
||||
* strip-default: Remove the ` !default` flag from variable assignments - default: `true`
|
||||
*/ -}}
|
||||
|
||||
{{- $name := .Get "name" -}}
|
||||
{{- $file := .Get "file" -}}
|
||||
{{- $strip_default := .Get "strip-default" | default "true" -}}
|
||||
|
||||
{{- /* If any parameters are missing, print an error and exit */ -}}
|
||||
{{- if or (not $name) (not $file) -}}
|
||||
{{- errorf "%s: %q: Missing required parameters! Got: name=%q file=%q!" .Position .Name $name $file -}}
|
||||
{{- else -}}
|
||||
{{- $capture_start := printf "// scss-docs-start %s\n" $name -}}
|
||||
{{- $capture_end := printf "// scss-docs-end %s" $name -}}
|
||||
{{- $regex := printf `%s((?:.|\n)*)%s` $capture_start $capture_end -}}
|
||||
|
||||
{{- /*
|
||||
TODO: figure out why we can't do the following and get the first group (the only capturing one)...
|
||||
$regex := printf `(?:// scss-docs-start %s\n)((?:.|\n)*)(?:\n// scss-docs-end %s)` $name $name
|
||||
*/ -}}
|
||||
|
||||
{{- $match := findRE $regex (readFile $file) -}}
|
||||
{{- $match = index $match 0 -}}
|
||||
|
||||
{{- if not $match -}}
|
||||
{{- errorf "%s: %q: Got no matches for name=%q in file=%q!" .Position .Name $name $file -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $match = replace $match $capture_start "" -}}
|
||||
{{- $match = replace $match $capture_end "" -}}
|
||||
|
||||
{{- if (ne $strip_default "false") -}}
|
||||
{{- $match = replace $match " !default" "" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- highlight $match "scss" "" -}}
|
||||
{{- end -}}
|
31
site/layouts/shortcodes/table.html
Normal file
31
site/layouts/shortcodes/table.html
Normal file
|
@ -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 "<table%s>\n%s</table>" $table_attributes $table_content -}}
|
||||
|
||||
<div class="bd-example">
|
||||
<table{{ with $class }} class="{{ . }}"{{ end }}>
|
||||
{{ partialCached "table-content" . }}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{- highlight $table "html" "" -}}
|
3
site/layouts/shortcodes/year.html
Normal file
3
site/layouts/shortcodes/year.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{- /* Outputs the current year */ -}}
|
||||
|
||||
{{- now.Format "2006" -}}
|
Loading…
Add table
Add a link
Reference in a new issue