Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Implement UIkit pagination (#164)
- Loading branch information
Showing
13 changed files
with
303 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: UIkit | ||
--- | ||
# UIkit Extra | ||
|
||
This extra adds nav helpers and templates for the UIkit [pagination component](https://getuikit.com/docs/pagination). | ||
|
||
## Synopsis | ||
|
||
See [extras](../extras.md) for general usage info. | ||
|
||
In the `pagy.rb` initializer: | ||
|
||
```ruby | ||
require 'pagy/extras/uikit' | ||
``` | ||
|
||
Render the navigation links in some view... | ||
with a fast helper: | ||
|
||
```erb | ||
<%== pagy_uikit_nav(@pagy) %> | ||
``` | ||
|
||
or with a template: | ||
|
||
```erb | ||
<%== render partial: 'pagy/uikit_nav', locals: {pagy: @pagy} %> | ||
``` | ||
|
||
## Files | ||
|
||
- [uikit.rb](https://github.com/ddnexus/pagy/blob/master/lib/pagy/extras/uikit.rb) | ||
- [uikit_nav.html.erb](https://github.com/ddnexus/pagy/blob/master/lib/templates/uikit.html.erb) (optional template) | ||
- [uikit_nav.html.haml](https://github.com/ddnexus/pagy/blob/master/lib/templates/uikit_nav.html.haml) (optional template) | ||
- [uikit_nav.html.slim](https://github.com/ddnexus/pagy/blob/master/lib/templates/uikit_nav.html.slim) (optional template) | ||
|
||
## Methods | ||
|
||
This extra adds nav helper to the `Pagy::Frontend` module. You can customize it by direct overriding in your own view helper. | ||
|
||
### pagy_uikit_nav(pagy) | ||
|
||
This method is the same as the `pagy_nav`, but customized for UIkit. | ||
|
||
The `uikit_nav.*` templates produce the same output, and can be used as an easier (but slower) starting point to override it. See [Using Templates](../how-to.md#using-templates). | ||
|
||
|
||
### pagy_uikit_nav_js(pagy, ...) | ||
|
||
This method is the same as the `pagy_nav_js`, but customized for the UIkit framework. | ||
|
||
See more details in the [javascript navs](navs.md#javascript-navs) documentation. | ||
|
||
|
||
### pagy_uikit_combo_nav_js(pagy, ...) | ||
|
||
This method is the same as the `pagy_combo_nav_js`, but customized for the UIkit framework. | ||
|
||
Here is an example: | ||
|
||
![uikit_combo_nav_js](../assets/images/uikit_combo_nav_js-g.png) | ||
|
||
See more details in the [javascript compact navs](navs.md#javascript-combo-navs) documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.