feat: use thumbnail in section and links image (#1291)
* feat: use thumbnail for section image * feat: use thumbnail in links image * fix typo
This commit is contained in:
+13
-4
@@ -20,10 +20,19 @@
|
||||
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
|
||||
{{ if $image }}
|
||||
<div class="section-image">
|
||||
<img src="{{ $image.Permalink }}"
|
||||
width="{{ $image.Width }}"
|
||||
height="{{ $image.Height }}"
|
||||
loading="lazy">
|
||||
{{ partial "helper/thumbnail-image" (dict
|
||||
"Resource" $image.Resource
|
||||
"Width" 60
|
||||
"Height" 60
|
||||
"Resize" .Site.Params.ImageProcessing.Thumbnail.Enabled
|
||||
"Attributes" (dict
|
||||
"src" $image.Permalink
|
||||
"alt" .Title
|
||||
"loading" "lazy"
|
||||
"width" $image.Width
|
||||
"height" $image.Height
|
||||
)
|
||||
) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user