Skip to content

Commit

Permalink
tpl: Add loading attribute to qr shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
nfriedli authored Jan 17, 2025
1 parent e91d3cf commit 8897113
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tpl/tplimpl/embedded/templates/shortcodes/qr.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@param {string} [class] The class 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} [loading] The loading attribute of the img element, one of lazy, or eager.

@returns {template.HTML}

Expand Down Expand Up @@ -46,6 +47,8 @@
{{- $class := or (.Get "class") "" }}
{{- $id := or (.Get "id") "" }}
{{- $title := or (.Get "title") "" }}
{{- $loading := or (.Get "loading") "" }}


{{- /* Validate arguments. */}}
{{- $errors := false}}
Expand All @@ -71,6 +74,7 @@
{{- with $class }} class="{{ $class }}" {{- end }}
{{- with $id }} id="{{ $id }}" {{- end }}
{{- with $title }} title="{{ $title }}" {{- end -}}
{{- with $loading }} loading="{{ $loading }}" {{- end -}}
>
{{- end }}
{{- end -}}

0 comments on commit 8897113

Please sign in to comment.