fix(_default/term): switch to new image helper
This commit is contained in:
parent
28c06ef8ae
commit
19ff7a46bb
@ -15,12 +15,16 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if .Params.image }}
|
{{ $image := partial "helper/image" . }}
|
||||||
{{- $image := partial "helper/image" . -}}
|
{{ if $image.exists }}
|
||||||
{{- $thumbnail := $image.Fill "120x120" -}}
|
|
||||||
<div class="taxonomy-image">
|
<div class="taxonomy-image">
|
||||||
|
{{ if $image.local }}
|
||||||
|
{{- $thumbnail := $image.src.Fill "120x120" -}}
|
||||||
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
||||||
height="{{ $thumbnail.Height }}" loading="lazy">
|
height="{{ $thumbnail.Height }}" loading="lazy">
|
||||||
|
{{ else }}
|
||||||
|
<img src="{{ $image.src }}" loading="lazy">
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user