From 8555cf72dec9321fa010296ce6988cf7b7cf602b Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Sun, 26 Dec 2021 00:30:09 -0500 Subject: convert theme from submodule to regular files --- themes/hugo-coder/layouts/partials/pagination.html | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 themes/hugo-coder/layouts/partials/pagination.html (limited to 'themes/hugo-coder/layouts/partials/pagination.html') diff --git a/themes/hugo-coder/layouts/partials/pagination.html b/themes/hugo-coder/layouts/partials/pagination.html new file mode 100644 index 0000000..1e004b8 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/pagination.html @@ -0,0 +1,48 @@ +{{ $paginator := .Paginator }} +{{ $adjacent_links := 2 }} +{{ $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 }} -- cgit v1.3