mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-21 11:10:07 +00:00
image: only lazy load if reference #1019
This commit is contained in:
parent
cf1fb446dd
commit
a8dfe51e9d
2 changed files with 2 additions and 2 deletions
|
@ -71,9 +71,9 @@
|
|||
{{- $attributes = merge $attributes (dict "src" $src) }}
|
||||
{{- else }}
|
||||
{{- $attributes = merge $attributes (dict "src" .url) }}
|
||||
{{- if $effects.lazy }}{{ $attributes = merge $attributes (dict "loading" "lazy") }}{{ end }}
|
||||
{{- end }}
|
||||
{{- if $attributes.class }}{{ $classes = $classes | append (split $attributes.class " ") }}{{ end }}
|
||||
{{- $attributes = merge $attributes (dict "class" (delimit $classes " ")) }}
|
||||
{{- $attributes = merge $attributes (dict "style" (printf " height: %s; width: %s;%s" $height $width (index $attributes "style" | default ""))) }}
|
||||
{{- if $effects.lazy }}{{ $attributes = merge $attributes (dict "loading" "lazy") }}{{ end }}
|
||||
{{- return $attributes }}
|
|
@ -1 +1 @@
|
|||
7.3.2+a9cc5c74d60c6f4467a9e710ce73eca13235eb12
|
||||
7.3.2+cf1fb446dd456655648d0ec2ccc8ae88c56e98d7
|
Loading…
Add table
Reference in a new issue