Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mindplay-dk/pager

Generates HTML pager buttons/links/whatever
https://github.com/mindplay-dk/pager

Last synced: 3 months ago
JSON representation

Generates HTML pager buttons/links/whatever

Awesome Lists containing this project

README

        

mindplay/pager
==============

[![Build Status](https://travis-ci.org/mindplay-dk/pager.svg?branch=master)](https://travis-ci.org/mindplay-dk/pager)

How many times have I written pagers? Too many.

So here's a distilled abstract base-class for pagers, along with the two kinds of
pagers I have used most frequently: one for `` tags, and one for `` tags.

Personally I like `` pagers, which typically require no JavaScript - it can
produce markup along the lines of this:

« 




5 ⋯ 
10 
»

Your average everyday link pager produces markup like this:

« 
1 
2 
3 
»

The markup in both cases is pretty minimal - I didn't want a bunch of configurable
CSS class-names, a container div, or boatloads of other options, but deriving your
own custom pager-classes should be pretty painless. (No guarantees, I said it *should* be.)