Skip to content

Commit

Permalink
deprecated and renamed navs helpers in code, tests and docs; renamed …
Browse files Browse the repository at this point in the history
…navs extension as plain; added :pagy_plain_nav alias of :pagy_nav
  • Loading branch information
ddnexus committed Nov 30, 2018
1 parent 4bc72af commit 6e3e1e4
Show file tree
Hide file tree
Showing 17 changed files with 220 additions and 209 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ Use the official extras, or write your own in just a few lines. Extras add speci

### Frontend Extras

- [bootstrap](http://ddnexus.github.io/pagy/extras/bootstrap): Nav helpers and templates for the Bootstrap [pagination component](https://getbootstrap.com/docs/4.1/components/pagination)
- [bulma](http://ddnexus.github.io/pagy/extras/bulma): Nav helpers and templates for the Bulma CSS [pagination component](https://bulma.io/documentation/components/pagination)
- [foundation](http://ddnexus.github.io/pagy/extras/foundation): Nav helpers and templates for the Foundation [pagination component](https://foundation.zurb.com/sites/docs/pagination.html)
- [materialize](http://ddnexus.github.io/pagy/extras/materialize): Nav helpers for the Materialize CSS [pagination component](https://materializecss.com/pagination.html)
- [navs](http://ddnexus.github.io/pagy/extras/navs): Responsive and compact generic/unstyled nav helpers
- [semantic](http://ddnexus.github.io/pagy/extras/semantic): Nav helpers for the Semantic UI CSS [pagination component](https://semantic-ui.com/collections/menu.html)
- [bootstrap](http://ddnexus.github.io/pagy/extras/bootstrap): Add nav, responsive and compact helpers for the Bootstrap [pagination component](https://getbootstrap.com/docs/4.1/components/pagination)
- [bulma](http://ddnexus.github.io/pagy/extras/bulma): Add nav, responsive and compact helpers for the Bulma CSS [pagination component](https://bulma.io/documentation/components/pagination)
- [foundation](http://ddnexus.github.io/pagy/extras/foundation): Add nav, responsive and compact helpers for the Foundation [pagination component](https://foundation.zurb.com/sites/docs/pagination.html)
- [materialize](http://ddnexus.github.io/pagy/extras/materialize): Add nav responsive and compact helpers for the Materialize CSS [pagination component](https://materializecss.com/pagination.html)
- [plain](http://ddnexus.github.io/pagy/extras/plain): Add responsive and compact plain/unstyled helpers
- [semantic](http://ddnexus.github.io/pagy/extras/semantic): Add nav, responsive and compact helpers for the Semantic UI CSS [pagination component](https://semantic-ui.com/collections/menu.html)

### Feature Extras

Expand All @@ -116,9 +116,9 @@ Use the official extras, or write your own in just a few lines. Extras add speci

Besides the classic pagination `nav`, Pagy offers a few ready to use alternatives like:

- [compact nav](http://ddnexus.github.io/pagy/extras/navs#compact-navs): An alternative UI that combines the pagination feature with the navigation info in one compact element:<br>![pagy-compact](docs/assets/images/pagy-compact-w.png)
- [compact nav](http://ddnexus.github.io/pagy/extras/plain#compact-navs): An alternative UI that combines the pagination feature with the navigation info in one compact element:<br>![pagy-compact](docs/assets/images/pagy-compact-w.png)

- [responsive nav](http://ddnexus.github.io/pagy/extras/navs#responsive-navs): On resize, the number of page links adapts in real-time to the available window or container width:<br>![pagy-responsive](docs/assets/images/pagy-responsive-w.png)
- [responsive nav](http://ddnexus.github.io/pagy/extras/plain#responsive-navs): On resize, the number of page links adapts in real-time to the available window or container width:<br>![pagy-responsive](docs/assets/images/pagy-responsive-w.png)

## Resources

Expand Down
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1 id="site-title">{{ site.title | default: site.github.repository_name }} <a c
<a href="{{ site.baseurl }}/extras/items"><p class="indent1" {% if page.title == 'Items' %}id="active"{% endif %} >Items</p></a>
<a href="{{ site.baseurl }}/extras/overflow"><p class="indent1" {% if page.title == 'Overflow' %}id="active"{% endif %} >Overflow</p></a>
<a href="{{ site.baseurl }}/extras/materialize"><p class="indent1" {% if page.title == 'Materialize' %}id="active"{% endif %} >Materialize</p></a>
<a href="{{ site.baseurl }}/extras/navs"><p class="indent1" {% if page.title == 'Navs' %}id="active"{% endif %} >Navs</p></a>
<a href="{{ site.baseurl }}/extras/plain"><p class="indent1" {% if page.title == 'Plain' %}id="active"{% endif %} >Plain</p></a>
<a href="{{ site.baseurl }}/extras/searchkick"><p class="indent1" {% if page.title == 'Searchkick' %}id="active"{% endif %} >Searchkick</p></a>
<a href="{{ site.baseurl }}/extras/semantic"><p class="indent1" {% if page.title == 'Semantic' %}id="active"{% endif %} >Semantic</p></a>
<a href="{{ site.baseurl }}/extras/trim"><p class="indent1" {% if page.title == 'Trim' %}id="active"{% endif %} >Trim</p></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/countless.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The available values for the `:overflow` variable are `:empty_page` and `:except

### Features witout support

The `pagy_info` and all the `pagy_nav_compact*` helpers are not supported.
The `pagy_info` and all the `pagy_plain_compact_nav*` helpers are not supported.

## How countless pagination works

Expand Down
14 changes: 7 additions & 7 deletions docs/extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ Pagy comes with a few optional extensions/extras:
| Extra | Description | Links |
|:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `array` | Paginate arrays efficiently avoiding expensive array-wrapping and without overriding | [array.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/array.rb), [documentation](extras/array.md) |
| `bootstrap` | Nav, responsive and compact helpers and templates for the Bootstrap [pagination component](https://getbootstrap.com/docs/4.1/components/pagination) | [bootstrap.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/bootstrap.rb), [documentation](extras/bootstrap.md) |
| `bulma` | Nav, responsive and compact helpers and templates for the Bulma [pagination component](https://bulma.io/documentation/components/pagination) | [bulma.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/bulma.rb), [documentation](extras/bulma.md) |
| `countless` | Paginate without any count, saving one query per rendering | [countless.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/countless.rb), [documentation](extras/countless.md) |
| `bootstrap` | Add nav, responsive and compact helpers for the Bootstrap [pagination component](https://getbootstrap.com/docs/4.1/components/pagination) | [bootstrap.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/bootstrap.rb), [documentation](extras/bootstrap.md) |
| `bulma` | Add nav, responsive and compact helpers for the Bulma [pagination component](https://bulma.io/documentation/components/pagination) | [bulma.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/bulma.rb), [documentation](extras/bulma.md) |
| `countless` | Paginate without any count, saving one query per rendering | [countless.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/countless.rb), [documentation](extras/countless.md) |
| `elasticsearch_rails` | Paginate `elasticsearch_rails` gem results efficiently | [elasticsearch_rails.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/elasticsearch_rails.rb), [documentation](extras/elasticsearch_rails.md) |
| `foundation` | Nav, responsive and compact helpers and templates for the Foundation [pagination component](https://foundation.zurb.com/sites/docs/pagination.html) | [foundation.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/foundation.rb), [documentation](extras/foundation.md) |
| `foundation` | Add nav, responsive and compact helpers for the Foundation [pagination component](https://foundation.zurb.com/sites/docs/pagination.html) | [foundation.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/foundation.rb), [documentation](extras/foundation.md) |
| `i18n` | Use the `I18n` gem instead of the pagy implementation | [i18n.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/i81n.rb), [documentation](extras/i18n.md) |
| `items` | Allow the client to request a custom number of items per page with a ready to use selector UI | [items.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/items.rb), [documentation](extras/items.md) |
| `materialize` | Nav, responsive and compact helpers for the Materialize CSS [pagination component](https://materializecss.com/pagination.html) | [materialize.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/materialize.rb), [documentation](extras/materialize.md) |
| `navs` | Add responsive and compact generic/unstyled nav helpers | [navs.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/navs.rb), [documentation](extras/navs.md) |
| `materialize` | Add nav, responsive and compact helpers for the Materialize CSS [pagination component](https://materializecss.com/pagination.html) | [materialize.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/materialize.rb), [documentation](extras/materialize.md) |
| `overflow` | Allow for easy handling of overflowing pages | [overflow.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/overflow.rb), [documentation](extras/overflow.md) |
| `plain` | Add responsive and compact plain/unstyled helpers | [plain.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/plain.rb), [documentation](extras/plain.md) |
| `searchkick` | Paginate arrays efficiently avoiding expensive array-wrapping and without overriding | [searchkick.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/searchkick.rb), [documentation](extras/searchkick.md) |
| `semantic` | Nav helpers for the Semantic UI CSS [pagination component](https://semantic-ui.com/collections/menu.html) | [semantic.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/semantic.rb), [documentation](extras/semantic.md) |
| `semantic` | Add nav, responsive and compact helpers for the Semantic UI CSS [pagination component](https://semantic-ui.com/collections/menu.html) | [semantic.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/semantic.rb), [documentation](extras/semantic.md) |
| `trim` | Remove the `page=1` param from links | [trim.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/trim.rb), [documentation](extras/trim.md) |

## Synopsis
Expand Down
10 changes: 5 additions & 5 deletions docs/extras/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize

### pagy_bootstrap_nav(pagy)

This method is the same as the `pagy_nav`, but customized for Bootstrap.
This method is the same as the `pagy_nav`/`pagy_plain_nav`, but customized for Bootstrap.

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

### pagy_bootstrap_compact_nav(pagy, ...)

This method is the same as the `pagy_nav_compact`, but customized for the Bootstrap framework.
This method is the same as the `pagy_plain_compact_nav`, but customized for the Bootstrap framework.

Here is an example:

![pagy-compact](../assets/images/pagy-compact-g.png)

See more details in the [compact navs](navs.md#compact-navs) documentation.
See more details in the [compact navs](plain.md#compact-navs) documentation.

### pagy_bootstrap_responsive_nav(pagy, ...)

This method is the same as the `pagy_nav_responsive`, but customized for the Bootstrap framework.
This method is the same as the `pagy_plain_responsive_nav`, but customized for the Bootstrap framework.

See more details in the [responsive navs](navs.md#responsive-navs) documentation.
See more details in the [responsive navs](plain.md#responsive-navs) documentation.

### Optional Template Files

Expand Down
10 changes: 5 additions & 5 deletions docs/extras/bulma.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,25 @@ This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize

### pagy_bulma_nav(pagy)

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

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, ...)

This method is the same as the `pagy_nav_compact`, but customized for the Bulma CSS framework.
This method is the same as the `pagy_plain_compact_nav`, but customized for the Bulma CSS framework.

Here is an example:

![pagy-compact-bulma](../assets/images/pagy-compact-bulma-g.png)

See more details in the [compact navs](navs.md#compact-navs) documentation.
See more details in the [compact navs](plain.md#compact-navs) documentation.

### pagy_bulma_responsive_nav(pagy, ...)

This method is the same as the `pagy_nav_responsive`, but customized for the Bulma CSS framework.
This method is the same as the `pagy_plain_responsive_nav`, but customized for the Bulma CSS framework.

See more details in the [responsive navs](navs.md#responsive-navs) documentation.
See more details in the [responsive navs](plain.md#responsive-navs) documentation.

### Optional Template Files

Expand Down
10 changes: 5 additions & 5 deletions docs/extras/foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize

### pagy_foundation_nav(pagy)

This method is the same as the `pagy_nav`, but customized for Foundation.
This method is the same as the `pagy_nav`/`pagy_plain_nav`, but customized for Foundation.

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, ...)

This method is the same as the `pagy_nav_compact`, but customized for the Foundation framework.
This method is the same as the `pagy_plain_compact_nav`, but customized for the Foundation framework.

See more details in the [compact navs](navs.md#compact-navs) documentation.
See more details in the [compact navs](plain.md#compact-navs) documentation.

### pagy_foundation_responsive_nav(pagy, ...)

This method is the same as the `pagy_nav_responsive`, but customized for the Foundation framework.
This method is the same as the `pagy_plain_responsive_nav`, but customized for the Foundation framework.

See more details in the [responsive navs](navs.md#responsive-navs) documentation.
See more details in the [responsive navs](plain.md#responsive-navs) documentation.

### Optional Template Files

Expand Down
10 changes: 5 additions & 5 deletions docs/extras/materialize.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ This extra adds 3 nav helpers to the `Pagy::Frontend` module. You can customize

### pagy_materialize_nav(pagy)

This method is the same as the `pagy_nav`, but customized for Materialize.
This method is the same as the `pagy_nav`/`pagy_plain_nav`, but customized for Materialize.

### pagy_materialize_compact_nav(pagy, ...)

This method is the same as the `pagy_nav_compact`, but customized for the Materialize CSS framework.
This method is the same as the `pagy_plain_compact_nav`, but customized for the Materialize CSS framework.

Here is an example:

![pagy-compact-materialize](../assets/images/pagy-compact-materialize-g.png)

See more details in the [compact navs](navs.md#compact-navs) documentation.
See more details in the [compact navs](plain.md#compact-navs) documentation.

### pagy_materialize_responsive_nav(pagy, ...)

This method is the same as the `pagy_nav_responsive`, but customized for the Materialize CSS framework.
This method is the same as the `pagy_plain_responsive_nav`, but customized for the Materialize CSS framework.

See more details in the [responsive navs](navs.md#responsive-navs) documentation.
See more details in the [responsive navs](plain.md#responsive-navs) documentation.

## Templates

Expand Down
Loading

0 comments on commit 6e3e1e4

Please sign in to comment.