This commit is contained in:
Bryce Covert
2020-08-22 17:14:21 -07:00
parent dc57fd7d0c
commit 25477d07f7
16 changed files with 9593 additions and 158 deletions

View File

@@ -57,7 +57,7 @@
(let [per-page 100
max-buttons 5
buttons-before (Math/floor (/ max-buttons 2))
total-pages (Math/ceil (/ total per-page))
total-pages (Math/max 1 (Math/ceil (/ total per-page)))
current-page (Math/floor (/ start per-page))
first-page-button (bound 0 (- current-page buttons-before) (- total-pages max-buttons))
all-buttons (into [] (for [x (range total-pages)]