{{ $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 }} {{ $image := "" }} {{if $fill_image}} {{ $image = .Fill (printf "960x540 %s" $anchor) }} {{else}} {{ $image = .Fit (printf "960x540 %s" $anchor) }} {{end}} {{ if ne $image.MediaType.SubType "gif" }}{{ $image = $image.Process "webp" }}{{ end }}
{{ $item.Title | plainify }}
{{end}}
{{ range $index, $value := first 1 ($item.GetTerms "tags") }} {{ .Page.LinkTitle }} {{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 .Params.authors }}
{{ range $index, $value := first 1 ($item.GetTerms "authors") }}
{{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }} {{ $authorImage := $avatar.Process "Fill 50x50 Center 95 webp" }} avatar
{{- .Page.LinkTitle -}}
{{end}} {{end}}