{{ partial "htmlhead" . }} {{- $postsFoldername := .Site.Params.Posts.foldername | default "post" }} {{- $postsPageSize := .Site.Params.Posts.pagesize | default 6 }} {{- .Scratch.Set "postsFeaturedPostEnabled" true }} {{- if (or (eq .Site.Params.Posts.featuredpost "false") (eq .Site.Params.Posts.featuredpost false)) }} {{- .Scratch.Set "postsFeaturedPostEnabled" false }} {{- end }} {{- $postsFeaturedPostEnabled := .Scratch.Get "postsFeaturedPostEnabled" }} {{- $posts := where .Data.Pages "Type" $postsFoldername }} {{- if .IsHome }} {{- $posts = where .Site.RegularPages "Type" $postsFoldername }} {{- end }} {{- $firstPost := first 1 $posts }} {{- if and (eq $postsFeaturedPostEnabled true) (gt (len $posts) 1) -}} {{- .Scratch.Set "postsForPaging" (after 1 $posts) }} {{- else }} {{- .Scratch.Set "postsForPaging" $posts }} {{- end -}} {{- $postsForPaging := .Scratch.Get "postsForPaging" -}} {{- $postsPaging := .Paginate $postsForPaging $postsPageSize -}}
{{- if eq $postsPaging.PageNumber 1 -}} {{- partial "intro.html" . -}} {{- end -}} {{- partial "header" . -}} {{- partial "nav" . }}
{{- if (eq $postsFeaturedPostEnabled true) }} {{- partial "posts/featured.html" (dict "firstpost" $firstPost "siteData" (index .Site.Data .Site.Language.Lang)) }} {{- end }} {{- if (not (and (eq (len $posts) 1) (eq $postsFeaturedPostEnabled true))) }} {{- partial "posts/list.html" (dict "posts" $postsPaging "siteData" (index .Site.Data .Site.Language.Lang)) }} {{- end }} {{- $paginator := .Paginator }} {{- $outer := . }} {{- partial "posts/pagination.html" (dict "paginator" $paginator "outer" $outer)}}
{{- partial "footer/index" . }} {{- partial "copyright" . }} {{ i18n "NAV_MENU" . }}
{{- template "_internal/google_analytics.html" . }} {{- partial "scripts/index" . }}