Skip to content

Commit

Permalink
more documentation fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Mar 31, 2020
1 parent 246fca7 commit 721d01f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Expand Up @@ -96,6 +96,7 @@ <h1 id="site-title">{{ site.title | default: site.github.repository_name }}
<div id="toc">
<a href="{{ site.baseurl }}/index"><p {% if page.title == 'Basic Concepts' %}id="active"{% endif %} >Basic Concepts</p></a>
<a href="{{ site.baseurl }}/how-to"><p {% if page.title == 'How To' %}id="active"{% endif %} >How To</p></a>
<a href="{{ site.baseurl }}/migration-guide"><p {% if page.title == 'Migration Guide' %}id="active"{% endif %} >Migrate WillPaginate/Kaminari</p></a>
<a href="{{ site.baseurl }}/api"><p {% if page.title == 'API' %}id="active"{% endif %} >API</p></a>
<a href="{{ site.baseurl }}/api/pagy"><p class="indent1" {% if page.title == 'Pagy' %}id="active"{% endif %} >Pagy</p></a>
<a href="{{ site.baseurl }}/api/backend"><p class="indent1" {% if page.title == 'Pagy::Backend' %}id="active"{% endif %} >Pagy::Backend</p></a>
Expand All @@ -122,7 +123,6 @@ <h1 id="site-title">{{ site.title | default: site.github.repository_name }}
<a href="{{ site.baseurl }}/extras/support"><p class="indent1" {% if page.title == 'Support' %}id="active"{% endif %} >Support</p></a>
<a href="{{ site.baseurl }}/extras/trim"><p class="indent1" {% if page.title == 'Trim' %}id="active"{% endif %} >Trim</p></a>
<a href="{{ site.baseurl }}/extras/uikit"><p class="indent1" {% if page.title == 'UIkit' %}id="active"{% endif %} >UIkit</p></a>
<a href="{{ site.baseurl }}/migration-guide"><p {% if page.title == 'Migration Guide' %}id="active"{% endif %} >Migrate WillPaginate/Kaminari</p></a>
</div>

<a id="gitter" href="https://gitter.im/ruby-pagy/Lobby" rel="nofollow" target="_blank"><p>&#10145; Chat Support on Gitter &#10145;</p></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/frontend.md
Expand Up @@ -170,7 +170,7 @@ The pagy internal i18n is implemented around the `Pagy::I18n` constant. You may

#### Pagy::I18n.load configuration

By default pagy will render its output using the built-in `en` locale. If your app uses only `en` and you are fine with the built-in strings, you are done without configuring anything at all.
By default pagy will render its output using the built-in `en` locale. If your app uses only `en` and you are fine with the built-in strings, you are done without configuring anything at all and you can just skip this whole section.

If you need to load different built-in locales, and/or custom dictionary files or even non built-in languages and pluralizations, you can do it all by passing a few arguments to the `Pagy::I18n.load` method.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/javascript.md
Expand Up @@ -217,7 +217,7 @@ The following `pagy*_combo_nav_js` offer an alternative pagination UI that combi
- `pagy_materialize_combo_nav_js`
- `pagy_semantic_combo_nav_js`

They are the fastest and lighter `nav` on modern environments, recommended when you care about efficiency and server load _(see [Maximizing Performance](../how-to.md#maximizing-performance))_.
They are the fastest and lightest `nav` on modern environments, recommended when you care about efficiency and server load _(see [Maximizing Performance](../how-to.md#maximizing-performance))_.

Here is a screenshot (from the `bootstrap` extra):

Expand Down
2 changes: 1 addition & 1 deletion docs/api/pagy.md
Expand Up @@ -147,7 +147,7 @@ Which means:

- there is always a `page` #`1` in the pagination, even if it's empty
- `pages` and `last` are always at least both `1`
- the `series` array contains always at least the page #`1`, which for a single page is also the current page, thus a string. With `size: []` series returns `[]`
- the `series` array contains always at least the page #`1`, which for a single page is also the current page, thus a string. With `size: []` the `series` method returns `[]`
- `from` and `to` of an empty page are both `0`
- `prev` and `next` of a single page (not necessary an empty one) are both `nil` (i.e. there is no other page)

Expand Down
4 changes: 2 additions & 2 deletions docs/how-to.md
Expand Up @@ -136,7 +136,7 @@ Pagy can also work in any other scenario assuming that:

You can control the items per page with the `items` variable. (Default `20`)

You can set its default in the `pagy.rb` initializer _(see [Configuration](#global-configuration)_. For example:
You can set its default in the `pagy.rb` initializer _(see [Configuration](#global-configuration))_. For example:

```ruby
Pagy::VARS[:items] = 25
Expand Down Expand Up @@ -432,7 +432,7 @@ By default Pagy generates all the page links including the `page` param. If you

The `pagy_nav*` helpers are optimized for speed, and they are really fast. On the other hand editing a template might be easier when you have to customize the rendering, however every template system adds some inevitable overhead and it will be about 30-70% slower than using the related helper. That will still be dozens of times faster than the other gems, but... you should choose wisely.

Pagy provides the replacement templates for the `pagy_nav`, `pagy_bootstrap_nav`, `pagy_bulma_nav` and the `pagy_foundation_nav` helpers (available with the relative extras) in 3 flavors: `erb`, `haml` and `slim`.
Pagy provides the replacement templates for the `pagy_nav`, `pagy_bootstrap_nav`, `pagy_bulma_nav`, `pagy_foundation_nav`, and the `pagy_uikit_nav` helpers (available with the relative extras) in 3 flavors: `erb`, `haml` and `slim`.

They produce exactly the same output of the helpers, but since they are slower, using them wouldn't make any sense unless you need to change something. In that case customize a copy in your app, then use it as any other template: just remember to pass the `:pagy` local set to the `@pagy` object. Here are the links to the sources to copy:

Expand Down

0 comments on commit 721d01f

Please sign in to comment.