Sha256: 98777166ee956fd3cc04732dc2aedf40476a782296224a5d2d6a4a8f175a9ce2

Contents?: true

Size: 1.16 KB

Versions: 45

Compression:

Stored size: 1.16 KB

Contents

/ This template is i18n-ready: if you don't use i18n, then you can replace the pagy_t
/ calls with the actual strings ("‹ Prev", "Next ›", "…").

/ The link variable is set to a proc that returns the link tag.
/ Usage: link.call( page_number [, text [, extra_attributes_string ]])

- link = pagy_link_proc(pagy)

nav.pagy-foundation-nav role="navigation" aria-label="Pagination"

  ul.pagination

    - if pagy.prev
      li.prev == link.call(pagy.prev, pagy_t('pagy.nav.prev'), 'aria-label="previous"')
    - else
      li.prev.disabled
        == pagy_t('pagy.nav.prev')

    - pagy.series.each do |item|                 # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
      - if item.is_a?(Integer)                   # page link
        li == link.call(item)

      - elsif item.is_a?(String)                 # current page
        li.current
          = pagy.label_for(item)

      - elsif item == :gap                       # page gap
        li.ellipsis.gap aria-hidden="true"

    - if pagy.next
      li.next == link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next"')
    - else
      li.next.disabled
        == pagy_t('pagy.nav.next')

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
pagy-5.8.1 lib/templates/foundation_nav.html.slim
pagy-5.8.0 lib/templates/foundation_nav.html.slim
pagy-5.7.6 lib/templates/foundation_nav.html.slim
pagy-5.7.5 lib/templates/foundation_nav.html.slim
pagy-5.7.4 lib/templates/foundation_nav.html.slim
pagy-5.7.3 lib/templates/foundation_nav.html.slim
pagy-5.7.2 lib/templates/foundation_nav.html.slim
pagy-5.7.1 lib/templates/foundation_nav.html.slim
pagy-5.7.0 lib/templates/foundation_nav.html.slim
pagy-5.6.10 lib/templates/foundation_nav.html.slim
pagy-5.6.9 lib/templates/foundation_nav.html.slim
pagy-5.6.8 lib/templates/foundation_nav.html.slim
pagy-5.6.7 lib/templates/foundation_nav.html.slim
pagy-5.6.6 lib/templates/foundation_nav.html.slim
pagy-5.6.5 lib/templates/foundation_nav.html.slim
pagy-5.6.4 lib/templates/foundation_nav.html.slim
pagy-5.6.3 lib/templates/foundation_nav.html.slim
pagy-5.6.2 lib/templates/foundation_nav.html.slim
pagy-5.6.1 lib/templates/foundation_nav.html.slim
pagy-5.6.0 lib/templates/foundation_nav.html.slim