{{- define "main" }} {{- if (and .Site.Params.profileMode.enabled .IsHome) }} {{- partial "index_profile.html" . }} {{- else }} {{/* if not profileMode */}} {{- if not .IsHome | and .Title }} {{- 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" }} {{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }} {{- if .Site.Params.homeInfoParams | or .Site.Params.disableSpecial1stPost}} {{- partial "home_info.html" . }} {{- else}} {{- $class = "first-entry" }} {{- end }} {{- else if $term }} {{- $class = "post-entry tag-entry" }} {{- end }}
{{- if .Params.cover.image }}
{{- if (ne .Params.cover.relative true) }} {{ .Params.cover.alt | plainify }} {{- else}} {{ .Params.cover.alt | plainify }} {{- end}}
{{- end }}

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

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

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

{{- end }}
{{- end }} {{- if gt $paginator.TotalPages 1 }} {{- end }} {{end}}{{/* end profileMode */}} {{- end }}{{- /* end main */ -}}