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

github.com/kritoke/darksimplicity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew <matthew.rhone@outlook.com>2018-07-29 23:22:41 +0300
committerMatthew <matthew.rhone@outlook.com>2018-07-29 23:22:41 +0300
commit4bda260e69331b681c501fe7081c9888df10e9b3 (patch)
tree665e05a72e458e3ef885eb3d5d25a4b8962cf289 /layouts
parente5b6e234220a2c896a733daab2c0ae570fd652e4 (diff)
Make posts and post content types render properly.v0.3.2
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html6
-rw-r--r--layouts/index.html3
2 files changed, 4 insertions, 5 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index eb16c30..b285b02 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,6 +1,6 @@
{{ partial "header.html" . }}
-{{ range (.Paginator 5).Pages }}{{ if eq .Type "post"}}
-<div class="empty">&nbsp;</div>
+{{ $paginator := .Paginate ( where .Data.Pages "Type" "in" (or "posts" "post")) 5 }}
+{{ range $paginator.Pages }}<div class="empty">&nbsp;</div>
<div class="post-title">
<a class="post-title-link" href="{{ .Permalink }}">{{ .Title }}</a>
</div>{{ if isset .Params "tags" }}
@@ -8,4 +8,4 @@
{{ range .Params.tags }}<a class="tag-link" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }} </a>{{ end }}
</div>
<div class="content-tags"><p>{{.Summary}}</p></div>{{ else }}
- <div class="content-full"><p>{{.Summary}}</p></div> {{ end }}{{ end }}{{ end }}{{ partial "pagination.html" . }}{{ partial "footer.html" . }}
+ <div class="content-full"><p>{{.Summary}}</p></div> {{ end }}{{ end }}{{ partial "pagination.html" . }}{{ partial "footer.html" . }}
diff --git a/layouts/index.html b/layouts/index.html
index a81f507..b7e619a 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,5 @@
-
{{ partial "header.html" . }}
-{{ $paginator := .Paginate (where .Data.Pages "Type" "post") 5 }}
+{{ $paginator := .Paginate ( where .Data.Pages "Type" "in" (or "posts" "post")) 5 }}
{{ range $paginator.Pages }}
<div class="post-title">
<a class="post-title-link" href="{{ .Permalink }}">{{ .Title }}</a>