mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
tpl/tplimpl: Add img loading attribute to figure shortcode (#10927)
This commit is contained in:
parent
e6dc8053bf
commit
2db7ec622f
2 changed files with 4 additions and 0 deletions
|
@ -117,6 +117,9 @@ height
|
||||||
width
|
width
|
||||||
: `width` attribute of the image.
|
: `width` attribute of the image.
|
||||||
|
|
||||||
|
loading
|
||||||
|
: `loading` attribute of the image.
|
||||||
|
|
||||||
attr
|
attr
|
||||||
: Image attribution text. Markdown within the value of `attr` will be rendered.
|
: Image attribution text. Markdown within the value of `attr` will be rendered.
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
||||||
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
||||||
|
{{- with .Get "loading" }} loading="{{ . }}"{{ end -}}
|
||||||
/><!-- Closing img tag -->
|
/><!-- Closing img tag -->
|
||||||
{{- if .Get "link" }}</a>{{ end -}}
|
{{- if .Get "link" }}</a>{{ end -}}
|
||||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||||
|
|
Loading…
Reference in a new issue