{{ $title := .Title }} {{ $title = singularize $title }} {{ $title = i18n $title }} {{ if not $title }} {{ $title = .Title }} {{ end }} {{ $good_w := "1920"}} {{ $good_h := "850"}} {{ $what := "none" }} {{ $img := "none" }} {{ if eq .Kind "home" }} {{ $what = "home" }} {{ else if eq .Kind "term" }} {{ $what = printf "term/%s" (anchorize .Title) }} {{ else if eq .Kind "taxonomy" }} {{ $what = .Data.Singular }} {{ else }} {{ with .File }} {{ $what = .File.ContentBaseName }} {{ end }} {{ end }} {{ $title_class := safeCSS "title" }} {{ $css := safeCSS "b" }} {{ if .IsHome }} {{ $css = safeCSS "b_index" }} {{ $title_class = safeCSS "title_index" }} {{ end }} {{ $banner := string (printf "/images/banner/%s*" $what) }} {{ if resources.GetMatch $banner }} {{ $img = resources.GetMatch $banner }} {{ end }} {{ $single := false }} {{ if and (in .File "news/") (not (in .File "_index"))}} {{ $single = true }} {{ end }} {{ $b := true }} {{ $slug := "" }} {{ with .File }} {{ $slug = anchorize .ContentBaseName }} {{ end }} {{ if and (ne $img "none") (ne .Params.banner false) }}
{{ else if and (.Resources.Match "banner*") (ne .Params.banner false) }} {{ $img = .Resources.GetMatch "banner*" }} {{ else if and (.Resources.ByType "image") (ne .Params.banner false) (not true) }} {{ $img = index (.Resources.ByType "image") 0 }} {{ else }}