{{- define "main" }} {{- if (and site.Params.profileMode.enabled .IsHome) }} {{- partial "index_profile.html" . }} {{- else }} {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }} {{- $paginator := .Paginate $pages }} {{- if eq $paginator.PageNumber 1 }} {{- partial "home_info.html" . }} {{- partial "thoughts_preview.html" . }} {{- end }} {{- range $index, $page := $paginator.Pages }} {{- $class := "post-entry" }} {{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} {{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} {{- $class = "first-entry" }} {{- end }}
{{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }} {{- partial "cover.html" (dict "cxt" . "IsSingle" false "isHidden" $isHidden) }}

{{- .Title }} {{- if .Draft }} {{- end }}

{{- if (ne (.Param "hideSummary") true) }}

{{ .Description | plainify | htmlUnescape }}

{{- end }} {{- if not (.Param "hideMeta") }} {{- end }}
{{- end }} {{- if gt $paginator.TotalPages 1 }} {{- end }} {{- end }} {{- end }}