mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 19:06:16 +01:00
34 lines
1.4 KiB
HTML
34 lines
1.4 KiB
HTML
{{- define "content" -}}
|
|
{{- $params := .Scratch.Get "params" -}}
|
|
<div class="page home">
|
|
{{- /* Profile */ -}}
|
|
{{- if ne .Site.Params.home.profile.enable false -}}
|
|
{{- partial "home/profile.html" . -}}
|
|
{{- end -}}
|
|
|
|
{{- /* Content */ -}}
|
|
{{- if .Content -}}
|
|
<div class="single">
|
|
<div class="content" id="content">
|
|
{{- dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
|
|
</div>
|
|
</div>
|
|
{{- end -}}
|
|
|
|
{{- /* Posts */ -}}
|
|
{{- if ne .Site.Params.home.posts.enable false -}}
|
|
{{- /* Paginate */ -}}
|
|
{{- $pages := where .Site.RegularPages "Type" "posts" -}}
|
|
{{- if .Site.Params.page.hiddenFromHomePage -}}
|
|
{{- $pages = where $pages "Params.hiddenfromhomepage" false -}}
|
|
{{- else -}}
|
|
{{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}}
|
|
{{- end -}}
|
|
{{- $pages = .Site.Params.home.posts.paginate | default .Site.Params.paginate | .Paginate $pages -}}
|
|
{{- range $pages.Pages -}}
|
|
{{- .Render "summary" -}}
|
|
{{- end -}}
|
|
{{- partial "paginator.html" . -}}
|
|
{{- end -}}
|
|
</div>
|
|
{{- end -}}
|