LoveIt/layouts/index.html
2020-03-03 21:57:30 +08:00

28 lines
1.1 KiB
HTML

{{- define "content" -}}
<div class="page home">
{{- /* Profile */ -}}
{{- if .Site.Params.home.profile.enable -}}
{{- partial "home/profile.html" . -}}
{{- end -}}
{{- /* Posts */ -}}
{{- if ne .Site.Params.home.posts.enable false -}}
{{- /* Paginate */ -}}
{{- $paginator := where .Site.RegularPages "Type" "posts" -}}
{{- if ne .Site.Params.home.posts.mode.defaultHiddenFromHomePage false -}}
{{- $paginator = where $paginator "Params.hiddenfromhomepage" "!=" true -}}
{{- else -}}
{{- $paginator = where $paginator "Params.hiddenfromhomepage" false -}}
{{- end -}}
{{- with .Site.Params.home.posts.paginate -}}
{{- $paginator = $.Paginate $paginator . -}}
{{- else -}}
{{- $paginator = $.Paginate $paginator -}}
{{- end -}}
{{- range $paginator.Pages -}}
{{- .Render "summary" -}}
{{- end -}}
{{- partial "paginator.html" . -}}
{{- end -}}
</div>
{{- end -}}