Sha256: efaf5c14a48648a841e274c87dc730bafed9650951c6826f59e1e284e7e6211f

Contents?: true

Size: 1.44 KB

Versions: 21

Compression:

Stored size: 1.44 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-nav-bulma.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

21 entries across 21 versions & 1 rubygems

Version Path
pagy-1.1.0 lib/templates/nav_bulma.html.haml
pagy-1.0.0 lib/templates/nav_bulma.html.haml
pagy-0.23.1 lib/templates/nav_bulma.html.haml
pagy-0.23.0 lib/templates/nav_bulma.html.haml
pagy-0.22.0 lib/templates/nav_bulma.html.haml
pagy-0.21.0 lib/templates/nav_bulma.html.haml
pagy-0.20.0 lib/templates/nav_bulma.html.haml
pagy-0.19.4 lib/templates/nav_bulma.html.haml
pagy-0.19.3 lib/templates/nav_bulma.html.haml
pagy-0.19.2 lib/templates/nav_bulma.html.haml
pagy-0.19.1 lib/templates/nav_bulma.html.haml
pagy-0.19.0 lib/templates/nav_bulma.html.haml
pagy-0.18.0 lib/templates/nav_bulma.html.haml
pagy-0.17.0 lib/pagy/extras/templates/nav_bulma.html.haml
pagy-0.16.0 lib/pagy/extras/templates/nav_bulma.html.haml
pagy-0.15.1 lib/pagy/extras/templates/nav_bulma.html.haml
pagy-0.15.0 lib/pagy/extras/templates/nav_bulma.html.haml
pagy-0.14.0 lib/pagy/extras/templates/nav_bulma.html.haml
pagy-0.13.1 lib/pagy/extras/templates/nav_bulma.html.haml
pagy-0.13.0 lib/pagy/extras/templates/nav_bulma.html.haml