mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 18:31:45 +01:00
fix(_default/term): switch to new image helper
This commit is contained in:
parent
28c06ef8ae
commit
19ff7a46bb
1 changed files with 9 additions and 5 deletions
|
@ -15,12 +15,16 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ if .Params.image }}
|
||||
{{- $image := partial "helper/image" . -}}
|
||||
{{- $thumbnail := $image.Fill "120x120" -}}
|
||||
{{ $image := partial "helper/image" . }}
|
||||
{{ if $image.exists }}
|
||||
<div class="taxonomy-image">
|
||||
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
||||
height="{{ $thumbnail.Height }}" loading="lazy">
|
||||
{{ if $image.local }}
|
||||
{{- $thumbnail := $image.src.Fill "120x120" -}}
|
||||
<img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
|
||||
height="{{ $thumbnail.Height }}" loading="lazy">
|
||||
{{ else }}
|
||||
<img src="{{ $image.src }}" loading="lazy">
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue