{{ define "main" }} {{ .Scratch.Set "skipSeeAlso" true }} {{ partial "primary_top.html" . }} {{ if not .Params.skip_list }}

{{ .Description }}

{{ end }} {{ if .Params.list_below }} {{ .Content }} {{ end }} {{ if not .Params.skip_list }}
{{ $pages := (where .Site.Pages "Section" .Section) }} {{ if .Params.list_by_publishdate }} {{ $pages = sort $pages ".Params.publishdate" "desc" }} {{ end }} {{ $parent := .Page }} {{ $parentDir := (path.Dir .Page.File.Dir) }} {{ if $parent.Params.simple_list }} {{ else }} {{ range $pages }} {{ $pageLocation := (path.Dir (path.Dir .File.Dir)) }} {{ if and (eq $parentDir $pageLocation) (not .Params.draft) }} {{- $info := "" -}} {{ if or .Params.attribution (gt .Page.ReadingTime 1) }} {{- if .Params.attribution -}} {{- $info = printf "%s %s" (i18n "page_attribution") .Params.attribution -}} {{- end -}} {{- if gt .Page.ReadingTime 1 -}} {{- if gt (len $info) 0 -}} {{- $info = printf "%s\n" $info -}} {{- end -}} {{- $info = printf "%s%s" $info (printf (i18n "page_reading_time") .Page.ReadingTime) -}} {{- end -}} {{ end }}
{{- .Title -}}
{{- if ne .PublishDate.Year 0001 -}} {{- printf "%s" (.PublishDate.Format (i18n "page_publish_date_format")) -}} {{- end -}}

{{ .Description }}

{{ end }} {{ end }} {{ end }}
{{ end }} {{ if not .Params.list_below }} {{ .Content }} {{ end }} {{ partial "primary_bottom.html" . }} {{ end }}