Skip to content

Commit 8897113

Browse files
authored
tpl: Add loading attribute to qr shortcode
1 parent e91d3cf commit 8897113

File tree

1 file changed

+4
-0
lines changed
  • tpl/tplimpl/embedded/templates/shortcodes

1 file changed

+4
-0
lines changed

tpl/tplimpl/embedded/templates/shortcodes/qr.html

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
@param {string} [class] The class attribute of the img element.
1010
@param {string} [id] The id attribute of the img element.
1111
@param {string} [title] The title attribute of the img element.
12+
@param {string} [loading] The loading attribute of the img element, one of lazy, or eager.
1213

1314
@returns {template.HTML}
1415

@@ -46,6 +47,8 @@
4647
{{- $class := or (.Get "class") "" }}
4748
{{- $id := or (.Get "id") "" }}
4849
{{- $title := or (.Get "title") "" }}
50+
{{- $loading := or (.Get "loading") "" }}
51+
4952

5053
{{- /* Validate arguments. */}}
5154
{{- $errors := false}}
@@ -71,6 +74,7 @@
7174
{{- with $class }} class="{{ $class }}" {{- end }}
7275
{{- with $id }} id="{{ $id }}" {{- end }}
7376
{{- with $title }} title="{{ $title }}" {{- end -}}
77+
{{- with $loading }} loading="{{ $loading }}" {{- end -}}
7478
>
7579
{{- end }}
7680
{{- end -}}

0 commit comments

Comments
 (0)