{{ $item := .item }} {{ $fill_image := .config.fill_image | default true }} {{ $resource := partial "functions/get_featured_image.html" $item }} {{ $anchor := $item.Params.image.focal_point | default "Center" }} {{ $link := $item.Params.external_link | default $item.RelPermalink }} {{ $target := "" }} {{ if $item.Params.external_link }} {{ $link = $item.Params.external_link }} {{ $target = "target=\"_blank\" rel=\"noopener\"" }} {{ end }}
{{ with $resource }} {{/* Skip GIF processing */}} {{ if ne .MediaType.SubType "gif" }} {{/* Process original image first, then create responsive variants */}} {{ $original_image := "" }} {{if $fill_image}} {{ $original_image = .Fill (printf "960x540 %s" $anchor) }} {{else}} {{ $original_image = .Fit (printf "960x540 %s" $anchor) }} {{end}} {{ $responsive := partial "functions/process_responsive_image.html" (dict "image" $original_image "mode" "responsive" "sizes" (slice 480 768 960 1200 1920) ) }}
{{ $item.Title | plainify }}
{{ else }} {{/* Handle GIF without processing */}}
{{ $item.Title | plainify }}
{{ end }} {{end}}
{{ if and $item.Params.tags (gt (len $item.Params.tags) 0) }} {{ range $index, $value := first 1 ($item.GetTerms "tags") }} {{ .Page.LinkTitle }} {{end}} {{ end }}

{{- $item.Title -}} {{if $target}}{{ partial "functions/get_icon" (dict "name" "arrow-top-right-on-square" "attributes" "style=\"height: 1em;\" class=\"inline-flex h-6 w-6 pl-2\"") }}{{end}}

{{ if $item.Params.authors }}
{{ if and $item.Params.authors (gt (len $item.Params.authors) 0) }} {{ range $index, $value := first 1 ($item.GetTerms "authors") }}
{{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }} {{ if $avatar }} {{/* Use a single 2x retina source for a 20px display */}} {{ $avatar_40 := $avatar.Process "Fill 40x40 Center webp" }} avatar {{ else }} {{ warnf "An image named `avatar` was not found in the `%s` folder" $value.Path }} {{ end }}
{{- .Page.LinkTitle -}}
{{end}} {{ end }} • {{end}}