yesod-paginator-1.1.2.2: A pagination approach for yesod
Safe HaskellNone
LanguageHaskell2010

Yesod.Paginator.Widgets

Synopsis

Documentation

type PaginationWidget site a = Pages a -> WidgetFor site () Source #

simple :: Natural -> PaginationWidget m a Source #

Simple widget, limited to show the given number of total page elements

Pseudo-HTML for simple 5, on page 1:

  <ul .pagination>
    <li .prev .disabled><a>«
    <li .active .disabled><a>1
    <li .next><a href="?p=2">2
    <li .next><a href="?p=3">3
    <li .next><a href="?p=4">4
    <li .next><a href="?p=5">5
    <li .next><a href="?p=2">»

And page 7:

  <ul .pagination>
    <li .prev><a href="?p=6">«
    <li .prev><a href="?p=5">5
    <li .prev><a href="?p=6">6
    <li .active .disabled><a>7
    <li .next><a href="?p=8">8
    <li .next><a href="?p=9">9
    <li .next><a href="?p=8">»

ellipsed :: Natural -> PaginationWidget m a Source #

Show pages before and after, ellipsis, and first/last

Exported for testing