{{ $item := . }} {{ $microdata_type := "CreativeWork" }} {{ $show_buttons := false }} {{/* Dynamic view adjusts to content type. */}} {{ if eq $item.Type "post" }} {{ $microdata_type = "BlogPosting" }} {{ else if eq $item.Type "talk" }} {{ $microdata_type = "Event" }} {{ $show_buttons = true }} {{ else if eq $item.Type "publication" }} {{ $microdata_type = "ScholarlyArticle" }} {{ $show_buttons = true }} {{ end }} {{/* Get summary. */}} {{ $summary := "" }} {{ if $item.Params.summary }} {{ $summary = $item.Params.summary | markdownify | emojify }} {{ else if .Params.abstract }} {{ $summary = .Params.abstract | markdownify | emojify }} {{ else if $item.Truncated }} {{ $summary = $item.Summary }} {{ else }} {{ $summary = $item.Content }} {{ end }}
{{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }} {{ $anchor := $item.Params.image.focal_point | default "Smart" }} {{ with $resource }} {{ $image := .Fill (printf "918x517 q90 %s" $anchor) }} {{end}}

{{ if eq $item.Type "talk" }} {{ else }} {{ partial "page_metadata" (dict "page" $item "is_list" 1) }} {{ end }} {{ with $summary }}
{{ . }}
{{ end }} {{ if $show_buttons }} {{ end }}