Comments (12)
Right, materialize has pagination built in. MDL does not. The former will be easy to add, so I’ll do that for now.
from pagy.
Yes! Your contribution is very welcome!
It would be nice if you could add some more details about what and how you plan to add, in order to match the overall policy about extras.
Please let me know if you need any help. Thank you!
from pagy.
I was thinking of implementing these:
https://getmdl.io/
https://materializecss.com/
I personally use mdl, but I bet people would like to have a few out of the box to make a transition to pagy easier.
I noticed you've got helper methods for bootstrap as well as partials. Any reason for not using one or the other?
from pagy.
Helpers are just concatenating strings with a simple logic in pure ruby with no framework dependencies. They are really fast, but less easy to read and write.
Templates use a template engine, hence they have an overhead that makes them 40-80% slower than helpers. That means that they are still a lot faster than using the other gems, but they are slower and use more memory than helpers. They are easier to read and write, which makes them useful for unskilled users that need some quick and easy customization.
For that reason you might want to provide both in your extra, although helpers are a mandatory component for an extra, while templates are just a nice addition.
from pagy.
@mattboldt Any progress? Please, let me know if I can help. Thanks.
from pagy.
Sorry; I'm stumbling a little bit on the code. Our styles are very different and it's been difficult to try and match the existing extras. On top of that, the MDL library does not already have a pagination component. I might start with Materializecss instead.
from pagy.
Unless I am missing something, that looks quite easy.
According to the materializecss pagination doc, you should just duplicate and rename the bootstrap extra like materializecss
extra, then rename the pagy_nav_bootstrap
to pagy_nav_materializecss
and edit its strings as indicated in the materializecss pagination doc.
Replace the bootstrap-specific classes (like page-link
and page-item
) with the materializecss classes and leave all the rest as it is, wrapped in the nav
tag.
Please, let me know if you need any help. Thanks.
from pagy.
Great! Thanks!
from pagy.
@mattboldt News?
from pagy.
After no activity for so long I decided to write it myself.
from pagy.
Really sorry, I just haven't had time for dev work outside of my day job. Sorry for holding this up, and thank you for adding the feature!
from pagy.
Implemented in dev
. No optional templates though... it would be a nice addition when someone will have time.
from pagy.
Related Issues (20)
- Add ARIA attributes to foundation helpers
- Add ARIA attributes to materialize helpers
- Add ARIA attributes to semantic helper
- Add ARIA attributes to uikit helper
- Bug: pagy_search wrong number of arguments HOT 10
- Bug: Alias for an aggregate result is removed HOT 9
- Bug: Issue with Arel scope passed to pagy method HOT 3
- Docs: 7.0 has an undocumented breaking change for active page styling HOT 5
- Docs: Which branch should PRs be made against? HOT 3
- Docs: Update performance metrics HOT 5
- Trim doesn't call with pagy_nav_js when first page is active
- Bug: Adapt with Mongoid add extention HOT 1
- Bug: Pagy::Backend#pagy_get_vars `count_args` gets ignored HOT 3
- Docs: https://ddnexus.github.io/pagy/quick-start/#configure HOT 1
- Bug: Missing initializer in documentation HOT 1
- Bug: wrong number of arguments (given 2, expected 0) HOT 2
- Bug: wrong number of arguments (given 2, expected 0) HOT 1
- Bug: Pagy not working with Geocoder gem
- Bug: Undocumented backwards-incompatible change of empty "page" parameter introduced in 6.4.0 HOT 3
- Docs: lost section about wrap existing pagination with pagy_calendar HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pagy.