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