© 2018 Domizio DemichelisMIT License

Materialize Extra

This extra adds nav helpers for the Materialize CSS pagination component.

Synopsis

See extras for general usage info.

In the pagy.rb initializer:

require 'pagy/extras/materialize'

Render the navigation links in some view… with a fast helper:

<%== pagy_materialize_nav(@pagy) %>
<%== pagy_materialize_responsive_nav(@pagy) %>
<%== pagy_materialize_compact_nav(@pagy) %>

Configure javascript if you use pagy_materialize_responsive_nav or pagy_materialize_compact_nav.

Files

This extra is composed of 1 file:

Methods

This extra adds 3 nav helpers to the Pagy::Frontend module. You can customize them by overriding them directly in your own view helper.

pagy_materialize_nav(pagy)

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_plain_compact_nav, but customized for the Materialize CSS framework.

Here is an example:

pagy-compact-materialize

See more details in the compact navs documentation.

pagy_materialize_responsive_nav(pagy, …)

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 documentation.

Templates

There is currently no template for Materialize. Please, create a Pull Request or an Issue requesting it.