From: Joann Mõndresku Date: Sun, 25 Sep 2022 20:14:04 +0000 (+0300) Subject: paginators v1 X-Git-Url: https://git.based.quest/?a=commitdiff_plain;h=d091db2327ae7f7ba0f7dc57e10d668455ef63f6;p=bquest.git paginators v1 --- diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d45fa5f..badd94c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,8 +1,20 @@ {{ partial "header.html" . -}} +

<-- Back

{{.Site.Title}} – Articles for {{.Title}}

+ +{{ if gt .Paginator.TotalPages 1 }} +

+{{ if .Paginator.HasPrev }}<{{ end }} +{{ range .Paginator.Pagers }} + {{if ne $paginator . }}{{.PageNumber}}{{ else }}{{.PageNumber}}{{ end }} +{{ end }} +{{ if .Paginator.HasNext }}>{{ end }} +

+{{ end }} {{ partial "footer.html" .}} diff --git a/static/bquest.css b/static/bquest.css index f640d12..78cd5f1 100644 --- a/static/bquest.css +++ b/static/bquest.css @@ -1 +1 @@ -body,html{background:#000;color:#fff;max-width:1024px;margin:1em auto;padding:0 0.5em;font-family:monospace;font-size:large;}.cern-blue{color:#397ef6;}a,a:visited{color:#fff;}p{margin:0;padding:0}#post p{margin:12px 0;margin:revert;text-align:justify;}#post a,#post a:visited{color:#00b7ff;}pre code {display:block;padding:1em 1em 1em 1em;overflow-x:auto;}code{border:1px solid #ffb300;border-radius:5px;color:#19ca24;background:#202020;display:inline-block;} +body,html{background:#000;color:#fff;max-width:1024px;margin:1em auto;padding:0 0.5em;font-family:monospace;font-size:large;}.cern-blue{color:#397ef6 !important;}a,a:visited{color:#fff;}p{margin:0;padding:0}#post p{margin:12px 0;margin:revert;text-align:justify;}#post a,#post a:visited{color:#00b7ff;}pre code {display:block;padding:1em 1em 1em 1em;overflow-x:auto;}code{border:1px solid #ffb300;border-radius:5px;color:#19ca24;background:#202020;display:inline-block;}