diff options
author | mms <michal@sapka.me> | 2023-12-05 23:07:58 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2023-12-05 23:07:58 +0100 |
commit | ac180f2d20bc811b662b55b7b0da62a8a42d7d40 (patch) | |
tree | 5113fd1f0dfd310b5a13f2b478a0997020d836c9 /layouts/partials | |
parent | 1da8a6b4f0983ec7ba45c5dd705feccf69896e58 (diff) |
chore: general tidy yp
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/article_list_full_item.html | 13 | ||||
-rw-r--r-- | layouts/partials/back_nav.html | 2 | ||||
-rw-r--r-- | layouts/partials/blog_index.html | 19 |
3 files changed, 33 insertions, 1 deletions
diff --git a/layouts/partials/article_list_full_item.html b/layouts/partials/article_list_full_item.html new file mode 100644 index 0000000..31ab76f --- /dev/null +++ b/layouts/partials/article_list_full_item.html @@ -0,0 +1,13 @@ +<article class="blog-post-item"> + <h2> <a href="{{ .Page.Permalink }}"> {{ .Title }}</a></h2> + + <time datetime="{{.PublishDate.Format "2006-01-02" }}"> + {{ .PublishDate.Format "January 2, 2006" }} + </time> + + <nav> + <a href="{{ .Page.Permalink }}">[ Permalink ]</a> + </nav> + + {{ .Page.Content }} +</article> diff --git a/layouts/partials/back_nav.html b/layouts/partials/back_nav.html index 9f7620f..6358a10 100644 --- a/layouts/partials/back_nav.html +++ b/layouts/partials/back_nav.html @@ -9,7 +9,7 @@ {{ else if in .Page.Params.Category "bsd" }} <a href="/bsd/">← Back to Daemonic BSD Site</a> {{ else if in .Page.Params.Category "blog" }} - <a href="/bsd/">← Back to Michal's blog</a> + <a href="/blog/">← Back to Michal's blog</a> {{ end }} {{ if not .Page.Params.hardback }} diff --git a/layouts/partials/blog_index.html b/layouts/partials/blog_index.html new file mode 100644 index 0000000..81768b7 --- /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> |