{{ $item := .item }} {{ $link := $item.RelPermalink }} {{ $target := "" }} {{ if $item.Params.external_link }} {{ $link = $item.Params.external_link }} {{ $target = "target=\"_blank\" rel=\"noopener\"" }} {{ end }} {{ $resource := partial "functions/get_featured_image.html" $item }} {{ $image_params := partial "functions/get_page_image_params.html" $item }} {{ $anchor := $image_params.focal_point | default "Center" }} {{ $fill_image := .config.fill_image | default true }} {{ $showDate := .config.show_date | default true }} {{ $showReadTime := .config.show_read_time | default true }} {{ $showReadMore := .config.show_read_more | default true }} {{ $hasMeta := or $showDate $showReadTime $showReadMore }} {{ $index := .index }} {{ $isEvent := eq $item.Type "events" }} {{ $event_dates := "" }} {{ if $isEvent }} {{ $event_dates = partial "functions/get_event_dates" $item }} {{ end }}
{{/* Award badge takes priority over trending — awards are higher-signal */}} {{ $top_award := "" }} {{ with $item.Params.awards }}{{ $top_award = index . 0 }}{{ end }} {{ with $top_award }} {{ partial "components/award_badge.html" (dict "award" . "page" $item "variant" "card-corner") }} {{ else }} {{ with $item.Params.content_meta }} {{ if .trending }}
{{ i18n "trending" | default "Trending" }}
{{ end }} {{ end }} {{ end }} {{ with $resource }} {{/* Image processing gate: - reflect.IsImageResourceProcessable → false for SVG (not processable by Hugo). - GIF: processable by Hugo but we skip to preserve animation frames. */}} {{ $canProcess := and (reflect.IsImageResourceProcessable .) (ne .MediaType.SubType "gif") }} {{ if not $canProcess }} {{ $item.Title | plainify }} featured image {{ else }} {{ $original_image := "" }} {{ if $fill_image }} {{ $original_image = .Fill (printf "800x450 %s" $anchor) }} {{ else }} {{ $original_image = .Fit (printf "800x450 %s" $anchor) }} {{ end }} {{ $responsive := partial "functions/process_responsive_image.html" (dict "image" $original_image "mode" "responsive" "sizes" (slice 400 600 800) "formats" (slice "avif" "webp" "jpg") ) }} {{ $item.Title | plainify }} featured image {{ end }} {{ else }}
{{end}}
{{ with $item.Params.content_meta }} {{ if or .content_type .difficulty }}
{{ with .content_type }} {{ . }} {{ end }} {{ with .difficulty }} {{ i18n "difficulty" }}: {{ . }} {{ end }}
{{ end }} {{ end }} {{ if and $item.Params.tags (gt (len $item.Params.tags) 0) }}
{{ with index ($item.GetTerms "tags") 0 }} {{ .Page.LinkTitle }} {{ end }}
{{ end }}

{{ $item.Title }} {{ if $item.Params.external_link }} {{ partial "functions/get_icon" (dict "name" "arrow-top-right-on-square" "attributes" "style=\"height: 1em;\" class=\"inline-flex h-4 w-4 ml-1 align-text-top\"") }} {{ end }}

{{ (partial "functions/get_summary" $item) | plainify | htmlUnescape | truncate 180 }}

{{ with $item.Params.content_meta.prerequisites }} {{ $max := 2 }} {{ $count := len . }}
{{ i18n "prerequisites" }}: {{ range (first $max .) }} {{ . }} {{ end }} {{ if gt $count $max }} +{{ sub $count $max }} {{ end }}
{{ end }} {{ if $hasMeta }}
{{ if $item.Params.authors }}
{{ $slug := index $item.Params.authors 0 | urlize }} {{ $profile := partial "functions/get_author_profile" $slug }} {{ $avatar := $profile.avatar }}
{{ if $avatar }} {{ $avatar_48 := $avatar.Process "Fill 48x48 Center webp" }} avatar {{ else }}
{{ partial "functions/get_icon" (dict "name" "hero/user" "attributes" "class=\"w-4 h-4 text-gray-500 dark:text-gray-400\"") }}
{{ end }}
{{ $profile.title }}
• {{ end }} {{ if $showDate }} {{ if $isEvent }} {{ else }} {{ end }} {{ end }} {{ if and $showDate $showReadTime }} {{ end }} {{ if $showReadTime }} {{ $content := $item.Content | plainify }} {{ $words := len (split $content " ") }} {{ $readTime := div $words 200 }} {{ if lt $readTime 1 }}{{ $readTime = 1 }}{{ end }} {{ end }}
{{ if $showReadMore }} {{ end }}
{{ end }} {{ if $item.Params.ai_insights }}
{{ i18n "ai_insight" }}: {{ $item.Params.ai_insights }}
{{ end }}