first commit

This commit is contained in:
patarapolw committed 2019-08-12 01:13:27 +07:00
commit 379b9d1a62
24 files changed
+3828

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
if paginator
nav.mt-3
ul.pagination
if paginator.prev !== null
li.page-item
a.page-link(href=`${cogear.config.baseUrl || "/"}${paginator.prev}`) ← Prev
- let page = 1
while page <= paginator.total
- let range = 2
if page == 1 || page == paginator.total || (page >= paginator.current - range && page <= paginator.current + range)
if page == paginator.current
li.page-item.active
a.page-link(href=`${paginator.baseUri}/${page}`)= page
else
li.page-item
a.page-link(href=`${paginator.baseUri}/${page}`)= page
else if paginator.current < paginator.total - range && page == paginator.total - 1 || paginator.current > 1+range && page == range
li.page-item
a.page-link.ellipsis …
- page=page+1
if paginator.next !== null
li.page-item
a.page-link(href=`/${paginator.next}`) Next &rarr;