Sha256: 271802e7aab768837800d4b6a9d78bd29a5c503b8a501b73ad1e5228a7b2ce6c

Contents?: true

Size: 1.4 KB

Versions: 111

Compression:

Stored size: 1.4 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-bulma-nav.pagination.is-centered role="navigation" aria-label="pagination"

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

  - if pagy.next
    == link.call(pagy.next, pagy_t('pagy.nav.next'), 'class="pagination-next" aria-label="next page"')
  - else
    a.pagination-next disabled="disabled" == pagy_t('pagy.nav.next')

  ul.pagination-list

    - 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, item, %(class="pagination-link" aria-label="goto page #{item}")

      - elsif item.is_a?(String)                 # current page
        li == link.call item, item, %(class="pagination-link is-current" aria-label="page #{item}" aria-current="page")

      - elsif item == :gap                       # page gap
        li
          span.pagination-ellipsis == pagy_t('pagy.nav.gap')

Version data entries

111 entries across 111 versions & 2 rubygems

Version Path
pagy-3.9.0 lib/templates/bulma_nav.html.slim
pagy-3.8.3 lib/templates/bulma_nav.html.slim
pagy-3.8.2 lib/templates/bulma_nav.html.slim
pagy-3.8.1 lib/templates/bulma_nav.html.slim
pagy-3.8.0 lib/templates/bulma_nav.html.slim
pagy-3.7.5 lib/templates/bulma_nav.html.slim
pagy-3.7.4 lib/templates/bulma_nav.html.slim
pagy-3.7.3 lib/templates/bulma_nav.html.slim
pagy-3.7.2 lib/templates/bulma_nav.html.slim
pagy-3.7.1 lib/templates/bulma_nav.html.slim
pagy-3.7.0 lib/templates/bulma_nav.html.slim
pagy-3.6.0 lib/templates/bulma_nav.html.slim
pagy-3.5.1 lib/templates/bulma_nav.html.slim
pagy-3.5.0 lib/templates/bulma_nav.html.slim
pagy-3.4.1 lib/templates/bulma_nav.html.slim
pagy-3.4.0 lib/templates/bulma_nav.html.slim
pagy-3.3.2 lib/templates/bulma_nav.html.slim
pagy-3.3.1 lib/templates/bulma_nav.html.slim
pagy-3.3.0 lib/templates/bulma_nav.html.slim
pagy-3.2.1 lib/templates/bulma_nav.html.slim