mirror of
https://github.com/aljazceru/cryptoanarchywiki.github.io.git
synced 2025-12-17 13:14:21 +01:00
update paginator
This commit is contained in:
@@ -12,7 +12,7 @@ urls:
|
|||||||
url: /feed.xml
|
url: /feed.xml
|
||||||
url: "https://agusmakmun.github.io"
|
url: "https://agusmakmun.github.io"
|
||||||
baseurl: ""
|
baseurl: ""
|
||||||
paginate: 20
|
paginate: 3
|
||||||
per_page: 20
|
per_page: 3
|
||||||
paginate_path: "/page:num/"
|
paginate_path: "/page:num/"
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
30
index.html
30
index.html
@@ -13,28 +13,40 @@ layout: default
|
|||||||
|
|
||||||
<!-- Pagination links -->
|
<!-- Pagination links -->
|
||||||
{% if paginator.total_pages > 1 %}
|
{% if paginator.total_pages > 1 %}
|
||||||
<div class="pagination">
|
<ul class="pagination">
|
||||||
{% if paginator.previous_page %}
|
{% if paginator.previous_page %}
|
||||||
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« Prev</a>
|
<li>
|
||||||
|
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">«</a>
|
||||||
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span>« Prev</span>
|
<li class="disabled"><span aria-hidden="true">«</span></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<li><a href="/">First</a></li>
|
||||||
|
|
||||||
{% for page in (1..paginator.total_pages) %}
|
{% for page in (1..paginator.total_pages) %}
|
||||||
{% if page == paginator.page %}
|
{% if page == paginator.page %}
|
||||||
<em>{{ page }}</em>
|
<li class="active">
|
||||||
|
<a>{{ page }}<span class="sr-only">(current)</span></a>
|
||||||
|
</li>
|
||||||
{% elsif page == 1 %}
|
{% elsif page == 1 %}
|
||||||
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
|
<li><a href="/">{{ page }}</a></li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
<li>
|
||||||
|
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
||||||
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
<li><a href="/page{{ paginator.total_pages }}/">Last</a></li>
|
||||||
|
|
||||||
{% if paginator.next_page %}
|
{% if paginator.next_page %}
|
||||||
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next »</a>
|
<li>
|
||||||
|
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">»</a>
|
||||||
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span>Next »</span>
|
<li class="disabled"><span>»</span></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div><!-- end #home -->
|
</div><!-- end #home -->
|
||||||
|
|||||||
Reference in New Issue
Block a user