{{ $item := . }} {{ $microdata_type := "CreativeWork" }} {{ $icon := "fa-file-alt" }} {{ $show_authors := false }} {{ $show_buttons := false }} {{/* Dynamic view adjusts to content type. */}} {{ if eq $item.Type "post" }} {{ $microdata_type = "BlogPosting" }} {{ $icon = "fa-newspaper" }} {{ else if eq $item.Type "talk" }} {{ $microdata_type = "Event" }} {{ $icon = "fa-calendar-alt" }} {{ else if eq $item.Type "publication" }} {{ $microdata_type = "ScholarlyArticle" }} {{ $show_authors = true }} {{ $show_buttons = true }} {{ end }}
{{ if eq $item.Type "talk" }}
{{ $date := $item.Date }} {{ (time $date).Format site.Params.date_format }} {{ if not $item.Params.all_day }} {{ (time $date).Format (site.Params.time_format | default "3:04 PM") }} {{ with $item.Params.date_end }} — {{ (time .).Format (site.Params.time_format | default "3:04 PM") }} {{ end }} {{ end }} {{ with $item.Params.location }} {{ . }} {{ end }}
{{ end }} {{ if and $show_authors $item.Params.authors }} {{ end }} {{ if $show_buttons }} {{ end }}