Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patricklindsay/will_paginate-materialize
Integrates the MaterializeCSS pagination component with will_paginate
https://github.com/patricklindsay/will_paginate-materialize
Last synced: 15 days ago
JSON representation
Integrates the MaterializeCSS pagination component with will_paginate
- Host: GitHub
- URL: https://github.com/patricklindsay/will_paginate-materialize
- Owner: patricklindsay
- License: mit
- Created: 2015-08-16T22:30:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-03T20:04:49.000Z (about 5 years ago)
- Last Synced: 2024-10-12T03:54:14.033Z (about 1 month ago)
- Language: Ruby
- Size: 22.5 KB
- Stars: 16
- Watchers: 2
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.mod
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# WillPaginate::Materialize
This gem integrates the [MaterializeCSS](https://github.com/Dogfalo/materialize) [pagination component](http://materializecss.com/pagination.html) with the [will_paginate](https://github.com/mislav/will_paginate) pagination gem.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'will_paginate-materialize', git: 'https://github.com/mldoscar/will_paginate-materialize', branch: 'master'
```And then execute:
$ bundle
## Usage
1. Install [Materialize-sass](https://github.com/mkhairi/materialize-sass) (if you haven't already)
2. Create a file named `will-paginate-materialize.rb` inside `config/initializers` and configure the iconset you want to use.
```ruby
WillPaginate::Materialize.configure do |config|
# Select one of the iconset you want to use
# Material Design Icons
config.iconset = :material_design
# FontAwesome Icons
config.iconset = :font_awesome
end
```3. Add the following to your application.scss file
```css
.pagination li.active a {
color: #fff;
}
```
4. **For Material Design iconset use:** Follow the instructions for installing this gem in order to have this icon style in the left or right arrows: https://github.com/Angelmmiguel/material_icons5. **For FontAwesome iconset use:** Follow the instructions for installing this gem in order to have this icon style in the left or right arrows: https://github.com/bokmann/font-awesome-rails
You're done! Use the will_paginate helper as you would otherwise.
```ruby
<%= will_paginate @collection %>
```## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/patricklindsay/will_paginate-materialize. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
### Further works
* Add additional specs## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).