summaryrefslogtreecommitdiff
path: root/layouts/_default/index.html
diff options
context:
space:
mode:
authorMichał M. Sapka <michal@sapka.me>2023-02-24 21:23:37 +0100
committerMichał M. Sapka <michal@sapka.me>2023-02-25 00:21:16 +0100
commitba675a3bf24c1a2fc4afd37caaaefb8b9f80a18c (patch)
tree9a789440a1698f286387952c1d893ed823f5471a /layouts/_default/index.html
parentde97bdfd07f43e1e394fcd310aeca277e043500b (diff)
feat: prelimiary work on new layout
Diffstat (limited to 'layouts/_default/index.html')
-rw-r--r--layouts/_default/index.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/layouts/_default/index.html b/layouts/_default/index.html
new file mode 100644
index 0000000..3260a96
--- /dev/null
+++ b/layouts/_default/index.html
@@ -0,0 +1,14 @@
+{{ define "main" }}
+ {{ $paginator := .Paginate (where site.RegularPages "Type" "!=" "special")}}
+ {{ range $paginator.Pages }}
+ <article class="list">
+ {{ partial "partials/full_post.html" . }}
+ </article>
+ {{ end }}
+
+ <nav id="pagination">
+ <ul>
+ {{ if .Paginator.HasPrev }}<li id="page-previous"><a href="{{ .Paginator.Prev.URL }}">← Newer</a></li>{{ end }}<li id="page-number"><span>Page {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</span></li>{{ if .Paginator.HasNext }}<li id="page-next"><a href="{{ .Paginator.Next.URL }}">Older →</a></li>{{ end }}
+ </ul>
+ </nav>
+{{ end }}