From 72400a4ce1bd81ee030b0f19aa630ce9bc778de0 Mon Sep 17 00:00:00 2001 From: AucT Date: Wed, 25 Sep 2024 12:31:13 +0300 Subject: [PATCH 1/7] add bootstrap pagination big --- postcss.config.js | 3 + themes/beaver/assets/css/pagination.css | 73 ++++++ themes/beaver/assets/css/style.css | 43 ---- themes/beaver/layouts/_default/list.html | 1 + themes/beaver/layouts/blog/list.html | 1 + .../beaver/layouts/partials/pagination.html | 223 ++++++++++++------ 6 files changed, 232 insertions(+), 112 deletions(-) create mode 100644 themes/beaver/assets/css/pagination.css diff --git a/postcss.config.js b/postcss.config.js index e586857f7..f4a8b6aba 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -29,6 +29,9 @@ const purgecss = require("@fullhuman/postcss-purgecss")({ // pp google form // /^pp-gf/, "fl-button", "pp-button", + ".pagination", + ".page-link", + ".page-item", // sdb "jt-active", ], diff --git a/themes/beaver/assets/css/pagination.css b/themes/beaver/assets/css/pagination.css new file mode 100644 index 000000000..eea2b373c --- /dev/null +++ b/themes/beaver/assets/css/pagination.css @@ -0,0 +1,73 @@ +/* +pagination +*/ + +.pagination { + display: flex; + padding-left: 0; + list-style: none; + margin-top: 5rem; +} + +.page-link { + position: relative; + display: block; + padding: 0.5rem 1rem; /* --bs-pagination-padding-y and --bs-pagination-padding-x */ + font-size: 1.25rem; /* --bs-pagination-font-size */ + color: #0d6efd; /* --bs-link-color */ + text-decoration: none; + background-color: #fff; /* --bs-body-bg */ + border: 1px solid #dee2e6; /* --bs-border-color */ + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media (prefers-reduced-motion: reduce) { + .page-link { + transition: none; + } +} + + +.page-link:hover { + z-index: 2; + color: #0a58ca; /* --bs-link-hover-color */ + background-color: #f8f9fa; /* --bs-tertiary-bg */ + border-color: #dee2e6; /* --bs-border-color */ +} + +.page-link:focus { + z-index: 3; + color: #0a58ca; /* --bs-link-hover-color */ + + background-color: #e9ecef; /* --bs-secondary-bg */ + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* --bs-pagination-focus-box-shadow */ +} + +.page-link.active, .active > .page-link { + z-index: 3; + color: #fff; /* --bs-pagination-active-color */ + background-color: #0d6efd; /* --bs-pagination-active-bg */ + border-color: #0d6efd; /* --bs-pagination-active-border-color */ +} + +.page-link.disabled, .disabled > .page-link { + color: rgba(33, 37, 41, 0.75); /* --bs-secondary-color */ + pointer-events: none; + background-color: #e9ecef; /* --bs-secondary-bg */ + border-color: #dee2e6; /* --bs-border-color */ +} + +.page-item:not(:first-child) .page-link { + margin-left: calc(1px * -1); +} + +.page-item:first-child .page-link { + border-top-left-radius: 0.5rem; + border-bottom-left-radius: 0.5rem; +} + +.page-item:last-child .page-link { + border-top-right-radius: 0.5rem; + border-bottom-right-radius: 0.5rem; +} \ No newline at end of file diff --git a/themes/beaver/assets/css/style.css b/themes/beaver/assets/css/style.css index 32f90b305..747a10be4 100644 --- a/themes/beaver/assets/css/style.css +++ b/themes/beaver/assets/css/style.css @@ -128,50 +128,7 @@ Appearance > Theme Settings > Code or create a child theme. text-decoration: none; } -/*Pagination*/ -.pagination { - list-style: none; - padding: 100px 0 30px; - margin: 0; - text-align: center; - font-size: 0; - line-height: 0; -} - -.pagination .page-item { - display: inline-block; - vertical-align: middle; -} - -.pagination .page-link { - display: block; - font-size: 16px; - line-height: 20px; - padding: 10px 16px; - text-decoration: none; - color: rgb(55, 65, 81); - border-color: rgb(209, 213, 219); - border-style: solid; - border-width: 1px 1px 1px 0; -} -.pagination .page-link:hover { - background-color: rgb(243 244 246); -} - -.pagination .page-item:first-child .page-link { - border-width: 1px; - border-radius: 8px 0 0 8px; -} - -.pagination .page-item:last-child .page-link { - border-radius: 0 8px 8px 0; -} - -.pagination .page-item.active .page-link { - color: rgb(28, 100, 242); - background-color: rgb(235, 245, 255); -} input[type=submit]:disabled { opacity: 0.25 diff --git a/themes/beaver/layouts/_default/list.html b/themes/beaver/layouts/_default/list.html index 795c0b6e3..4abcf930f 100644 --- a/themes/beaver/layouts/_default/list.html +++ b/themes/beaver/layouts/_default/list.html @@ -7,6 +7,7 @@ (resources.Get "css/bf72bba397177a0376baed325bffdc75-layout-bundle.css") (resources.Get "css/skin-65eda28877e04.css") (resources.Get "css/single-post.css") +(resources.Get "css/pagination.css") | resources.Concat "css/blog.css" | postCSS | minify | fingerprint | resources.PostProcess}} diff --git a/themes/beaver/layouts/blog/list.html b/themes/beaver/layouts/blog/list.html index 795c0b6e3..4abcf930f 100644 --- a/themes/beaver/layouts/blog/list.html +++ b/themes/beaver/layouts/blog/list.html @@ -7,6 +7,7 @@ (resources.Get "css/bf72bba397177a0376baed325bffdc75-layout-bundle.css") (resources.Get "css/skin-65eda28877e04.css") (resources.Get "css/single-post.css") +(resources.Get "css/pagination.css") | resources.Concat "css/blog.css" | postCSS | minify | fingerprint | resources.PostProcess}} diff --git a/themes/beaver/layouts/partials/pagination.html b/themes/beaver/layouts/partials/pagination.html index ad39e23e0..c99eb94bb 100644 --- a/themes/beaver/layouts/partials/pagination.html +++ b/themes/beaver/layouts/partials/pagination.html @@ -1,69 +1,154 @@ -{{ $paginator := $.Paginator }} - -{{ $adjacent_links := 1 }} - -{{ $max_links := (add (mul $adjacent_links 2) 1) }} - -{{ $lower_limit := (add $adjacent_links 1) }} - -{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }} - -{{ if gt $paginator.TotalPages 1 }} - -{{ end }} +{{- $validFormats := slice "default" "terse" }} + +{{- $msg1 := "When passing a map to the internal pagination template, one of the elements must be named 'page', and it must be set to the context of the current page." }} +{{- $msg2 := "The 'format' specified in the map passed to the internal pagination template is invalid. Valid choices are: %s." }} + +{{- $page := . }} +{{- $format := "default" }} + +{{- if reflect.IsMap . }} +{{- with .page }} +{{- $page = . }} +{{- else }} +{{- errorf $msg1 }} +{{- end }} +{{- with .format }} +{{- $format = lower . }} +{{- end }} +{{- end }} + +{{- if in $validFormats $format }} +{{- if gt $page.Paginator.TotalPages 1 }} + +{{- end }} +{{- else }} +{{- errorf $msg2 (delimit $validFormats ", ") }} +{{- end -}} + +{{/* Format: default +{{/* --------------------------------------------------------------------- */}} +{{- define "partials/inline/pagination/default" }} +{{- with .Paginator }} +{{- $currentPageNumber := .PageNumber }} + +{{- with .First }} +{{- if ne $currentPageNumber .PageNumber }} +
  • + +
  • +{{- else }} +
  • + +
  • +{{- end }} +{{- end }} + +{{- with .Prev }} +
  • + +
  • +{{- else }} +
  • + +
  • +{{- end }} + +{{- $slots := 3 }} +{{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }} +{{- $end := math.Min .TotalPages (sub (add $start $slots) 1) }} +{{- if lt (add (sub $end $start) 1) $slots }} +{{- $start = math.Max 1 (add (sub $end $slots) 1) }} +{{- end }} + +{{- range $k := seq $start $end }} +{{- if eq $.Paginator.PageNumber $k }} +
  • + {{ $k }} +
  • +{{- else }} +
  • + {{ $k }} +
  • +{{- end }} +{{- end }} + +{{- with .Next }} +
  • + +
  • +{{- else }} +
  • + +
  • +{{- end }} + +{{- with .Last }} +{{- if ne $currentPageNumber .PageNumber }} +
  • + +
  • +{{- else }} +
  • + +
  • +{{- end }} +{{- end }} +{{- end }} +{{- end -}} + +{{/* Format: terse +{{/* --------------------------------------------------------------------- */}} +{{- define "partials/inline/pagination/terse" }} +{{- with .Paginator }} +{{- $currentPageNumber := .PageNumber }} + +{{- with .First }} +{{- if ne $currentPageNumber .PageNumber }} +
  • + +
  • +{{- end }} +{{- end }} + +{{- with .Prev }} +
  • + +
  • +{{- end }} + +{{- $slots := 3 }} +{{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }} +{{- $end := math.Min .TotalPages (sub (add $start $slots) 1) }} +{{- if lt (add (sub $end $start) 1) $slots }} +{{- $start = math.Max 1 (add (sub $end $slots) 1) }} +{{- end }} + +{{- range $k := seq $start $end }} +{{- if eq $.Paginator.PageNumber $k }} +
  • + {{ $k }} +
  • +{{- else }} +
  • + {{ $k }} +
  • +{{- end }} +{{- end }} + +{{- with .Next }} +
  • + +
  • +{{- end }} + +{{- with .Last }} +{{- if ne $currentPageNumber .PageNumber }} +
  • + +
  • +{{- end }} +{{- end }} +{{- end }} +{{- end -}} From 761f0366614bee9fe3114f9bf07b340b38e4103f Mon Sep 17 00:00:00 2001 From: AucT Date: Wed, 25 Sep 2024 12:55:05 +0300 Subject: [PATCH 2/7] use minimalistic pagination --- themes/beaver/assets/css/pagination.css | 4 ++ themes/beaver/layouts/_default/list.html | 4 +- themes/beaver/layouts/blog/list.html | 4 +- .../beaver/layouts/partials/pagination.html | 40 +++++++++---------- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/themes/beaver/assets/css/pagination.css b/themes/beaver/assets/css/pagination.css index eea2b373c..adfb30aec 100644 --- a/themes/beaver/assets/css/pagination.css +++ b/themes/beaver/assets/css/pagination.css @@ -29,6 +29,8 @@ pagination .page-link:hover { + text-decoration: none; + z-index: 2; color: #0a58ca; /* --bs-link-hover-color */ background-color: #f8f9fa; /* --bs-tertiary-bg */ @@ -36,6 +38,8 @@ pagination } .page-link:focus { + text-decoration: none; + z-index: 3; color: #0a58ca; /* --bs-link-hover-color */ diff --git a/themes/beaver/layouts/_default/list.html b/themes/beaver/layouts/_default/list.html index 4abcf930f..d3bb38703 100644 --- a/themes/beaver/layouts/_default/list.html +++ b/themes/beaver/layouts/_default/list.html @@ -7,11 +7,11 @@ (resources.Get "css/bf72bba397177a0376baed325bffdc75-layout-bundle.css") (resources.Get "css/skin-65eda28877e04.css") (resources.Get "css/single-post.css") -(resources.Get "css/pagination.css") | resources.Concat "css/blog.css" | postCSS | minify | fingerprint | resources.PostProcess}} - +{{ $paginationCss := resources.Get "css/pagination.css" | minify | fingerprint }} + {{ if eq .Type "tags" }} diff --git a/themes/beaver/layouts/blog/list.html b/themes/beaver/layouts/blog/list.html index 4abcf930f..a61791d70 100644 --- a/themes/beaver/layouts/blog/list.html +++ b/themes/beaver/layouts/blog/list.html @@ -7,12 +7,12 @@ (resources.Get "css/bf72bba397177a0376baed325bffdc75-layout-bundle.css") (resources.Get "css/skin-65eda28877e04.css") (resources.Get "css/single-post.css") -(resources.Get "css/pagination.css") | resources.Concat "css/blog.css" | postCSS | minify | fingerprint | resources.PostProcess}} - +{{ $paginationCss := resources.Get "css/pagination.css" | minify | fingerprint }} + {{ if eq .Type "tags" }} {{ $blogIndex := .Site.GetPage "blog" }} diff --git a/themes/beaver/layouts/partials/pagination.html b/themes/beaver/layouts/partials/pagination.html index c99eb94bb..92d7b53d9 100644 --- a/themes/beaver/layouts/partials/pagination.html +++ b/themes/beaver/layouts/partials/pagination.html @@ -36,23 +36,23 @@ {{- with .First }} {{- if ne $currentPageNumber .PageNumber }}
  • - + First
  • {{- else }} -
  • - -
  • + + + {{- end }} {{- end }} {{- with .Prev }} -
  • - -
  • + + + {{- else }} -
  • - -
  • + + + {{- end }} {{- $slots := 3 }} @@ -75,24 +75,24 @@ {{- end }} {{- with .Next }} -
  • - -
  • + + + {{- else }} -
  • - -
  • + + + {{- end }} {{- with .Last }} {{- if ne $currentPageNumber .PageNumber }}
  • - + Last
  • {{- else }} -
  • - -
  • + + + {{- end }} {{- end }} {{- end }} From 56af0395b16da0edf4d9f29f474479fc08759830 Mon Sep 17 00:00:00 2001 From: AucT Date: Wed, 25 Sep 2024 14:31:36 +0300 Subject: [PATCH 3/7] use pagination css inside all css --- postcss.config.js | 9 ++++++--- themes/beaver/layouts/_default/list.html | 4 +--- themes/beaver/layouts/blog/list.html | 3 +-- themes/beaver/layouts/partials/pagination.html | 15 +++------------ 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index f4a8b6aba..79a9897d4 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -29,9 +29,11 @@ const purgecss = require("@fullhuman/postcss-purgecss")({ // pp google form // /^pp-gf/, "fl-button", "pp-button", - ".pagination", - ".page-link", - ".page-item", + "pagination", + "page-link", + "page-item", + "active", + "disabled", // sdb "jt-active", ], @@ -42,6 +44,7 @@ const purgecss = require("@fullhuman/postcss-purgecss")({ greedy: [ /^swiper-/, /^is-/, /^has-/, /^js-/, /^fl-builder-content/, /^fl-col/, /^fl-node/, + /^pagination-/, /^page-item/, ] }, }) diff --git a/themes/beaver/layouts/_default/list.html b/themes/beaver/layouts/_default/list.html index d3bb38703..2e5ba3599 100644 --- a/themes/beaver/layouts/_default/list.html +++ b/themes/beaver/layouts/_default/list.html @@ -6,12 +6,10 @@ (resources.Get "css/3114-layout.css") (resources.Get "css/bf72bba397177a0376baed325bffdc75-layout-bundle.css") (resources.Get "css/skin-65eda28877e04.css") -(resources.Get "css/single-post.css") +(resources.Get "css/pagination.css") | resources.Concat "css/blog.css" | postCSS | minify | fingerprint | resources.PostProcess}} -{{ $paginationCss := resources.Get "css/pagination.css" | minify | fingerprint }} - {{ if eq .Type "tags" }} diff --git a/themes/beaver/layouts/blog/list.html b/themes/beaver/layouts/blog/list.html index a61791d70..486b2f77c 100644 --- a/themes/beaver/layouts/blog/list.html +++ b/themes/beaver/layouts/blog/list.html @@ -7,12 +7,11 @@ (resources.Get "css/bf72bba397177a0376baed325bffdc75-layout-bundle.css") (resources.Get "css/skin-65eda28877e04.css") (resources.Get "css/single-post.css") +(resources.Get "css/pagination.css") | resources.Concat "css/blog.css" | postCSS | minify | fingerprint | resources.PostProcess}} -{{ $paginationCss := resources.Get "css/pagination.css" | minify | fingerprint }} - {{ if eq .Type "tags" }} {{ $blogIndex := .Site.GetPage "blog" }} diff --git a/themes/beaver/layouts/partials/pagination.html b/themes/beaver/layouts/partials/pagination.html index 92d7b53d9..fd546ba69 100644 --- a/themes/beaver/layouts/partials/pagination.html +++ b/themes/beaver/layouts/partials/pagination.html @@ -107,16 +107,11 @@ {{- with .First }} {{- if ne $currentPageNumber .PageNumber }}
  • - + First
  • {{- end }} {{- end }} -{{- with .Prev }} -
  • - -
  • -{{- end }} {{- $slots := 3 }} {{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }} @@ -137,16 +132,12 @@ {{- end }} {{- end }} -{{- with .Next }} -
  • - -
  • -{{- end }} + {{- with .Last }} {{- if ne $currentPageNumber .PageNumber }}
  • - + Last
  • {{- end }} {{- end }} From c7008999038d5d5f244f4120b69193cc87f10f8d Mon Sep 17 00:00:00 2001 From: AucT Date: Wed, 25 Sep 2024 17:13:27 +0300 Subject: [PATCH 4/7] Revert "use pagination css inside all css" This reverts commit 56af0395 --- postcss.config.js | 9 +++------ themes/beaver/layouts/_default/list.html | 4 +++- themes/beaver/layouts/blog/list.html | 3 ++- themes/beaver/layouts/partials/pagination.html | 15 ++++++++++++--- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index 79a9897d4..f4a8b6aba 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -29,11 +29,9 @@ const purgecss = require("@fullhuman/postcss-purgecss")({ // pp google form // /^pp-gf/, "fl-button", "pp-button", - "pagination", - "page-link", - "page-item", - "active", - "disabled", + ".pagination", + ".page-link", + ".page-item", // sdb "jt-active", ], @@ -44,7 +42,6 @@ const purgecss = require("@fullhuman/postcss-purgecss")({ greedy: [ /^swiper-/, /^is-/, /^has-/, /^js-/, /^fl-builder-content/, /^fl-col/, /^fl-node/, - /^pagination-/, /^page-item/, ] }, }) diff --git a/themes/beaver/layouts/_default/list.html b/themes/beaver/layouts/_default/list.html index 2e5ba3599..d3bb38703 100644 --- a/themes/beaver/layouts/_default/list.html +++ b/themes/beaver/layouts/_default/list.html @@ -6,10 +6,12 @@ (resources.Get "css/3114-layout.css") (resources.Get "css/bf72bba397177a0376baed325bffdc75-layout-bundle.css") (resources.Get "css/skin-65eda28877e04.css") -(resources.Get "css/pagination.css") +(resources.Get "css/single-post.css") | resources.Concat "css/blog.css" | postCSS | minify | fingerprint | resources.PostProcess}} +{{ $paginationCss := resources.Get "css/pagination.css" | minify | fingerprint }} + {{ if eq .Type "tags" }} diff --git a/themes/beaver/layouts/blog/list.html b/themes/beaver/layouts/blog/list.html index 486b2f77c..a61791d70 100644 --- a/themes/beaver/layouts/blog/list.html +++ b/themes/beaver/layouts/blog/list.html @@ -7,11 +7,12 @@ (resources.Get "css/bf72bba397177a0376baed325bffdc75-layout-bundle.css") (resources.Get "css/skin-65eda28877e04.css") (resources.Get "css/single-post.css") -(resources.Get "css/pagination.css") | resources.Concat "css/blog.css" | postCSS | minify | fingerprint | resources.PostProcess}} +{{ $paginationCss := resources.Get "css/pagination.css" | minify | fingerprint }} + {{ if eq .Type "tags" }} {{ $blogIndex := .Site.GetPage "blog" }} diff --git a/themes/beaver/layouts/partials/pagination.html b/themes/beaver/layouts/partials/pagination.html index fd546ba69..92d7b53d9 100644 --- a/themes/beaver/layouts/partials/pagination.html +++ b/themes/beaver/layouts/partials/pagination.html @@ -107,11 +107,16 @@ {{- with .First }} {{- if ne $currentPageNumber .PageNumber }}
  • - First +
  • {{- end }} {{- end }} +{{- with .Prev }} +
  • + +
  • +{{- end }} {{- $slots := 3 }} {{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }} @@ -132,12 +137,16 @@ {{- end }} {{- end }} - +{{- with .Next }} +
  • + +
  • +{{- end }} {{- with .Last }} {{- if ne $currentPageNumber .PageNumber }}
  • - Last +
  • {{- end }} {{- end }} From 15e22f7054c5307667104ddc1e869301a7762c85 Mon Sep 17 00:00:00 2001 From: AucT Date: Wed, 25 Sep 2024 17:14:00 +0300 Subject: [PATCH 5/7] remove pagination from save as it will be in other file --- postcss.config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/postcss.config.js b/postcss.config.js index f4a8b6aba..f6094f525 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -28,10 +28,6 @@ const purgecss = require("@fullhuman/postcss-purgecss")({ // pp google form // /^pp-gf/, "fl-button", "pp-button", - - ".pagination", - ".page-link", - ".page-item", // sdb "jt-active", ], From 4de0c2bfee39267608651171e84cd180ec4ecc5f Mon Sep 17 00:00:00 2001 From: AucT Date: Wed, 25 Sep 2024 17:16:37 +0300 Subject: [PATCH 6/7] update pagination to be simple --- .../beaver/layouts/partials/pagination.html | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/themes/beaver/layouts/partials/pagination.html b/themes/beaver/layouts/partials/pagination.html index 92d7b53d9..8d23a5a85 100644 --- a/themes/beaver/layouts/partials/pagination.html +++ b/themes/beaver/layouts/partials/pagination.html @@ -39,20 +39,11 @@ First {{- else }} - - - {{- end }} {{- end }} {{- with .Prev }} - - - {{- else }} - - - {{- end }} {{- $slots := 3 }} @@ -75,13 +66,7 @@ {{- end }} {{- with .Next }} - - - {{- else }} - - - {{- end }} {{- with .Last }} @@ -90,9 +75,6 @@ Last {{- else }} - - - {{- end }} {{- end }} {{- end }} @@ -107,15 +89,12 @@ {{- with .First }} {{- if ne $currentPageNumber .PageNumber }}
  • - + First
  • {{- end }} {{- end }} {{- with .Prev }} -
  • - -
  • {{- end }} {{- $slots := 3 }} @@ -138,15 +117,12 @@ {{- end }} {{- with .Next }} -
  • - -
  • {{- end }} {{- with .Last }} {{- if ne $currentPageNumber .PageNumber }}
  • - + Last
  • {{- end }} {{- end }} From fb7c1ab38220c85ada58eb65ab2d0faac978d56a Mon Sep 17 00:00:00 2001 From: AucT Date: Thu, 26 Sep 2024 13:24:09 +0300 Subject: [PATCH 7/7] update pagination to be simpler --- themes/beaver/assets/css/pagination.css | 3 ++ .../beaver/layouts/partials/pagination.html | 54 ++++++++++--------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/themes/beaver/assets/css/pagination.css b/themes/beaver/assets/css/pagination.css index adfb30aec..dd7159584 100644 --- a/themes/beaver/assets/css/pagination.css +++ b/themes/beaver/assets/css/pagination.css @@ -74,4 +74,7 @@ pagination .page-item:last-child .page-link { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; +} +.justify-content-between { + justify-content: space-between !important; } \ No newline at end of file diff --git a/themes/beaver/layouts/partials/pagination.html b/themes/beaver/layouts/partials/pagination.html index 8d23a5a85..4f716cdf3 100644 --- a/themes/beaver/layouts/partials/pagination.html +++ b/themes/beaver/layouts/partials/pagination.html @@ -19,7 +19,7 @@ {{- if in $validFormats $format }} {{- if gt $page.Paginator.TotalPages 1 }} -
      +
        {{- partial (printf "partials/inline/pagination/%s" $format) $page }}
      {{- end }} @@ -35,15 +35,18 @@ {{- with .First }} {{- if ne $currentPageNumber .PageNumber }} -
    • - First -
    • {{- else }} {{- end }} {{- end }} {{- with .Prev }} +
    • + ← Prev +
    • {{- else }} +
    • + ← Prev +
    • {{- end }} {{- $slots := 3 }} @@ -55,25 +58,24 @@ {{- range $k := seq $start $end }} {{- if eq $.Paginator.PageNumber $k }} -
    • - {{ $k }} -
    • + {{- else }} -
    • - {{ $k }} -
    • + {{- end }} {{- end }} {{- with .Next }} +
    • + Next → +
    • {{- else }} +
    • + Next → +
    • {{- end }} {{- with .Last }} {{- if ne $currentPageNumber .PageNumber }} -
    • - Last -
    • {{- else }} {{- end }} {{- end }} @@ -88,13 +90,17 @@ {{- with .First }} {{- if ne $currentPageNumber .PageNumber }} -
    • - First -
    • {{- end }} {{- end }} {{- with .Prev }} +
    • + ← Prev +
    • +{{- else }} +
    • + ← Prev +
    • {{- end }} {{- $slots := 3 }} @@ -106,24 +112,22 @@ {{- range $k := seq $start $end }} {{- if eq $.Paginator.PageNumber $k }} -
    • - {{ $k }} -
    • {{- else }} -
    • - {{ $k }} -
    • {{- end }} {{- end }} {{- with .Next }} +
    • + Next → +
    • +{{- else }} +
    • + Next → +
    • {{- end }} {{- with .Last }} {{- if ne $currentPageNumber .PageNumber }} -
    • - Last -
    • {{- end }} {{- end }} {{- end }}