© 2017-2019 Domizio DemichelisMIT License

Materialize Extra

This extra adds 3 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_nav_js(@pagy) %>
<%== pagy_materialize_combo_nav_js(@pagy) %>

Configure javascript if you use pagy_materialize_nav_js or pagy_materialize_combo_nav_js.

Files

Methods

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

pagy_materialize_nav(pagy)

This method is the same as the pagy_nav, but customized for Materialize.

pagy_materialize_nav_js(pagy, …)

This method is the same as the pagy_nav_js, but customized for the Materialize CSS framework.

See more details in the javascript navs documentation.

pagy_materialize_combo_nav_js(pagy, …)

This method is the same as the pagy_combo_nav_js, but customized for the Materialize CSS framework.

Here is an example:

materialize_combo_nav_js

See more details in the compact_navs_js documentation.