{{ $event := .event }} {{ $layout := .layout | default "list" }} {{ $heading := .heading | default "h2" }} {{ $heading_tag := (dict "open" ((printf "<%s itemprop='name' class='event-title'>" $heading) | safeHTML) "close" ((printf "" $heading) | safeHTML) ) }} {{ $index := .index }} {{ $alternate := .alternate }} {{ $options := .options }} {{ with $event }}
{{- $title := partial "PrepareHTML" .Title -}} {{ if and $options.subtitle .Params.subtitle }}
{{ end }} {{ $heading_tag.open }} {{ $title }} {{ $heading_tag.close }} {{ if and $options.subtitle .Params.subtitle }}

{{ partial "PrepareText" .Params.subtitle }}

{{ end }} {{ $dates := .Params.dates }} {{ if $options.dates }} {{ partial "events/event-schedule" (dict "dates" $dates "layout" $layout )}} {{ end }} {{ if and $dates.status $options.status }}

{{ if eq $dates.status "current"}} {{- i18n "blocks.events.current" -}} {{ else if eq $dates.status "future" }} {{- i18n "blocks.events.future" -}} {{ else if eq $dates.status "archive" }} {{- i18n "blocks.events.archive" -}} {{ end }}

{{ end }} {{ if and $options.summary .Params.summary }}
{{ partial "GetRichSummary" ( dict "summary" .Params.summary "kind" "events" )}} {{ if eq $layout "large" }} {{ end }}
{{ end }} {{ if $options.categories }} {{ partial "commons/categories" ( dict "context" . "kind" "event" )}} {{- end -}}
{{- if and $options.image .Params.image -}} {{- partial "commons/image.html" (dict "image" .Params.image "sizes" site.Params.image_sizes.sections.events.item ) -}} {{- else -}} {{- partial "commons/image-default.html" "events" -}} {{- end -}}
{{ end }}