fix: update image dimensions for featured image preview in summary layout

This commit is contained in:
Cell
2025-12-22 16:37:28 +08:00
parent 9bcdbe3325
commit fdcc20af26
4 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251222065334-6cf32775" -}}
{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251222083729-9bcdbe33" -}}
{{- .Store.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
+4 -4
View File
@@ -13,11 +13,11 @@
<div class="featured-image-preview">
<a href="{{ $.RelPermalink }}" aria-label="{{ $.Title }}">
{{- $optim := slice
(dict "Process" "fill 800x240 Center webp q75" "descriptor" "800w")
(dict "Process" "fill 1200x360 Center webp q75" "descriptor" "1200w")
(dict "Process" "fill 1600x480 Center webp q75" "descriptor" "1600w")
(dict "Process" "fill 800x336 Center webp q75" "descriptor" "800w")
(dict "Process" "fill 1200x504 Center webp q75" "descriptor" "1200w")
(dict "Process" "fill 1600x672 Center webp q75" "descriptor" "1600w")
-}}
{{- dict "Src" $image "Title" $.Title "Resources" $.Resources "Matches" $matches "Loading" "eager" "Width" "800" "Height" "240" "Sizes" "(max-width: 680px) 100vw, (max-width: 960px) 80vw, (max-width: 1440px) 56vw, 800px" "OptimConfig" $optim "Alt" (printf "Featured image for %v" $.Title) | partial "plugin/image.html" -}}
{{- dict "Src" $image "Title" $.Title "Resources" $.Resources "Matches" $matches "Loading" "eager" "Width" "800" "Height" "336" "Sizes" "(max-width: 680px) 100vw, (max-width: 960px) 80vw, (max-width: 1440px) 56vw, 800px" "OptimConfig" $optim "Alt" (printf "Featured image for %v" $.Title) | partial "plugin/image.html" -}}
</a>
</div>
{{- end -}}