Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-02-16 21:19:55 +0300
committerDillon <dillonzq@outlook.com>2020-02-16 21:19:55 +0300
commit5a1e0b5d31a378c5cbbae21f0b4a1577c0007a89 (patch)
treea4c232110e1847cc54b2870d65bc4db7e2961955 /layouts/index.html
parentd87af711761d0ea8b2fc173407b45299e3314138 (diff)
feature(config): add config for home profile/posts
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html15
1 files changed, 6 insertions, 9 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 6a60916..a668db1 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,14 +1,16 @@
{{- define "content" -}}
<div class="page home">
- {{- /* Home mode [post] */ -}}
- {{- if eq .Site.Params.home_mode "post" -}}
- {{- /* Profile */ -}}
+ {{- /* Profile */ -}}
+ {{- if .Site.Params.home.profile.enable -}}
{{- partial "home/profile.html" . -}}
+ {{- end -}}
+ {{- /* Posts */ -}}
+ {{- if .Site.Params.home.posts.enable -}}
{{- /* Paginate */ -}}
{{- $paginator := where .Site.RegularPages "Type" "posts" -}}
{{- $paginator = where $paginator "Params.show_in_homepage" "!=" false -}}
- {{- with .Site.Params.home_paginate -}}
+ {{- with .Site.Params.home.posts.paginate -}}
{{- $paginator = $.Paginate $paginator . -}}
{{- else -}}
{{- $paginator = $.Paginate $paginator -}}
@@ -17,11 +19,6 @@
{{- .Render "summary" -}}
{{- end -}}
{{- partial "paginator.html" . -}}
-
- {{- /* Home mode [other] */ -}}
- {{- else -}}
- {{- /* Profile */ -}}
- {{- partial "home/profile.html" . -}}
{{- end -}}
</div>
{{- end -}}