mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
♻️ Refactor: image rendering aaa~again (#575)
This commit is contained in:
@@ -137,12 +137,20 @@
|
||||
|
||||
{{- /* Featured image */ -}}
|
||||
{{- $image := $params.featuredimage -}}
|
||||
{{- with dict "Path" $image "Resources" .Resources | partial "function/resource.html" }}
|
||||
{{- $image = .RelPermalink }}
|
||||
{{- end }}
|
||||
{{- with .Resources.GetMatch "featured-image" -}}
|
||||
{{- $image = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- with $image -}}
|
||||
<div class="featured-image">
|
||||
{{- dict "Src" . "Title" $.Description | partial "plugin/image.html" -}}
|
||||
{{- $optim := slice
|
||||
(dict "Process" "resize 800x webp q75" "descriptor" "800w")
|
||||
(dict "Process" "resize 1200x webp q75" "descriptor" "1200w")
|
||||
(dict "Process" "resize 1600x webp q75" "descriptor" "1600w")
|
||||
-}}
|
||||
{{- dict "Src" . "Title" $.Description "OptimConfig" $optim | partial "plugin/image.html" -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user