From c03c44ff2d179b1f5a319824fb116c13a59da7bd Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Sat, 2 Oct 2021 19:26:33 -0500 Subject: [PATCH] Support pagination Fixes #12 --- assets/css/bobastyle.css | 32 ++++++++++++++++++++++++++++++++ layouts/_default/list.html | 6 +++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index d6ec363..2d9e075 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -96,3 +96,35 @@ ul.breadcrumb li+li:before { ul.breadcrumb li.active a { color: inherit; } + +/* Pagination */ +.pagination { + list-style: none; + text-align: center; +} + +.page-item { + display: inline; +} + +.page-link { + padding: 8px 16px; + border-radius: 5px; + color: lightgray; +} + +.page-item.active .page-link { + background-color: #163b64; + color: inherit; +} + +.page-item.active .page-link:hover { + background-color: #2b72c0; + color: white; +} + +.page-link:hover { + background-color: #444; + color: white; + text-decoration: none; +} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 010fad5..7aead0a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -8,7 +8,7 @@

{{ .Title | markdownify }}

{{ end }} -{{ range .Pages }} +{{ range .Paginator.Pages }}

{{ .Title | markdownify }} @@ -53,4 +53,8 @@

{{ end }} + + {{ end }}