blog-rekahsoft-ca/templates/partials/pagination.html
Collin J. Doering 485bab9b98 Began theming pagination first/last/next/previous
Added spans that will show "First Page", "Previous Page", "Next Page",
"Last Page" when its unavailable. Eg. the user is on the last page so
there should be no link to click and instead just place holder text.

The css uses flexbox display and thus only works in modern
browsers (see: http://caniuse.com/#feat=flexbox). This may be changed in
the future as to support more browsers (IE9+ specifically).

Images/Icons for "First Page", "Previous Page", "Next Page", "Last Page"
have yet to be set (though would preferably be done in pure CSS).

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-01-24 18:36:55 -05:00

40 lines
1.2 KiB
HTML

<div class='container' id='pagination'>
$if(firstPageUrl)$
$if(firstPageUrlVirtualPath)$
<a class='firstPage' href='$firstPageUrlVirtualPath$'>First Page</a>
$else$
<a class='firstPage' href='$firstPageUrl$'>First Page</a>
$endif$
$else$
<span class="on-first-page">First Page</span>
$endif$
$if(previousPageUrl)$
$if(previousPageUrlVirtualPath)$
<a class='previousPage' href='$previousPageUrlVirtualPath$'>Previous Page</a>
$else$
<a class='previousPage' href='$previousPageUrl$'>Previous Page</a>
$endif$
$else$
<span class="no-previous-page">Previous Page</span>
$endif$
$if(nextPageUrl)$
$if(nextPageUrlVirtualPath)$
<a class='nextPage' href='$nextPageUrlVirtualPath$'>Next Page</a>
$else$
<a class='nextPage' href='$nextPageUrl$'>Next Page</a>
$endif$
$else$
<span class="no-next-page">Next Page</span>
$endif$
$if(lastPageUrl)$
$if(lastPageUrlVirtualPath)$
<a class='lastPage' href='$lastPageUrlVirtualPath$'>Last Page</a>
$else$
<a class='lastPage' href='$lastPageUrl$'>Last Page</a>
$endif$
$else$
<span class="on-last-page">Last Page</span>
$endif$
</div>