summaryrefslogtreecommitdiff
path: root/themes/24-unification/layouts/_default/list.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/24-unification/layouts/_default/list.html')
-rw-r--r--themes/24-unification/layouts/_default/list.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/themes/24-unification/layouts/_default/list.html b/themes/24-unification/layouts/_default/list.html
new file mode 100644
index 0000000..58cb880
--- /dev/null
+++ b/themes/24-unification/layouts/_default/list.html
@@ -0,0 +1,38 @@
+{{ define "main" }}
+
+{{if .Page.Content}}
+<article>
+ {{ .Page.Content }}
+ </article>
+{{ else }}
+{{ $paginator := .Paginate .Site.RegularPages.ByDate.Reverse 10 }}
+
+{{ range $paginator.Pages }}
+{{ if eq .Section "blog" }}
+{{ partial "partials/blog/full-post.html" . }}
+{{ else }}
+{{ partial "partials/blog/cross-site-post.html" . }}
+{{ end }}
+{{ end }}
+
+<nav class="blog-pages-list">
+ Pages:
+ {{ if $paginator.HasPrev }}
+ <span>[ <a href="{{ $paginator.Prev.URL}}">previous</a> ]</span>
+ {{ end }}
+
+ {{ range seq $paginator.TotalPages }}
+ {{ if eq . $paginator.PageNumber }}
+ <span class="current"> {{. }} </span>
+ {{ else }}
+ <a href="/blog/page/{{ . }}/">{{ . }}</a>
+ {{ end }}
+ {{ end }}
+
+ {{ if $paginator.HasNext }}
+ <span>[ <a href="{{ $paginator.Next.URL}}">Next</a> ]</span>
+ {{ end }}
+</nav>
+
+{{end}}
+{{end}}