aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-04-15 18:08:44 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-04-15 18:08:44 +0300
commita7707f7fe4a9f2e72ef607ca7ea3c3daa7f4a0eb (patch)
tree014455f0e5f1b3531977e18c2ed4681e11896650
parentindex.html: add a README link (diff)
downloadjekyll-theme-a7707f7fe4a9f2e72ef607ca7ea3c3daa7f4a0eb.tar.gz
jekyll-theme-a7707f7fe4a9f2e72ef607ca7ea3c3daa7f4a0eb.zip
paginator: refactoring
I'll be replacing some of the <a> elements later, don't want the diffs to get too messy.
-rw-r--r--_includes/jekyll-theme/posts/paginator.html24
1 files changed, 18 insertions, 6 deletions
diff --git a/_includes/jekyll-theme/posts/paginator.html b/_includes/jekyll-theme/posts/paginator.html
index 471383c..341687c 100644
--- a/_includes/jekyll-theme/posts/paginator.html
+++ b/_includes/jekyll-theme/posts/paginator.html
@@ -14,23 +14,35 @@
{% endif %}
<ul class="pagination">
{% if paginator.previous_page %}
- <li><a href="{{ paginator.previous_page_path | relative_url }}"><span class="glyphicon glyphicon-chevron-left"></span>&nbsp;Prev</a></li>
+ <li>
+ <a href="{{ paginator.previous_page_path | relative_url }}"><span class="glyphicon glyphicon-chevron-left"></span>&nbsp;Prev</a>
+ </li>
{% else %}
- <li class="disabled"><a href="#"><span class="glyphicon glyphicon-chevron-left"></span>&nbsp;Prev</a></li>
+ <li class="disabled">
+ <a href="#"><span class="glyphicon glyphicon-chevron-left"></span>&nbsp;Prev</a>
+ </li>
{% endif %}
{% for page_number in (1..paginator.total_pages) %}
{% if page_number == paginator.page %}
<li class="active"><a href="#">{{ page_number }}</a></li>
{% elsif page_number == 1 %}
- <li><a href="{{ page1_url | relative_url }}">{{ page_number }}</a></li>
+ <li>
+ <a href="{{ page1_url | relative_url }}">{{ page_number }}</a>
+ </li>
{% else %}
- <li><a href="{{ site.paginate_path | replace: ':num', page_number | relative_url }}">{{ page_number }}</a></li>
+ <li>
+ <a href="{{ site.paginate_path | replace: ':num', page_number | relative_url }}">{{ page_number }}</a>
+ </li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
- <li><a href="{{ paginator.next_page_path | relative_url }}">Next&nbsp;<span class="glyphicon glyphicon-chevron-right"></span></a></li>
+ <li>
+ <a href="{{ paginator.next_page_path | relative_url }}">Next&nbsp;<span class="glyphicon glyphicon-chevron-right"></span></a>
+ </li>
{% else %}
- <li class="disabled"><a href="#">Next&nbsp;<span class="glyphicon glyphicon-chevron-right"></span></a></li>
+ <li class="disabled">
+ <a href="#">Next&nbsp;<span class="glyphicon glyphicon-chevron-right"></span></a>
+ </li>
{% endif %}
</ul>
{% endif %}