Project

nether

0.01
No commit activity in last 3 years
No release in over 3 years
Nether is a rails engine for easily adding endless page functionality to paginated content.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 3.1.0
 Project Readme

Nether¶ ↑

Nether is a rails engine for easily adding endless page functionality to paginated content. It uses jquery.pageless and is based heavily on their demo application.

Requirements¶ ↑

Currently only supports apps using the assets pipeline.

Installation¶ ↑

Add the following to your Gemfile and run the bundle command.

gem 'nether'

Once the gem is installed execute the generator to install the js files and images.

rails generate nether:install

Usage (will_paginate)¶ ↑

Endless page functionality is handled by a helper function that takes three arguments by default. The number of pages, the path to get more content and the css id of the dom object to render. There is also an optional fourth argument for specifying the dom object containing the content to be rendered.

To use the helper add the following to your view after the will paginate helper, replacing variables as necessary.

<%= nether(@articles.total_pages, articles_path, "#content") %>

You must also add a helper to the action handling the pagination. The helper takes the partial to render as an argument and an optional argument to delay rendering.

render_nether("articles/article")

Usage (kaminari)¶ ↑

Usage is the same as for will_paginate, however the method num_pages is instead used to return the number of pages.

<%= nether(@articles.num_pages, articles_path, "#content") %>

Sticky Footers¶ ↑

Nether now has inbuilt support for sticky footers. To use the nether sticky footer functionality you must first stickify your application.

rails generate nether:stickify

This will install a css file into your stylesheets directory, after which you can simply use the nether block helpers around your content.

<%= nether_sticky_wrap do %>
  # header content
  <%= nether_sticky_content do %>
    # body content
  <% end %>
<% end %>

<%= nether_sticky_footer do %>
  # footer content
<% end %>

Internationalization¶ ↑

By default, Nether displays a message when loading data. This message can be changed by editing the locales file under the key “nether.loader_msg”

es:
  nether:
    loader_msg: 'Cargando datos...'

Help¶ ↑

  • You will find an example app at nether_example.

  • The wiki contains other useful information and examples.