{{- define "main" }} {{- if (and .Site.Params.profileMode.enabled .IsHome) }} {{- partial "index_profile.html" . }} {{- else }} {{/* if not profileMode */}} {{- if not .IsHome | and .Title }} {{- end }} {{- if and .IsHome .Site.Params.homeInfoParams (eq .Paginator.PageNumber 1) }} {{- partial "home_info.html" . }} {{- end }} {{- $pages := union .RegularPages .Sections }} {{- if .IsHome }} {{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} {{- end}} {{ $paginator := .Paginate $pages }} {{ $term := .Data.Term}} {{- 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" }} {{- else if $term }} {{- $class = "post-entry tag-entry" }} {{- end }}
{{- $isHidden := (.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInList)}} {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}

{{ .Title }} {{- if .Draft }}
  [draft]
{{- end }}

{{- if (ne .Site.Params.hideSummary true)}}

{{ .Summary | plainify | htmlUnescape }}...

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