Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modified templates/pagination.html to support PAGINATION_PATTERNS #21

Merged
merged 1 commit into from Nov 29, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

modified templates/pagination.html to support PAGINATION_PATTERNS

  • Loading branch information...
pythonwood committed Nov 28, 2017
commit cc887089a365420ec1ed00cc0bcedc3573ab6e8c
@@ -2,9 +2,8 @@
<nav>
<ul class="pagination">
{% if articles_page.has_previous() %}
{% set num = articles_page.previous_page_number() %}
<li>
<a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html"
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}"
aria-label="Previous" rel="prev">
<span aria-hidden="true">&larr;</span>
</a>
@@ -25,7 +24,7 @@
{% if num in linked_pages %}
{% set is_current_page = (num == articles_page.number) -%}
<li class="{{ 'active' if is_current_page else '' }}">
<a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else ''}}.html"
<a href="{{ SITEURL }}/{{ articles_paginator.page(num).url }}"
rel="
{% if num == 1 %} first {% endif %}
{% if num == articles_paginator.num_pages %} last {% endif %}
@@ -44,7 +43,7 @@

{% if articles_page.has_next() %}
<li>
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html"
<a href="{{ SITEURL }}/{{ articles_next_page.url }}"
aria-label="Next" rel="next">
<span aria-hidden="true">&rarr;</span>
</a>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.