{{- define "title" -}} {{- .Site.Title -}} {{- if .Site.Params.indexWithSubtitle | and .Site.Params.header.subtitle.name -}} {{- printf " - %v" .Site.Params.header.subtitle.name -}} {{- end -}} {{- end -}} {{- define "content" -}} {{- $params := partial "function/params.html" -}} {{- $profile := .Site.Params.home.profile -}} {{- $posts := .Site.Params.home.posts -}} {{- $pages := slice -}} {{- /* Paginate calculation */ -}} {{- if ne $posts.enable false -}} {{- $pages = .Site.Store.Get "mainSectionPages" -}} {{- if .Site.Params.page.hiddenFromHomePage -}} {{- $pages = where $pages "Params.hiddenfromhomepage" false -}} {{- else -}} {{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}} {{- end -}} {{- with $posts.paginate | default .Site.Params.paginate -}} {{- $pages = $.Paginate $pages . -}} {{- else -}} {{- $pages = .Paginate $pages -}} {{- end -}} {{- end -}}
{{- /* Only show profile and content on first page */ -}} {{- if (not $profile.onlyFirstPage) | or (eq $.Paginator.PageNumber 1) -}} {{- /* Profile */ -}} {{- if ne $profile.enable false -}} {{- partial "home/profile.html" . -}} {{- end -}} {{- /* Content */ -}} {{- if .Content -}}
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
{{- end -}} {{- end -}} {{- /* Paginate rendering */ -}} {{- if ne $posts.enable false -}} {{- range $pages.Pages -}} {{- .Render "summary" -}} {{- end -}} {{- partial "layouts/paginator.html" . -}} {{- end -}}
{{- end -}}