mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
image: unify #824
This commit is contained in:
parent
86b53ec26c
commit
46e7e5e4cd
1 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $height := "auto" }}
|
{{- $height := "auto" }}
|
||||||
{{- $width := "auto" }}
|
{{- $width := "auto" }}
|
||||||
|
{{- $attributes := .attributes | default dict }}
|
||||||
{{- $dest_url := urls.Parse $url }}
|
{{- $dest_url := urls.Parse $url }}
|
||||||
{{- $dest_path := $dest_url.Path }}
|
{{- $dest_path := $dest_url.Path }}
|
||||||
{{- $image := "" }}
|
{{- $image := "" }}
|
||||||
|
@ -76,7 +77,7 @@
|
||||||
{{- $classes = $classes | append $c }}
|
{{- $classes = $classes | append $c }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }}
|
{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }}
|
||||||
{{- $attributes := merge .attributes (dict "alt" $alt "src" $url "title" $title) }}
|
{{- $attributes = merge $attributes (dict "alt" $alt "src" $url "title" $title) }}
|
||||||
{{- if $effects.lazy }}
|
{{- if $effects.lazy }}
|
||||||
{{- $attributes = merge $attributes (dict "loading" "lazy") }}
|
{{- $attributes = merge $attributes (dict "loading" "lazy") }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue