Skip to content

Commit

Permalink
renamed foundation 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 f984f83 commit 5481f40
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions docs/extras/foundation.md
Expand Up @@ -25,7 +25,7 @@ with a fast helper:
or with a template:

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

Configure [javascript](../extras.md#javascript) if you use `pagy_foundation_responsive_nav` or `pagy_foundation_compact_nav`.
Expand All @@ -35,9 +35,9 @@ Configure [javascript](../extras.md#javascript) if you use `pagy_foundation_resp
This extra is composed of 4 files:

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

## Methods

Expand All @@ -47,7 +47,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 Foundation.

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

### pagy_foundation_compact_nav(pagy, ...)

Expand Down
6 changes: 3 additions & 3 deletions docs/how-to.md
Expand Up @@ -345,9 +345,9 @@ They produce exactly the same output of the helpers, but since they are slower,
- [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)
- [nav_foundation.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/nav_foundation.html.slim)
- [foundation_nav.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/foundation_nav.html.erb)
- [foundation_nav.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/foundation_nav.html.haml)
- [foundation_nav.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/foundation_nav.html.slim)

If you need to try/compare an unmodified built-in template, you can render it right from the Pagy gem with:

Expand Down
Expand Up @@ -6,7 +6,7 @@
Usage: link.call( page_number [, text [, extra_attributes_string ]])
-%>
<% link = pagy_link_proc(pagy) -%>
<%# -%><nav class="pagy-nav-foundation" role="navigation" aria-label="Pagination">
<%# -%><nav class="pagy-nav-foundation pagy-foundation-nav" role="navigation" aria-label="Pagination">
<%# -%> <ul class="pagination">
<% if pagy.prev -%> <li class="prev"><%== link.call(pagy.prev, pagy_t('pagy.nav.prev'), 'aria-label="previous"') %></li>
<% else -%> <li class="prev disabled"><%== pagy_t('pagy.nav.prev') %></li>
Expand Down
Expand Up @@ -6,7 +6,7 @@
- link = pagy_link_proc(pagy)

%nav.pagy-nav-foundation{"role" => "navigation", "aria-label" => "Pagination"}
%nav.pagy-nav-foundation.pagy-foundation-nav{"role" => "navigation", "aria-label" => "Pagination"}

%ul.pagination

Expand Down
Expand Up @@ -6,7 +6,7 @@
- link = pagy_link_proc(pagy)

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

ul.pagination

Expand Down

0 comments on commit 5481f40

Please sign in to comment.