mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
Fix: next page is broken when there is no page limit #34
This commit is contained in:
+2
-1
@@ -133,11 +133,12 @@ func CreatePaginator(base, ending string, current_page, max_page int) template.H
|
||||
count++
|
||||
}
|
||||
|
||||
pages += fmt.Sprintf(`<a href="%s%d%s" class="pagination-button">›</a>`, base, min(max_page, current_page+1), ending)
|
||||
|
||||
if max_page == -1 {
|
||||
pages += fmt.Sprintf(`<a href="%s%d%s" class="pagination-button">›</a>`, base, current_page+1, ending)
|
||||
pages += fmt.Sprintf(`<a href="%s%d%s" class="pagination-button" id="disabled">»</a>`, base, max_page, ending)
|
||||
} else {
|
||||
pages += fmt.Sprintf(`<a href="%s%d%s" class="pagination-button">›</a>`, base, min(max_page, current_page+1), ending)
|
||||
pages += fmt.Sprintf(`<a href="%s%d%s" class="pagination-button">»</a>`, base, max_page, ending)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user