{{ define "main" }} {{ $pub_type_csl := "" }} {{ $pub_type_display := "" }} {{ if .Params.publication_types }} {{ if reflect.IsSlice .Params.publication_types }} {{ $pub_type_csl = index .Params.publication_types 0 }} {{ $pub_type_display = i18n (printf "pub_%s" (strings.Replace $pub_type_csl "-" "_")) | default (strings.Title $pub_type_csl) }} {{ end }} {{ end }}
{{ partial "components/sidebar.html" (dict "context" . "no_sidebar" true) }} {{ partial "components/toc.html" . }}
{{ if .Params.show_breadcrumb }}
{{ partial "components/breadcrumb.html" . }}
{{ end }}

{{- .Title -}}

{{- if .Date | and (not .Params.hide_date) -}} {{- .Date | time.Format (site.Params.locale.date_format | default ":date_long") -}} {{- if .Params.authors }}·{{ end -}} {{- end -}} {{ $taxonomy := "authors" }} {{ range $i, $author_obj := (.GetTerms $taxonomy) }} {{ $author_page := $author_obj.Page }} {{ $avatar := ($author_page.Resources.ByType "image").GetMatch "*avatar*" }} {{- if and $i (not $avatar) }},{{ end -}} {{ with $author_page.Params.website }} {{ end }}
{{ with $avatar }} {{ $avatar = $avatar.Process "Fill 50x50 Center webp" }} {{ $author_page.Title }} {{ end }}
{{ $author_page.Title }}
{{ with $author_page.Params.website }}
{{ end }} {{ end }} {{ if ne .Params.reading_time false }} · {{ .ReadingTime }} {{ i18n "minute_read" }} {{ end }}
{{ partial "page_links_div.html" . }}
{{ $featured := partial "functions/get_featured_image.html" . }} {{/* Featured image layout */}} {{ if and $featured (not .Params.image.preview_only) }} {{/* Fit image within max size. */}} {{ $image := $featured }} {{/* Determine image placement. */}} {{ $placement := .Params.image.placement | default 1 }}{{/* Default to full column width. */}} {{/* Fit image to container's max width */}} {{ $image_container := "" }} {{ if eq $placement 2}} {{ $image_container = "container" }} {{ $image = $featured.Fit "1200x2500" }} {{else if eq $placement 3}} {{ $image_container = "container-fluid" }} {{ $image := $featured.Fit "2560x2560" }} {{else}} {{ $image_container = "article-container" }} {{ $image = $featured.Fit "720x2500" }} {{end}} {{ if ne $image.MediaType.SubType "gif" }}{{ $image = $image.Process "webp" }}{{ end }} {{/* Featured image */}}
{{ with $.Params.image.alt_text }}{{.}}{{ end }} {{ with $.Params.image.caption }}{{ . | markdownify | emojify }}{{ end }}
{{end}} {{/* EVENT / PUBLICATION METADATA */}} {{ if .Params.abstract | or (eq .Type "publication") | or (eq .Type "event") }}
{{ if .Params.abstract }}
{{ i18n "abstract" }}
{{ .Params.abstract | markdownify }}
{{ end }} {{/* If the type is Uncategorized, hide the type. */}} {{ if $pub_type_display }}
{{ i18n "publication_type" }}
{{ $pub_type_display }}
{{ end }} {{ if .Params.publication }}
{{ i18n "publication" }}
{{ .Params.publication | markdownify }}
{{ end }} {{ if eq .Type "event" }}
{{ i18n "date" }}
{{ partial "functions/get_event_dates" . }}
{{ end }} {{ if .Params.event }}
{{ i18n "event" }}
{{ with .Params.event_url }}{{ end }} {{ .Params.event | markdownify }} {{ if .Params.event_url }}{{ end }}
{{ end }} {{ if .Params.location }}
{{ i18n "location" }}

{{ .Params.location | markdownify }}

{{ if .Params.address }}

{{partial "functions/get_address" (dict "root" . "address" .Params.address) }}

{{end}}
{{ end }}
{{ end }}
{{ .Content }}
{{ partial "components/last-edited.html" . }}
{{ .Scratch.Set "invert_pager" true }} {{ partial "page_footer" . }}
{{ end }}