{{ $title := .title }} {{ $link := .link }} {{ $pages := .pages }} {{ if and (.limit) (not .paginate) }} {{ $pages = first .limit .pages }} {{ end }} {{ $act_section := .context.Section }} {{ $paginator := .pages }} {{ $return_paginator := "" }} {{ if .paginate }} {{ $paginator = .context.Paginate $pages }} {{ $pages = $paginator.Pages }} {{ $return_paginator := $paginator }} {{ end }} {{ $bptiny := "40em" }} {{ $bpsmall := "48em" }} {{ $bpmedium := "64em" }} {{ $bplarge := "85.375em" }} {{ $bpxlarge := "120em" }} {{ $bpxxlarge := "160em" }} {{ if $pages }}
{{ if $title }}

{{ if $link }} {{ end }} {{ $title }} {{ if $link }} ({{ if i18n "all" }}{{ i18n "all"}}{{ else }}{{ "all" }}{{ end }}) {{ end }}

{{ end }} {{ range $pages.ByLastmod.Reverse }} {{ $slug := "" }} {{ with .File }} {{ $slug = anchorize .ContentBaseName }} {{ end }}
{{ $metas := dict "when" .Params.when "price" .Params.price }} {{ $banner := slice }} {{ $image := slice }} {{ $images := slice }} {{ $dir := ""}} {{ with .File }} {{ $dir = .Dir }} {{ end }} {{ if .Resources.GetMatch "banner*" }} {{ $banner = slice (.Resources.GetMatch "banner*") }} {{ end }} {{ if .Resources.ByType "image" }} {{ $image = .Resources.ByType "image" }} {{ end }} {{ $images = complement $banner $image }} {{ $image = (index (complement $banner $image) 0) }} {{ $banner = (index $banner 0) }} {{ if $title }}

{{ else }}

{{ end }} {{ if ne $act_section "about" }} {{ if .Params.events }} {{ index .Params.events 0 }}: {{ else if .Params.recurrent }} {{ if i18n "recurrent"}} {{ i18n "recurrent"}}: {{ else }} {{ "Recurrent"}}: {{ end }} {{ else if .Params.categories }} {{ if in .Params.categories .Site.Params.ownCategory }} {{ if i18n "own_category" }}{{ i18n "own_category" }}{{ else }}From us{{ end -}}: {{ end }} {{ end }} {{ end }} {{ .Title }} {{ if $title }}

{{ else }}{{ end }} {{ with .Resources.GetMatch $banner }} {{ $img := . }} {{ $good_w := "1920"}} {{ $good_h := "550"}} {{ $b := true }} {{ if or (lt (int .Width) $good_w) (gt (int .Width) $good_w) (lt (int .Height) $good_h) (gt (int .Height) $good_h) }}
{{ if lt (int .Width) $good_w }} {{ $b = false }} {{ if eq hugo.Environment "development" }} Width: {{ .Width }}px: too small, must be {{ $good_w -}}px in width
{{ end }} {{ else if gt (int .Width) $good_w }} {{ $b = false }} {{ if eq hugo.Environment "development" }} Width: {{ .Width }}px: too big, must be {{ $good_w -}}px in width
{{ end }} {{ end }} {{ if lt (int .Height) $good_h }} {{ $b = false }} {{ if eq hugo.Environment "development" }} Height: {{ .Height }}px: too small, must be {{ $good_h -}}px in height
{{ end }} {{ else if gt (int .Height) $good_h }} {{ $b = false }} {{ if eq hugo.Environment "development" }} Height: {{ .Height }}px: too big, must be {{ $good_h -}}px in height
{{ end }} {{ end }} {{ if eq hugo.Environment "development" }} {{ if eq $b false }} {{ printf "Please correct content/news/%s/%s" $slug .Name }} {{ end }} {{ end }}
{{ end }} {{ if eq $b true }} {{ $tiny := ($banner.Resize "640x q50") }} {{ $small := ($banner.Resize "768x q50") }} {{ $medium := ($banner.Resize "1024x q50") }} {{ $large := ($banner.Resize "1366x q50") }} Banner Image. {{ end }} {{ else }} {{ if eq hugo.Environment "development" }}
{{ printf "content/%sbanner* missing.." $dir }}
{{ end }} {{ end }} {{ partial "snippets/article_metadata" $metas }}
{{ if .Description }}

{{ .Description }}

{{ else if .Content }} {{ $summary := "" }} {{ if in .RawContent "" }} {{ $tmp := split .RawContent "" }} {{ index $tmp 0 | markdownify }} {{ else }} {{ if hasPrefix .Summary "

" }} {{ .Summary }} {{ else }}

{{ .Summary }}

{{ end }} {{ end }} {{ else if $image }} {{ $i := (.Resources.GetMatch $image) }} {{ $tiny := ($i.Resize "640x q90") }} {{ $small := ($i.Resize "768x q90") }} {{ $medium := ($i.Resize "10240x q90") }} {{ $large := ($i.Resize "1366x q90") }} Banner Image. {{ end }}
{{ if .Truncated }}
{{ if i18n "readmore" }}{{ i18n "readmore" }}{{ else }}{{ "read more" }}{{ end }}..
{{ end }}
{{ end }} {{ if .paginate }} {{ partial "snippets/paginator" (dict "paginator" $paginator) }} {{ end }}
{{ end }}