{{/* Hugo Blox Slides Gallery View - Optimized for slide deck presentations */}} {{/* Features: 16:9 aspect ratio, play button overlay, slide count, tags, featured badge */}} {{ $item := .item }} {{ $link := $item.RelPermalink }} {{ $html_format := $item.OutputFormats.Get "HTML" }} {{ if not $html_format }} {{ $html_format = $item.OutputFormats.Get "html" }} {{ end }} {{ with $html_format }} {{ $link = .RelPermalink }} {{ end }} {{ $present_link := $link }} {{ $present_format := $item.OutputFormats.Get "present" }} {{ if not $present_format }} {{ $present_format = $item.OutputFormats.Get "Present" }} {{ end }} {{ with $present_format }} {{ $present_link = .RelPermalink }} {{ end }} {{ $resource := partial "functions/get_featured_image.html" $item }} {{ $index := .index }} {{ $featured_label := i18n "featured" | default "Featured" }} {{ $details_label := i18n "details" | default "Details" }} {{ $present_label := i18n "present_slides" | default "Present" }} {{ $present_fullscreen_label := i18n "present_fullscreen" | default "Present (fullscreen)" }} {{ $slides_label := i18n "slides" | default "Slides" }} {{/* Check if featured/pinned */}} {{ $isFeatured := or $item.Params.featured $item.Params.pinned }} {{/* Calculate slide count by counting "---" separators in content */}} {{ $content := $item.RawContent }} {{ $slideCount := 1 }} {{ $separators := findRE "(?m)^---$" $content }} {{ if $separators }} {{ $slideCount = add (len $separators) 1 }} {{/* Subtract 1 for front matter separator if content starts with --- */}} {{ if hasPrefix $content "---" }} {{ $slideCount = sub $slideCount 1 }} {{ end }} {{ end }} {{/* Get summary - use description from front matter or truncate content */}} {{ $summary := $item.Description | default $item.Summary | default "" }} {{ $summary = $summary | plainify | truncate 160 }}
{{/* Featured Badge */}} {{ if $isFeatured }}
{{ $featured_label }}
{{ end }} {{/* Top award (top-right corner) */}} {{ with $item.Params.awards }} {{ partial "components/award_badge.html" (dict "award" (index . 0) "page" $item "variant" "card-corner") }} {{ end }} {{/* Slide Preview Image - 16:9 aspect ratio */}} {{ with $resource }} {{/* reflect.IsImageResourceProcessable → false for SVG; GIF skipped to preserve animation */}} {{ $canProcess := and (reflect.IsImageResourceProcessable .) (ne .MediaType.SubType "gif") }} {{ if not $canProcess }} {{ $item.Title | plainify }} {{ else }} {{ $image := .Fill "800x450 Center" }} {{ $responsive := partial "functions/process_responsive_image.html" (dict "image" $image "mode" "responsive" "sizes" (slice 400 600 800) "formats" (slice "avif" "webp" "jpg") ) }} {{ $item.Title | plainify }} {{ end }} {{ else }} {{/* Fallback: Decorative gradient with slide icon - smaller, cleaner */}}
{{ end }} {{/* Play button overlay on hover */}}
{{/* Slide count badge */}} {{ if gt $slideCount 1 }}
{{ $slideCount }} {{ $slides_label | lower }}
{{ end }}
{{/* Content Section */}}
{{/* Tags */}} {{ if $item.Params.tags }}
{{ range first 3 $item.Params.tags }} {{ . }} {{ end }} {{ if gt (len $item.Params.tags) 3 }} +{{ sub (len $item.Params.tags) 3 }} {{ end }}
{{ end }} {{ $authors := slice }} {{ with $item.Params.authors }} {{ if reflect.IsSlice . }} {{ $authors = . }} {{ else }} {{ $authors = slice . }} {{ end }} {{ end }} {{ if gt (len $authors) 0 }} {{ $author := index $authors 0 }} {{ $profile := partial "functions/get_author_profile" $author }} {{ $avatar := $profile.avatar }} {{ $authorName := $author }} {{ if $profile.has_data }} {{ $authorName = $profile.title }} {{ end }}
{{ if $avatar }} {{ $avatar_48 := $avatar.Process "Fill 48x48 Center webp" }} {{ $authorName }} {{ else }}
{{ partial "functions/get_icon" (dict "name" "hero/user" "attributes" "class=\"w-4 h-4 text-zinc-500 dark:text-zinc-400\"") }}
{{ end }}
{{ $authorName }}
{{ end }} {{/* Title */}}

{{ $item.Title }}

{{/* Summary */}}

{{ if $summary }}{{ $summary }}{{ else }} {{ end }}

{{/* Footer: Venue, Year, Details + Present Links */}}
{{ with $item.Params.venue }} {{ . }} · {{ end }}