From 1a0772104434af6c6f08c23593d419e77c958986 Mon Sep 17 00:00:00 2001 From: MihajloNesic Date: Sun, 15 Mar 2020 13:36:14 +0100 Subject: [PATCH] better pagination --- _config.yml | 2 ++ _includes/pagination.html | 39 ++++++++++++++++++++++++++------------- assets/css/main.scss | 34 ++++++++++++++++++++++++++++++++++ assets/css/screen.css | 4 ---- 4 files changed, 62 insertions(+), 17 deletions(-) diff --git a/_config.yml b/_config.yml index 8f192fabcd..36c760bf14 100644 --- a/_config.yml +++ b/_config.yml @@ -49,6 +49,8 @@ jekyll-archives: # Pagination paginate: 6 +paginate_trail: 2 +paginate_show_first_and_last: true paginate_path: /page:num/ # Other diff --git a/_includes/pagination.html b/_includes/pagination.html index 5cf9c93e10..a1d429621f 100644 --- a/_includes/pagination.html +++ b/_includes/pagination.html @@ -1,25 +1,38 @@ {% if paginator.total_pages > 1 %} - + + + {% endif %} \ No newline at end of file diff --git a/assets/css/main.scss b/assets/css/main.scss index a7e8b9b25a..9d64937652 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -13,3 +13,37 @@ "syntax", "starsnonscss" ; + +/* pagination */ + +$paginateColor: #00ab6b; + +.pagination > li > a +{ + background-color: white; + color: $paginateColor; +} + +.pagination > li > a:focus, +.pagination > li > a:hover, +.pagination > li > span:focus, +.pagination > li > span:hover +{ + color: #5a5a5a; + background-color: #eee; + border-color: #ddd; +} + +.pagination > .active > a +{ + color: white; + background-color: $paginateColor !important; + border: solid 1px $paginateColor !important; +} + +.pagination > .active > a:hover +{ + background-color: $paginateColor !important; + border: solid 1px $paginateColor; +} +/* pagination end */ \ No newline at end of file diff --git a/assets/css/screen.css b/assets/css/screen.css index b306d2cf27..6c99e1cf13 100644 --- a/assets/css/screen.css +++ b/assets/css/screen.css @@ -754,10 +754,6 @@ span.navigation { text-align: center; } -.pagination { - display: block; -} - iframe { max-width: 100%; }