forked from wowthemesnet/mundana-theme-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Melhoria da paginação conforme PR wowthemesnet/mediumish-theme-jekyll…
- Loading branch information
Showing
6 changed files
with
77 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% if paginator.total_pages > 1 %} | ||
<nav aria-label="Page navigation example"> | ||
<ul class="pagination justify-content-center flex-wrap"> | ||
|
||
{% if paginator.previous_page %} | ||
{% if site.paginate_show_first_and_last %} | ||
<li class="page-item"><a class="page-link" href="{{ site.baseurl | replace: '//', '/' }}/" title="First page">«</a></li> | ||
{% endif %} | ||
<li class="page-item"><a class="page-link" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" title="Previous page"><</a></li> | ||
{% endif %} | ||
|
||
{% assign page_start = paginator.page | minus: site.paginate_trail %} | ||
{% assign page_end = paginator.page | plus: site.paginate_trail %} | ||
|
||
{% for page in (page_start..page_end) %} | ||
{% if page < 1 %} | ||
<!-- Do nothing --> | ||
{% elsif page > paginator.total_pages %} | ||
<!-- Do nothing --> | ||
{% elsif page == paginator.page %} | ||
<li class="page-item active"><a class="page-link">{{ page }} <span class="sr-only">(current)</span></a></li> | ||
{% elsif page == 1 %} | ||
<li class="page-item"><a class="page-link" href="{{ site.baseurl | replace: '//', '/' }}/">{{ page }}</a></li> | ||
{% else %} | ||
<li class="page-item"><a class="page-link" href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a></li> | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if paginator.next_page %} | ||
<li class="page-item"><a class="page-link" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" title="Next page">></a></li> | ||
{% if site.paginate_show_first_and_last %} | ||
<li class="page-item"><a class="page-link" href="{{ site.baseurl | replace: '//', '/' }}/page{{ paginator.total_pages }}" title="Last page">»</a></li> | ||
{% endif %} | ||
{% endif %} | ||
|
||
</ul> | ||
</nav> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
@import 'external/source-sans-pro'; | ||
|
||
|
||
@import 'includes/pagination.scss'; | ||
@import 'includes/about.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
/* 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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters