Skip to content

Commit

Permalink
renamed bulma templates and updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Nov 30, 2018
1 parent dbad41a commit 95045c3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions docs/extras/bulma.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ with a fast helper:
or with a template:

```erb
<%== render 'pagy/nav_bulma', locals: {pagy: @pagy} %>
<%== render 'pagy/bulma_nav', locals: {pagy: @pagy} %>
```

Configure [javascript](../extras.md#javascript) if you use `pagy_bulma_responsive_nav` or `pagy_bulma_compact_nav`.
Expand All @@ -37,9 +37,9 @@ Configure [javascript](../extras.md#javascript) if you use `pagy_bulma_responsiv
This extra is composed of 4 files:

- [bulma.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/bulma.rb)
- [nav_bulma.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bulma.html.erb) (optional template)
- [nav_bulma.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bulma.html.haml) (optional template)
- [nav_bulma.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bulma.html.slim) (optional template)
- [bulma_nav.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/bulma_nav.html.erb) (optional template)
- [bulma_nav.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/bulma_nav.html.haml) (optional template)
- [bulma_nav.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/bulma_nav.html.slim) (optional template)

## Methods

Expand All @@ -49,7 +49,7 @@ This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize

This method is the same as the `pagy_nav`, but customized for Bulma.

The `nav_bulma.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it.
The `bulma_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it.

### pagy_bulma_compact_nav(pagy, ...)

Expand Down
6 changes: 3 additions & 3 deletions docs/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ They produce exactly the same output of the helpers, but since they are slower,
- [bootstrap_nav.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/bootstrap_nav.html.haml)
- [bootstrap_nav.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/bootstrap_nav.html.slim)
- `bulma`
- [nav_bulma.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bulma.html.erb)
- [nav_bulma.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bulma.html.haml)
- [nav_bulma.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_bulma.html.slim)
- [bulma_nav.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/bulma_nav.html.erb)
- [bulma_nav.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/bulma_nav.html.haml)
- [bulma_nav.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/bulma_nav.html.slim)
- `foundation`
- [nav_foundation.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_foundation.html.erb)
- [nav_foundation.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_foundation.html.haml)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Usage: link.call( page_number [, text [, extra_attributes_string ]])
-%>
<% link = pagy_link_proc(pagy) -%>
<%# -%><nav class="pagy-nav-bulma pagination is-centered" role="navigation" aria-label="pagination">
<%# -%><nav class="pagy-nav-bulma 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 class="pagination-previous" disabled><%== pagy_t('pagy.nav.prev') %></a>
<% end -%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- link = pagy_link_proc(pagy)

%nav.pagy-nav-bulma.pagination.is-centered{:role => "navigation", "aria-label" => "pagination"}
%nav.pagy-nav-bulma.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"')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- link = pagy_link_proc(pagy)

nav.pagy-nav-bulma.pagination.is-centered role="navigation" aria-label="pagination"
nav.pagy-nav-bulma.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"')
Expand Down

0 comments on commit 95045c3

Please sign in to comment.