}
$url = $stripped;
-
$data = array();
+
function _l(&$d, $name, $url, $text, $class = '') {
if (strpos($url, '?') === false && ($pos = strpos($url, '&')) !== false) {
$url = substr($url, 0, $pos) . '?' . substr($url, $pos + 1);
$numstart = 1;
$numstop = $numpages;
- if ($numpages > 14) {
- $numstart = (($pagenum > 7) ? ($pagenum - 7) : 1);
- $numstop = (($pagenum > ($numpages - 7)) ? $numpages : ($numstart + 14));
+ // Limit the number of displayed page number buttons.
+ if ($numpages > 8) {
+ $numstart = (($pagenum > 4) ? ($pagenum - 4) : 1);
+ $numstop = (($pagenum > ($numpages - 7)) ? $numpages : ($numstart + 8));
}
$pages = array();
}
/* Pagination improvements */
+.pagination {
+ text-align: center;
+ display: block;
+}
.pagination > li > a,
.pagination > li > span {
- color: $link_color;
-}
-.pagination>.active>a,
-.pagination>.active>a:focus,
-.pagination>.active>a:hover,
-.pagination>.active>span,
-.pagination>.active>span:focus,
-.pagination>.active>span:hover {
- background-color: $link_color;
+ color: $link_color;
+ float: none;
+}
+.pagination>li>a:hover,
+.pagination>li>span:hover {
+ color: $link_hover_color;
+}
+.pagination > .active > a,
+.pagination > .active > a:focus,
+.pagination > .active > a:hover,
+.pagination > .active > span,
+.pagination > .active > span:focus,
+.pagination > .active > span:hover {
+ background-color: $link_color;
border-color: $link_color;
+ border-radius: 3px;
}
-.disabled > a {
- pointer-events: none;
+.pagination li.pager_n a {
+ margin-left: 3px;
+ border-radius: 3px;
+}
+.pagination .pager_prev a {
+ margin-left: -5px;
+ margin-right: 4px;
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+}
+.pagination .pager_next a {
+ margin-left: 4px;
+ margin-right: -5px;
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.pager .next > a,
+.pager .previous > a {
+ float: none;
+ border-radius: 3px;
+}
+.pagination .disabled > a,
+.pager .disabled > a {
+ display: none;
}
/*
+\r
{{* Pager template, uses output of paginate_data() in include/text.php *}}\r
+\r
{{if $pager}}\r
-<div class="{{$pager.class}}">\r
- {{if $pager.first}}<li class="pager_first {{$pager.first.class}}"><a href="{{$pager.first.url}}">{{$pager.first.text}}</a></li>{{/if}}\r
+<ul class="{{$pager.class}} pagination-sm">\r
+ {{if $pager.first}}<li class="pager_first {{$pager.first.class}}"><a href="{{$pager.first.url}}" title="{{$pager.first.text}}">∣<</a></li>{{/if}}\r
\r
- {{if $pager.prev}}<li class="pager_prev {{$pager.prev.class}}"><a href="{{$pager.prev.url}}">{{$pager.prev.text}}</a></li>{{/if}}\r
+ {{if $pager.prev}}<li class="pager_prev {{$pager.prev.class}}"><a href="{{$pager.prev.url}}" title="{{$pager.prev.text}}"><</a></li>{{/if}}\r
\r
- {{foreach $pager.pages as $p}}<li class="pager_{{$p.class}}"><a href="{{$p.url}}">{{$p.text}}</a></li>{{/foreach}}\r
+ {{foreach $pager.pages as $p}}<li class="pager_{{$p.class}} hidden-xs hidden-sm"><a href="{{$p.url}}">{{$p.text}}</a></li>{{/foreach}}\r
\r
- {{if $pager.next}}<li class="pager_next {{$pager.next.class}}"><a href="{{$pager.next.url}}">{{$pager.next.text}}</a></li>{{/if}}\r
+ {{if $pager.next}}<li class="pager_next {{$pager.next.class}}"><a href="{{$pager.next.url}}" title="{{$pager.next.text}}">></a></li>{{/if}}\r
\r
- {{if $pager.last}} <li class="pager_last {{$pager.last.class}}"><a href="{{$pager.last.url}}">{{$pager.last.text}}</a></li>{{/if}}\r
-</div>\r
+ {{if $pager.last}}<li class="pager_last {{$pager.last.class}}"><a href="{{$pager.last.url}}" title="{{$pager.last.text}}">>∣</a></li>{{/if}}\r
+</ul>\r
{{/if}}\r