From 5286d164daef4770175bbc05c39768478749edcd Mon Sep 17 00:00:00 2001 From: Myles Sappington Date: Thu, 14 May 2020 14:01:28 -0400 Subject: [PATCH] Added pages for list sites --- layouts/_default/list.html | 5 +++-- layouts/partials/pagination.html | 32 ++++++++++++++++++++++++++++++++ static/css/style.css | 13 +++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 layouts/partials/pagination.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9797c06..87a3427 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,7 +1,7 @@ {{ define "main" }}
{{.Section}} - {{range .Pages}} + {{ range $index, $element := .Paginator.Pages }}
{{ .Title }} {{$page := .}} @@ -21,4 +21,5 @@
{{end}}
-{{end}} \ No newline at end of file + {{ partial "pagination.html" $ }} +{{end}} diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..65e6c92 --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,32 @@ +{{ with $.Paginator }} +{{ if gt .TotalPages 1 }} + +{{ end }} +{{ end }} diff --git a/static/css/style.css b/static/css/style.css index 0fc9a65..9ca7dc8 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -283,6 +283,19 @@ blockquote { padding-top: 30px; border-top: 1px solid #3D3D3D; } + +ul.pagination { + display: flex; + flex-direction: row; + justify-content: space-around; + align-items: center; + list-style-type: none; + font-size: 30px; + margin-top: 50px; + padding-top: 30px; + border-top: 1px solid #3D3D3D; +} + .nav-top:hover{ text-decoration: none; }