From 57ce6cf5daaff5d1d4433b9a8059f5dea7b68bf5 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 1 Mar 2017 23:41:54 -0500 Subject: [PATCH] Improve pagination on frio theme - Add pager class discrimination - Change links order to first / prev / 1 / ... / 10 / next / last - Enable dynamic pagination coloring - Prevent click on disabled links --- view/theme/frio/css/style.css | 20 ++++++++++++++++++++ view/theme/frio/templates/paginate.tpl | 13 +++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 view/theme/frio/templates/paginate.tpl diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index df9585d07..ea4db0d53 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -2515,3 +2515,23 @@ body .tread-wrapper .hovercard:hover .hover-card-content a { section .profile-match-wrapper { float: left; } + +/* Pagination improvements */ + +.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; + border-color: $link_color; +} + +.disabled > a { + pointer-events: none; +} \ No newline at end of file diff --git a/view/theme/frio/templates/paginate.tpl b/view/theme/frio/templates/paginate.tpl new file mode 100644 index 000000000..a9c3ae480 --- /dev/null +++ b/view/theme/frio/templates/paginate.tpl @@ -0,0 +1,13 @@ +{{if $pager}} +
+ {{if $pager.first}}
  • {{$pager.first.text}}
  • {{/if}} + + {{if $pager.prev}}
  • {{$pager.prev.text}}
  • {{/if}} + + {{foreach $pager.pages as $p}}
  • {{$p.text}}
  • {{/foreach}} + + {{if $pager.next}}
  • {{$pager.next.text}}
  • {{/if}} + + {{if $pager.last}} 
  • {{$pager.last.text}}
  • {{/if}} +
    +{{/if}}