tpl: Add loading attribute to qr shortcode
This commit is contained in:
parent
e91d3cff98
commit
8897113666
1 changed files with 4 additions and 0 deletions
|
@ -9,6 +9,7 @@ Encodes the given text into a QR code using the specified options and renders th
|
||||||
@param {string} [class] The class attribute of the img element.
|
@param {string} [class] The class attribute of the img element.
|
||||||
@param {string} [id] The id attribute of the img element.
|
@param {string} [id] The id attribute of the img element.
|
||||||
@param {string} [title] The title attribute of the img element.
|
@param {string} [title] The title attribute of the img element.
|
||||||
|
@param {string} [loading] The loading attribute of the img element, one of lazy, or eager.
|
||||||
|
|
||||||
@returns {template.HTML}
|
@returns {template.HTML}
|
||||||
|
|
||||||
|
@ -46,6 +47,8 @@ Encodes the given text into a QR code using the specified options and renders th
|
||||||
{{- $class := or (.Get "class") "" }}
|
{{- $class := or (.Get "class") "" }}
|
||||||
{{- $id := or (.Get "id") "" }}
|
{{- $id := or (.Get "id") "" }}
|
||||||
{{- $title := or (.Get "title") "" }}
|
{{- $title := or (.Get "title") "" }}
|
||||||
|
{{- $loading := or (.Get "loading") "" }}
|
||||||
|
|
||||||
|
|
||||||
{{- /* Validate arguments. */}}
|
{{- /* Validate arguments. */}}
|
||||||
{{- $errors := false}}
|
{{- $errors := false}}
|
||||||
|
@ -71,6 +74,7 @@ Encodes the given text into a QR code using the specified options and renders th
|
||||||
{{- with $class }} class="{{ $class }}" {{- end }}
|
{{- with $class }} class="{{ $class }}" {{- end }}
|
||||||
{{- with $id }} id="{{ $id }}" {{- end }}
|
{{- with $id }} id="{{ $id }}" {{- end }}
|
||||||
{{- with $title }} title="{{ $title }}" {{- end -}}
|
{{- with $title }} title="{{ $title }}" {{- end -}}
|
||||||
|
{{- with $loading }} loading="{{ $loading }}" {{- end -}}
|
||||||
>
|
>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue