|
@@ -13,36 +13,42 @@ mixin pagination(pages, page_path, max_btns)
|
|
|
- var next_index = 0;
|
|
- var next_index = 0;
|
|
|
- var full_page_path = page_path + "/page/"
|
|
- var full_page_path = page_path + "/page/"
|
|
|
|
|
|
|
|
- nav(role="navigation" aria-label="Pagination Navigation")
|
|
|
|
|
|
|
+ nav(role="navigation" aria-label=(translate("pagination_navigation")))
|
|
|
ul.pagination
|
|
ul.pagination
|
|
|
if pages.current_page > 1
|
|
if pages.current_page > 1
|
|
|
li
|
|
li
|
|
|
a(
|
|
a(
|
|
|
- aria-label="Go to first page"
|
|
|
|
|
|
|
+ aria-label=translate("go_to_first_page")
|
|
|
href=page_path
|
|
href=page_path
|
|
|
- ) « First
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ span(aria-hidden="true") <<
|
|
|
|
|
+ |
|
|
|
|
|
+ | First
|
|
|
li
|
|
li
|
|
|
a(
|
|
a(
|
|
|
- aria-label="Go to previous page"
|
|
|
|
|
|
|
+ aria-label=translate("go_to_previous_page")
|
|
|
href=full_page_path + (parseInt(pages.current_page, 10) - 1)
|
|
href=full_page_path + (parseInt(pages.current_page, 10) - 1)
|
|
|
rel="prev"
|
|
rel="prev"
|
|
|
- ) ‹ Prev
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ span(aria-hidden="true") <
|
|
|
|
|
+ |
|
|
|
|
|
+ | Prev
|
|
|
|
|
|
|
|
if pages.current_page - max_btns > 1
|
|
if pages.current_page - max_btns > 1
|
|
|
- li
|
|
|
|
|
|
|
+ li(aria-hidden="true")
|
|
|
span …
|
|
span …
|
|
|
|
|
|
|
|
while prev_page < pages.current_page
|
|
while prev_page < pages.current_page
|
|
|
li
|
|
li
|
|
|
a(
|
|
a(
|
|
|
- aria-label="Go to page " + prev_page
|
|
|
|
|
|
|
+ aria-label=translate("go_to_page_x", {page: prev_page})
|
|
|
href=full_page_path + prev_page
|
|
href=full_page_path + prev_page
|
|
|
) #{prev_page}
|
|
) #{prev_page}
|
|
|
- prev_page++
|
|
- prev_page++
|
|
|
|
|
|
|
|
li(class="active")
|
|
li(class="active")
|
|
|
span(
|
|
span(
|
|
|
- aria-label="Current Page, Page " + pages.current_page
|
|
|
|
|
|
|
+ aria-label=translate("current_page_page", {page: pages.current_page})
|
|
|
aria-current="true"
|
|
aria-current="true"
|
|
|
) #{pages.current_page}
|
|
) #{pages.current_page}
|
|
|
|
|
|
|
@@ -50,25 +56,31 @@ mixin pagination(pages, page_path, max_btns)
|
|
|
while next_page <= pages.total_pages && next_index < max_btns
|
|
while next_page <= pages.total_pages && next_index < max_btns
|
|
|
li
|
|
li
|
|
|
a(
|
|
a(
|
|
|
- aria-label="Go to page " + next_page
|
|
|
|
|
|
|
+ aria-label=translate("go_to_page_x", {page: next_page})
|
|
|
href=full_page_path + next_page
|
|
href=full_page_path + next_page
|
|
|
) #{next_page}
|
|
) #{next_page}
|
|
|
- next_page++
|
|
- next_page++
|
|
|
- next_index++
|
|
- next_index++
|
|
|
|
|
|
|
|
if next_page <= pages.total_pages
|
|
if next_page <= pages.total_pages
|
|
|
- li
|
|
|
|
|
|
|
+ li.ellipses(aria-hidden="true")
|
|
|
span …
|
|
span …
|
|
|
|
|
|
|
|
li
|
|
li
|
|
|
a(
|
|
a(
|
|
|
- aria-label="Go to next page"
|
|
|
|
|
|
|
+ aria-label=translate("go_to_next_page")
|
|
|
href=full_page_path + (parseInt(pages.current_page, 10) + 1)
|
|
href=full_page_path + (parseInt(pages.current_page, 10) + 1)
|
|
|
rel="next"
|
|
rel="next"
|
|
|
- ) Next ›
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ | Next
|
|
|
|
|
+ |
|
|
|
|
|
+ span(aria-hidden="true") >
|
|
|
|
|
|
|
|
li
|
|
li
|
|
|
a(
|
|
a(
|
|
|
- aria-label="Go to last page"
|
|
|
|
|
|
|
+ aria-label=translate("go_to_last_page")
|
|
|
href=full_page_path + pages.total_pages
|
|
href=full_page_path + pages.total_pages
|
|
|
- ) Last »
|
|
|
|
|
|
|
+ )
|
|
|
|
|
+ | Last
|
|
|
|
|
+ |
|
|
|
|
|
+ span(aria-hidden="true") >>
|