refactor: citations

This commit is contained in:
Ben Goldsworthy 2025-05-15 11:08:14 +02:00
parent de341f4191
commit 810805f9ab
No known key found for this signature in database
6 changed files with 76 additions and 54 deletions

View file

@ -33,7 +33,7 @@
class="item-tile lazy {{- with .Params.site }}item-tile--{{ . }}{{ end -}}"
{{ if .Params.featured_image }}
{{ with .Resources.GetMatch .Params.featured_image }}
{{ if eq .MediaType.SubType "svg" }}
{{ if ( in ( slice "avif" "svg" "gif" ) .MediaType.SubType ) }}
style="background-image: url({{ .RelPermalink }})"
{{ else }}
{{ with .Resize "1000x webp" }}
@ -51,7 +51,7 @@
style="display: none;"
src="
{{- with .Resources.GetMatch .Params.featured_image -}}
{{- if eq .MediaType.SubType "svg" -}}
{{- if ( in ( slice "avif" "svg" "gif" ) .MediaType.SubType ) -}}
{{ .RelPermalink }}
{{- else -}}
{{- with .Resize "1000x webp" -}}
@ -87,7 +87,7 @@
{{ end }}
{{- if .File -}}
{{- partialCached "text/item-title.html" ( dict "pc" . "sc" $ "class" "item-tile" ) .File.Filename -}}
{{- partial "text/item-title.html" ( dict "pc" . "sc" $ "class" "item-tile" ) -}}
{{- else -}}
{{- partial "text/item-title.html" ( dict "pc" . "sc" $ "class" "item-tile" ) -}}
{{- end -}}