{{ define "main" }}

{{ .Title }}

{{ $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}} {{ .Content }}
{{ partial "page_footer" . }}
{{ end }}