2020-01-31 11:46:28 +01:00
|
|
|
{{- define "content" -}}
|
2020-04-22 11:50:30 +02:00
|
|
|
{{- $params := .Scratch.Get "params" -}}
|
2020-05-12 18:45:19 +02:00
|
|
|
{{- $profile := .Site.Params.home.profile -}}
|
|
|
|
{{- $posts := .Site.Params.home.posts -}}
|
|
|
|
|
|
|
|
<div class="page home"{{ if ne $posts.enable false }} posts{{ end }}>
|
2020-02-16 19:19:55 +01:00
|
|
|
{{- /* Profile */ -}}
|
2020-05-12 18:45:19 +02:00
|
|
|
{{- if ne $profile.enable false -}}
|
2019-08-18 19:36:52 +02:00
|
|
|
{{- partial "home/profile.html" . -}}
|
2020-02-16 19:19:55 +01:00
|
|
|
{{- end -}}
|
2019-08-11 19:36:19 +02:00
|
|
|
|
2020-04-22 11:50:30 +02:00
|
|
|
{{- /* 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 -}}
|
|
|
|
|
2020-02-16 19:19:55 +01:00
|
|
|
{{- /* Posts */ -}}
|
2020-05-12 18:45:19 +02:00
|
|
|
{{- if ne $posts.enable false | and .Site.RegularPages -}}
|
2020-02-03 11:38:10 +01:00
|
|
|
{{- /* Paginate */ -}}
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- $pages := where .Site.RegularPages "Type" "posts" -}}
|
|
|
|
{{- if .Site.Params.page.hiddenFromHomePage -}}
|
|
|
|
{{- $pages = where $pages "Params.hiddenfromhomepage" false -}}
|
2020-02-17 05:44:04 +01:00
|
|
|
{{- else -}}
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- $pages = where $pages "Params.hiddenfromhomepage" "!=" true -}}
|
2020-02-17 05:44:04 +01:00
|
|
|
{{- end -}}
|
2020-05-12 18:45:19 +02:00
|
|
|
{{- with $posts.paginate | default .Site.Params.paginate -}}
|
2020-04-26 17:00:29 +02:00
|
|
|
{{- $pages = $.Paginate $pages . -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{- $pages = .Paginate $pages -}}
|
|
|
|
{{- end -}}
|
2020-04-21 16:55:06 +02:00
|
|
|
{{- range $pages.Pages -}}
|
2020-01-31 11:46:28 +01:00
|
|
|
{{- .Render "summary" -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- partial "paginator.html" . -}}
|
2020-02-13 18:30:33 +01:00
|
|
|
{{- end -}}
|
|
|
|
</div>
|
2020-02-06 17:10:00 +01:00
|
|
|
{{- end -}}
|