Skip to content

Instantly share code, notes, and snippets.

@fixmysync
Created October 5, 2016 14:11
Show Gist options
  • Save fixmysync/95737051f4c0f922d2bd9c83bf14eae6 to your computer and use it in GitHub Desktop.
Save fixmysync/95737051f4c0f922d2bd9c83bf14eae6 to your computer and use it in GitHub Desktop.
<div id="pagination" class="pagination">
{% if paginate.previous.is_link %}
<a href="{{ paginate.previous.url }}" class="pagination-item pagination-previous">Previous</a>
{% else %}
<a class="pagination-item pagination-previous pagination-previous--disabled">Previous</a>
{% endif %}
{% for part in paginate.parts %}
{% if part.is_link %}
<a href="{{part.url}}"class="pagination-item">{{ part.title }}</a>
{% elsif current_page %}
<a class="pagination-item pagination--current">{{ current_page }}</a>
{% endif %}
{% endfor %}
{% if paginate.next.is_link %}
<a href="{{ paginate.next.url }}" class="pagination-item pagination-next">Next</a>
{% else %}
<a class="pagination-item pagination-next pagination-next--disabled">Next</a>
{% endif %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment