mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-22 14:56:19 +01:00
fbceb4ad5d
Partially fixes: #401 Signed-off-by: Khusika Dhamar Gusti <mail@khusika.com>
41 lines
1.6 KiB
HTML
41 lines
1.6 KiB
HTML
{{- define "content" -}}
|
|
{{- $params := .Scratch.Get "params" -}}
|
|
{{- $profile := .Site.Params.home.profile -}}
|
|
{{- $posts := .Site.Params.home.posts -}}
|
|
|
|
<div class="page home"{{ if ne $posts.enable false }} data-home="posts"{{ end }}>
|
|
{{- /* Profile */ -}}
|
|
{{- if ne $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 $posts.enable false | and .Site.RegularPages -}}
|
|
{{- /* 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 -}}
|
|
{{- with $posts.paginate | default .Site.Params.paginate -}}
|
|
{{- $pages = $.Paginate $pages . -}}
|
|
{{- else -}}
|
|
{{- $pages = .Paginate $pages -}}
|
|
{{- end -}}
|
|
{{- range $pages.Pages -}}
|
|
{{- .Render "summary" -}}
|
|
{{- end -}}
|
|
{{- partial "paginator.html" . -}}
|
|
{{- end -}}
|
|
</div>
|
|
{{- end -}}
|