Skip to content

Commit

Permalink
removed marginal pagy.nav.current key used only by foundation an fixe…
Browse files Browse the repository at this point in the history
…d consistency in foundation helpers and templates
  • Loading branch information
ddnexus committed Sep 30, 2018
1 parent 15e413b commit c1aec4c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 30 deletions.
5 changes: 0 additions & 5 deletions lib/locales/pagy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ en:
prev: "‹ Prev"
next: "Next ›"
gap: "…"
current: "You're on page"
info:
single_page:
zero: "No %{item_name} found"
Expand All @@ -27,7 +26,6 @@ es:
prev: "‹ Prev"
next: "Siguiente ›"
gap: "…"
current: "Estás en la página"
info:
single_page:
zero: "Sin resultados"
Expand All @@ -48,7 +46,6 @@ id:
prev: "‹ Balik"
next: "Lanjut ›"
gap: "…"
current: "Anda di halaman"
info:
single_page:
zero: "Tidak ditemukan %{item_name}"
Expand Down Expand Up @@ -89,7 +86,6 @@ pt-br:
prev: "‹ Anterior"
next: "Próximo ›"
gap: "…"
current: "Está na página"
info:
single_page:
zero: "Sem resultados"
Expand All @@ -110,7 +106,6 @@ ru:
prev: "‹ Назад"
next: "Вперёд ›"
gap: "…"
current: "Вы на странице"
info:
single_page:
zero: "Пока %{item_name} нет"
Expand Down
12 changes: 6 additions & 6 deletions lib/pagy/extras/foundation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def pagy_nav_foundation(pagy)
html << (p_prev ? %(<li class="prev">#{link.call p_prev, pagy_t('pagy.nav.prev'), 'aria-label="previous"'}</li>)
: %(<li class="prev disabled">#{pagy_t('pagy.nav.prev')}</li>))
pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
html << if item.is_a?(Integer); %(<li>#{link.call item}</li>) # page link
elsif item.is_a?(String) ; %(<li class="current"><span class="show-for-sr">#{pagy_t('pagy.nav.current')}</span> #{item}</li>) # active page
elsif item == :gap ; %(<li class="ellipsis" aria-hidden="true"></li>) # page gap
html << if item.is_a?(Integer); %(<li>#{link.call item}</li>) # page link
elsif item.is_a?(String) ; %(<li class="current">#{item}</li>) # active page
elsif item == :gap ; %(<li class="ellipsis gap" aria-hidden="true"></li>) # page gap
end
end
html << (p_next ? %(<li class="next">#{link.call p_next, pagy_t('pagy.nav.next'), 'aria-label="next"'}</li>)
Expand Down Expand Up @@ -50,9 +50,9 @@ def pagy_nav_responsive_foundation(pagy, id=caller(1,1)[0].hash)
tags['before'] << (p_prev ? %(<li class="prev">#{link.call p_prev, pagy_t('pagy.nav.prev'), 'aria-label="previous"'}</li>)
: %(<li class="prev disabled">#{pagy_t('pagy.nav.prev')}</li>))
responsive[:items].each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
tags[item.to_s] = if item.is_a?(Integer); %(<li>#{link.call item}</li>) # page link
elsif item.is_a?(String) ; %(<li class="current"><span class="show-for-sr">#{pagy_t('pagy.nav.current')}</span> #{item}</li>) # active page
elsif item == :gap ; %(<li class="gap disabled">#{pagy_t('pagy.nav.gap')}</li>) # page gap
tags[item.to_s] = if item.is_a?(Integer); %(<li>#{link.call item}</li>) # page link
elsif item.is_a?(String) ; %(<li class="current">#{item}</li>) # active page
elsif item == :gap ; %(<li class="ellipsis gap" aria-hidden="true"></li>) # page gap
end
end
tags['after'] = +(p_next ? %(<li class="next">#{link.call p_next, pagy_t('pagy.nav.next'), 'aria-label="next"'}</li>)
Expand Down
4 changes: 2 additions & 2 deletions lib/templates/nav_foundation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<% end -%>
<% pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36] -%>
<% if item.is_a?(Integer) -%> <li><%== link.call(item) %></li>
<% elsif item.is_a?(String) -%> <li class="current"><span class="show-for-sr"><%== pagy_t('pagy.nav.current')%></span> <%= item %></li>
<% elsif item == :gap -%> <li class="disabled gap"><%== pagy_t('pagy.nav.gap') %></li>
<% elsif item.is_a?(String) -%> <li class="current"><%= item %></li>
<% elsif item == :gap -%> <li class="ellipsis gap" aria-hidden="true"></li>
<% end -%>
<% end -%>
<% if pagy.next -%> <li class="next"><%== link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next"') %></li>
Expand Down
7 changes: 2 additions & 5 deletions lib/templates/nav_foundation.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@

- elsif item.is_a?(String) # current page
%li.current
%span.show-for-sr
!= pagy_t('pagy.nav.current')
!= item
= item

- elsif item == :gap # page gap
%li.disabled.gap
!= pagy_t('pagy.nav.gap')
%li.ellipsis.gap{"aria-hidden" => true}
- if pagy.next
%li.next!= link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next"')
Expand Down
5 changes: 1 addition & 4 deletions lib/templates/nav_foundation.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ nav.pagy-nav-foundation role="navigation" aria-label="Pagination"

- elsif item.is_a?(String) # current page
li.current
span.show-for-sr
== pagy_t('pagy.nav.current')
= item

- elsif item == :gap # page gap
li.disabled.gap
== pagy_t('pagy.nav.gap')
li.ellipsis.gap aria-hidden="true"

- if pagy.next
li.next == link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next"')
Expand Down
16 changes: 8 additions & 8 deletions test/pagy/extras/foundation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@
it 'renders page 1' do
pagy, _ = @array.pagy(1)
frontend.pagy_nav_foundation(pagy).must_equal \
"<nav class=\"pagy-nav-foundation\" role=\"navigation\" aria-label=\"Pagination\"><ul class=\"pagination\"><li class=\"prev disabled\">&lsaquo;&nbsp;Prev</li><li class=\"current\"><span class=\"show-for-sr\">You're on page</span> 1</li><li><a href=\"/foo?page=2\" rel=\"next\" >2</a></li><li><a href=\"/foo?page=3\" >3</a></li><li><a href=\"/foo?page=4\" >4</a></li><li><a href=\"/foo?page=5\" >5</a></li><li><a href=\"/foo?page=6\" >6</a></li><li class=\"next\"><a href=\"/foo?page=2\" rel=\"next\" aria-label=\"next\">Next&nbsp;&rsaquo;</a></li></ul></nav>"
"<nav class=\"pagy-nav-foundation\" role=\"navigation\" aria-label=\"Pagination\"><ul class=\"pagination\"><li class=\"prev disabled\">&lsaquo;&nbsp;Prev</li><li class=\"current\">1</li><li><a href=\"/foo?page=2\" rel=\"next\" >2</a></li><li><a href=\"/foo?page=3\" >3</a></li><li><a href=\"/foo?page=4\" >4</a></li><li><a href=\"/foo?page=5\" >5</a></li><li><a href=\"/foo?page=6\" >6</a></li><li class=\"next\"><a href=\"/foo?page=2\" rel=\"next\" aria-label=\"next\">Next&nbsp;&rsaquo;</a></li></ul></nav>"
end

it 'renders page 3' do
pagy, _ = @array.pagy(3)
frontend.pagy_nav_foundation(pagy).must_equal \
"<nav class=\"pagy-nav-foundation\" role=\"navigation\" aria-label=\"Pagination\"><ul class=\"pagination\"><li class=\"prev\"><a href=\"/foo?page=2\" rel=\"prev\" aria-label=\"previous\">&lsaquo;&nbsp;Prev</a></li><li><a href=\"/foo?page=1\" >1</a></li><li><a href=\"/foo?page=2\" rel=\"prev\" >2</a></li><li class=\"current\"><span class=\"show-for-sr\">You're on page</span> 3</li><li><a href=\"/foo?page=4\" rel=\"next\" >4</a></li><li><a href=\"/foo?page=5\" >5</a></li><li><a href=\"/foo?page=6\" >6</a></li><li class=\"next\"><a href=\"/foo?page=4\" rel=\"next\" aria-label=\"next\">Next&nbsp;&rsaquo;</a></li></ul></nav>"
"<nav class=\"pagy-nav-foundation\" role=\"navigation\" aria-label=\"Pagination\"><ul class=\"pagination\"><li class=\"prev\"><a href=\"/foo?page=2\" rel=\"prev\" aria-label=\"previous\">&lsaquo;&nbsp;Prev</a></li><li><a href=\"/foo?page=1\" >1</a></li><li><a href=\"/foo?page=2\" rel=\"prev\" >2</a></li><li class=\"current\">3</li><li><a href=\"/foo?page=4\" rel=\"next\" >4</a></li><li><a href=\"/foo?page=5\" >5</a></li><li><a href=\"/foo?page=6\" >6</a></li><li class=\"next\"><a href=\"/foo?page=4\" rel=\"next\" aria-label=\"next\">Next&nbsp;&rsaquo;</a></li></ul></nav>"
end

it 'renders page 6' do
pagy, _ = @array.pagy(6)
frontend.pagy_nav_foundation(pagy).must_equal \
"<nav class=\"pagy-nav-foundation\" role=\"navigation\" aria-label=\"Pagination\"><ul class=\"pagination\"><li class=\"prev\"><a href=\"/foo?page=5\" rel=\"prev\" aria-label=\"previous\">&lsaquo;&nbsp;Prev</a></li><li><a href=\"/foo?page=1\" >1</a></li><li><a href=\"/foo?page=2\" >2</a></li><li><a href=\"/foo?page=3\" >3</a></li><li><a href=\"/foo?page=4\" >4</a></li><li><a href=\"/foo?page=5\" rel=\"prev\" >5</a></li><li class=\"current\"><span class=\"show-for-sr\">You're on page</span> 6</li><li class=\"next disabled\">Next&nbsp;&rsaquo;</li></ul></nav>"
"<nav class=\"pagy-nav-foundation\" role=\"navigation\" aria-label=\"Pagination\"><ul class=\"pagination\"><li class=\"prev\"><a href=\"/foo?page=5\" rel=\"prev\" aria-label=\"previous\">&lsaquo;&nbsp;Prev</a></li><li><a href=\"/foo?page=1\" >1</a></li><li><a href=\"/foo?page=2\" >2</a></li><li><a href=\"/foo?page=3\" >3</a></li><li><a href=\"/foo?page=4\" >4</a></li><li><a href=\"/foo?page=5\" rel=\"prev\" >5</a></li><li class=\"current\">6</li><li class=\"next disabled\">Next&nbsp;&rsaquo;</li></ul></nav>"
end

it 'renders page 10' do
@array = (1..1000).to_a.extend(Pagy::Array::PageMethod)
pagy, _ = @array.pagy(10)
frontend.pagy_nav_foundation(pagy).must_equal \
"<nav class=\"pagy-nav-foundation\" role=\"navigation\" aria-label=\"Pagination\"><ul class=\"pagination\"><li class=\"prev\"><a href=\"/foo?page=9\" rel=\"prev\" aria-label=\"previous\">&lsaquo;&nbsp;Prev</a></li><li><a href=\"/foo?page=1\" >1</a></li><li class=\"ellipsis\" aria-hidden=\"true\"></li><li><a href=\"/foo?page=6\" >6</a></li><li><a href=\"/foo?page=7\" >7</a></li><li><a href=\"/foo?page=8\" >8</a></li><li><a href=\"/foo?page=9\" rel=\"prev\" >9</a></li><li class=\"current\"><span class=\"show-for-sr\">You're on page</span> 10</li><li><a href=\"/foo?page=11\" rel=\"next\" >11</a></li><li><a href=\"/foo?page=12\" >12</a></li><li><a href=\"/foo?page=13\" >13</a></li><li><a href=\"/foo?page=14\" >14</a></li><li class=\"ellipsis\" aria-hidden=\"true\"></li><li><a href=\"/foo?page=50\" >50</a></li><li class=\"next\"><a href=\"/foo?page=11\" rel=\"next\" aria-label=\"next\">Next&nbsp;&rsaquo;</a></li></ul></nav>"
"<nav class=\"pagy-nav-foundation\" role=\"navigation\" aria-label=\"Pagination\"><ul class=\"pagination\"><li class=\"prev\"><a href=\"/foo?page=9\" rel=\"prev\" aria-label=\"previous\">&lsaquo;&nbsp;Prev</a></li><li><a href=\"/foo?page=1\" >1</a></li><li class=\"ellipsis gap\" aria-hidden=\"true\"></li><li><a href=\"/foo?page=6\" >6</a></li><li><a href=\"/foo?page=7\" >7</a></li><li><a href=\"/foo?page=8\" >8</a></li><li><a href=\"/foo?page=9\" rel=\"prev\" >9</a></li><li class=\"current\">10</li><li><a href=\"/foo?page=11\" rel=\"next\" >11</a></li><li><a href=\"/foo?page=12\" >12</a></li><li><a href=\"/foo?page=13\" >13</a></li><li><a href=\"/foo?page=14\" >14</a></li><li class=\"ellipsis gap\" aria-hidden=\"true\"></li><li><a href=\"/foo?page=50\" >50</a></li><li class=\"next\"><a href=\"/foo?page=11\" rel=\"next\" aria-label=\"next\">Next&nbsp;&rsaquo;</a></li></ul></nav>"
end

end
Expand Down Expand Up @@ -79,29 +79,29 @@
pagy, _ = @array.pagy(1)
html, id = frontend.pagy_nav_responsive_foundation(pagy), caller(0,1)[0].hash
html.must_equal \
"<nav id=\"pagy-nav-#{id}\" class=\"pagy-nav-responsive-foundation\" aria-label=\"Pagination\"></nav><script type=\"application/json\" class=\"pagy-responsive-json\">[\"#{id}\", {\"before\":\"<ul class=\\\"pagination\\\"><li class=\\\"prev disabled\\\">&lsaquo;&nbsp;Prev</li>\",\"1\":\"<li class=\\\"current\\\"><span class=\\\"show-for-sr\\\">You're on page</span> 1</li>\",\"2\":\"<li><a href=\\\"/foo?page=2\\\" rel=\\\"next\\\" >2</a></li>\",\"3\":\"<li><a href=\\\"/foo?page=3\\\" >3</a></li>\",\"4\":\"<li><a href=\\\"/foo?page=4\\\" >4</a></li>\",\"5\":\"<li><a href=\\\"/foo?page=5\\\" >5</a></li>\",\"6\":\"<li><a href=\\\"/foo?page=6\\\" >6</a></li>\",\"after\":\"<li class=\\\"next\\\"><a href=\\\"/foo?page=2\\\" rel=\\\"next\\\" aria-label=\\\"next\\\">Next&nbsp;&rsaquo;</a></li></ul>\"}, [0], {\"0\":[\"1\",2,3,4,5,6]}]</script>"
"<nav id=\"pagy-nav-#{id}\" class=\"pagy-nav-responsive-foundation\" aria-label=\"Pagination\"></nav><script type=\"application/json\" class=\"pagy-responsive-json\">[\"#{id}\", {\"before\":\"<ul class=\\\"pagination\\\"><li class=\\\"prev disabled\\\">&lsaquo;&nbsp;Prev</li>\",\"1\":\"<li class=\\\"current\\\">1</li>\",\"2\":\"<li><a href=\\\"/foo?page=2\\\" rel=\\\"next\\\" >2</a></li>\",\"3\":\"<li><a href=\\\"/foo?page=3\\\" >3</a></li>\",\"4\":\"<li><a href=\\\"/foo?page=4\\\" >4</a></li>\",\"5\":\"<li><a href=\\\"/foo?page=5\\\" >5</a></li>\",\"6\":\"<li><a href=\\\"/foo?page=6\\\" >6</a></li>\",\"after\":\"<li class=\\\"next\\\"><a href=\\\"/foo?page=2\\\" rel=\\\"next\\\" aria-label=\\\"next\\\">Next&nbsp;&rsaquo;</a></li></ul>\"}, [0], {\"0\":[\"1\",2,3,4,5,6]}]</script>"
end

it 'renders page 3 for foundation' do
pagy, _ = @array.pagy(3)
html, id = frontend.pagy_nav_responsive_foundation(pagy), caller(0,1)[0].hash
html.must_equal \
"<nav id=\"pagy-nav-#{id}\" class=\"pagy-nav-responsive-foundation\" aria-label=\"Pagination\"></nav><script type=\"application/json\" class=\"pagy-responsive-json\">[\"#{id}\", {\"before\":\"<ul class=\\\"pagination\\\"><li class=\\\"prev\\\"><a href=\\\"/foo?page=2\\\" rel=\\\"prev\\\" aria-label=\\\"previous\\\">&lsaquo;&nbsp;Prev</a></li>\",\"1\":\"<li><a href=\\\"/foo?page=1\\\" >1</a></li>\",\"2\":\"<li><a href=\\\"/foo?page=2\\\" rel=\\\"prev\\\" >2</a></li>\",\"3\":\"<li class=\\\"current\\\"><span class=\\\"show-for-sr\\\">You're on page</span> 3</li>\",\"4\":\"<li><a href=\\\"/foo?page=4\\\" rel=\\\"next\\\" >4</a></li>\",\"5\":\"<li><a href=\\\"/foo?page=5\\\" >5</a></li>\",\"6\":\"<li><a href=\\\"/foo?page=6\\\" >6</a></li>\",\"after\":\"<li class=\\\"next\\\"><a href=\\\"/foo?page=4\\\" rel=\\\"next\\\" aria-label=\\\"next\\\">Next&nbsp;&rsaquo;</a></li></ul>\"}, [0], {\"0\":[1,2,\"3\",4,5,6]}]</script>"
"<nav id=\"pagy-nav-#{id}\" class=\"pagy-nav-responsive-foundation\" aria-label=\"Pagination\"></nav><script type=\"application/json\" class=\"pagy-responsive-json\">[\"#{id}\", {\"before\":\"<ul class=\\\"pagination\\\"><li class=\\\"prev\\\"><a href=\\\"/foo?page=2\\\" rel=\\\"prev\\\" aria-label=\\\"previous\\\">&lsaquo;&nbsp;Prev</a></li>\",\"1\":\"<li><a href=\\\"/foo?page=1\\\" >1</a></li>\",\"2\":\"<li><a href=\\\"/foo?page=2\\\" rel=\\\"prev\\\" >2</a></li>\",\"3\":\"<li class=\\\"current\\\">3</li>\",\"4\":\"<li><a href=\\\"/foo?page=4\\\" rel=\\\"next\\\" >4</a></li>\",\"5\":\"<li><a href=\\\"/foo?page=5\\\" >5</a></li>\",\"6\":\"<li><a href=\\\"/foo?page=6\\\" >6</a></li>\",\"after\":\"<li class=\\\"next\\\"><a href=\\\"/foo?page=4\\\" rel=\\\"next\\\" aria-label=\\\"next\\\">Next&nbsp;&rsaquo;</a></li></ul>\"}, [0], {\"0\":[1,2,\"3\",4,5,6]}]</script>"
end

it 'renders page 6 for foundation' do
pagy, _ = @array.pagy(6)
html, id = frontend.pagy_nav_responsive_foundation(pagy), caller(0,1)[0].hash
html.must_equal \
"<nav id=\"pagy-nav-#{id}\" class=\"pagy-nav-responsive-foundation\" aria-label=\"Pagination\"></nav><script type=\"application/json\" class=\"pagy-responsive-json\">[\"#{id}\", {\"before\":\"<ul class=\\\"pagination\\\"><li class=\\\"prev\\\"><a href=\\\"/foo?page=5\\\" rel=\\\"prev\\\" aria-label=\\\"previous\\\">&lsaquo;&nbsp;Prev</a></li>\",\"1\":\"<li><a href=\\\"/foo?page=1\\\" >1</a></li>\",\"2\":\"<li><a href=\\\"/foo?page=2\\\" >2</a></li>\",\"3\":\"<li><a href=\\\"/foo?page=3\\\" >3</a></li>\",\"4\":\"<li><a href=\\\"/foo?page=4\\\" >4</a></li>\",\"5\":\"<li><a href=\\\"/foo?page=5\\\" rel=\\\"prev\\\" >5</a></li>\",\"6\":\"<li class=\\\"current\\\"><span class=\\\"show-for-sr\\\">You're on page</span> 6</li>\",\"after\":\"<li class=\\\"next disabled\\\">Next&nbsp;&rsaquo;</li></ul>\"}, [0], {\"0\":[1,2,3,4,5,\"6\"]}]</script>"
"<nav id=\"pagy-nav-#{id}\" class=\"pagy-nav-responsive-foundation\" aria-label=\"Pagination\"></nav><script type=\"application/json\" class=\"pagy-responsive-json\">[\"#{id}\", {\"before\":\"<ul class=\\\"pagination\\\"><li class=\\\"prev\\\"><a href=\\\"/foo?page=5\\\" rel=\\\"prev\\\" aria-label=\\\"previous\\\">&lsaquo;&nbsp;Prev</a></li>\",\"1\":\"<li><a href=\\\"/foo?page=1\\\" >1</a></li>\",\"2\":\"<li><a href=\\\"/foo?page=2\\\" >2</a></li>\",\"3\":\"<li><a href=\\\"/foo?page=3\\\" >3</a></li>\",\"4\":\"<li><a href=\\\"/foo?page=4\\\" >4</a></li>\",\"5\":\"<li><a href=\\\"/foo?page=5\\\" rel=\\\"prev\\\" >5</a></li>\",\"6\":\"<li class=\\\"current\\\">6</li>\",\"after\":\"<li class=\\\"next disabled\\\">Next&nbsp;&rsaquo;</li></ul>\"}, [0], {\"0\":[1,2,3,4,5,\"6\"]}]</script>"
end

it 'renders page 10 for foundation' do
@array = (1..1000).to_a.extend(Pagy::Array::PageMethod)
pagy, _ = @array.pagy(10)
html, id = frontend.pagy_nav_responsive_foundation(pagy), caller(0,1)[0].hash
html.must_equal \
"<nav id=\"pagy-nav-#{id}\" class=\"pagy-nav-responsive-foundation\" aria-label=\"Pagination\"></nav><script type=\"application/json\" class=\"pagy-responsive-json\">[\"#{id}\", {\"before\":\"<ul class=\\\"pagination\\\"><li class=\\\"prev\\\"><a href=\\\"/foo?page=9\\\" rel=\\\"prev\\\" aria-label=\\\"previous\\\">&lsaquo;&nbsp;Prev</a></li>\",\"1\":\"<li><a href=\\\"/foo?page=1\\\" >1</a></li>\",\"gap\":\"<li class=\\\"gap disabled\\\">&hellip;</li>\",\"6\":\"<li><a href=\\\"/foo?page=6\\\" >6</a></li>\",\"7\":\"<li><a href=\\\"/foo?page=7\\\" >7</a></li>\",\"8\":\"<li><a href=\\\"/foo?page=8\\\" >8</a></li>\",\"9\":\"<li><a href=\\\"/foo?page=9\\\" rel=\\\"prev\\\" >9</a></li>\",\"10\":\"<li class=\\\"current\\\"><span class=\\\"show-for-sr\\\">You're on page</span> 10</li>\",\"11\":\"<li><a href=\\\"/foo?page=11\\\" rel=\\\"next\\\" >11</a></li>\",\"12\":\"<li><a href=\\\"/foo?page=12\\\" >12</a></li>\",\"13\":\"<li><a href=\\\"/foo?page=13\\\" >13</a></li>\",\"14\":\"<li><a href=\\\"/foo?page=14\\\" >14</a></li>\",\"50\":\"<li><a href=\\\"/foo?page=50\\\" >50</a></li>\",\"after\":\"<li class=\\\"next\\\"><a href=\\\"/foo?page=11\\\" rel=\\\"next\\\" aria-label=\\\"next\\\">Next&nbsp;&rsaquo;</a></li></ul>\"}, [0], {\"0\":[1,\"gap\",6,7,8,9,\"10\",11,12,13,14,\"gap\",50]}]</script>"
"<nav id=\"pagy-nav-#{id}\" class=\"pagy-nav-responsive-foundation\" aria-label=\"Pagination\"></nav><script type=\"application/json\" class=\"pagy-responsive-json\">[\"#{id}\", {\"before\":\"<ul class=\\\"pagination\\\"><li class=\\\"prev\\\"><a href=\\\"/foo?page=9\\\" rel=\\\"prev\\\" aria-label=\\\"previous\\\">&lsaquo;&nbsp;Prev</a></li>\",\"1\":\"<li><a href=\\\"/foo?page=1\\\" >1</a></li>\",\"gap\":\"<li class=\\\"ellipsis gap\\\" aria-hidden=\\\"true\\\"></li>\",\"6\":\"<li><a href=\\\"/foo?page=6\\\" >6</a></li>\",\"7\":\"<li><a href=\\\"/foo?page=7\\\" >7</a></li>\",\"8\":\"<li><a href=\\\"/foo?page=8\\\" >8</a></li>\",\"9\":\"<li><a href=\\\"/foo?page=9\\\" rel=\\\"prev\\\" >9</a></li>\",\"10\":\"<li class=\\\"current\\\">10</li>\",\"11\":\"<li><a href=\\\"/foo?page=11\\\" rel=\\\"next\\\" >11</a></li>\",\"12\":\"<li><a href=\\\"/foo?page=12\\\" >12</a></li>\",\"13\":\"<li><a href=\\\"/foo?page=13\\\" >13</a></li>\",\"14\":\"<li><a href=\\\"/foo?page=14\\\" >14</a></li>\",\"50\":\"<li><a href=\\\"/foo?page=50\\\" >50</a></li>\",\"after\":\"<li class=\\\"next\\\"><a href=\\\"/foo?page=11\\\" rel=\\\"next\\\" aria-label=\\\"next\\\">Next&nbsp;&rsaquo;</a></li></ul>\"}, [0], {\"0\":[1,\"gap\",6,7,8,9,\"10\",11,12,13,14,\"gap\",50]}]</script>"
end

end
Expand Down

0 comments on commit c1aec4c

Please sign in to comment.