summaryrefslogtreecommitdiff
path: root/layouts/partials/blog_index.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/blog_index.html')
-rw-r--r--layouts/partials/blog_index.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/layouts/partials/blog_index.html b/layouts/partials/blog_index.html
new file mode 100644
index 00000000..81768b7b
--- /dev/null
+++ b/layouts/partials/blog_index.html
@@ -0,0 +1,19 @@
+{{ $paginator := .Paginator 25 }}
+{{ range (.Paginate (where .Site.RegularPages ".Params.category" "intersect" "blog")).Pages }}
+ {{ partial "partials/article_list_full_item.html" . }}
+{{ end }}
+
+<nav class="blog-pages-list">
+ Pages:
+ {{ if $paginator.HasPrev }}
+ [ <a href="{{ $paginator.First.URL}}">previous</a> ]
+ {{ end }}
+
+ {{ range seq $paginator.TotalPages }}
+ <a href="/blog/page/{{ . }}/">{{ . }}</a>
+ {{ end }}
+
+ {{ if $paginator.HasNext }}
+ [ <a href="{{ $paginator.Next.URL}}">Next</a> ]
+ {{ end }}
+</nav>