pagination.html 1.4 KB

123456789101112131415161718192021222324252627282930
  1. {% assign count = include.count | default: 5 %}
  2. {% assign active-item = include.active-item | default: 2 %}
  3. <ul class="pagination {{ include.class }}">
  4. <li class="page-item{% if include.prev-description %} page-prev{% endif %} disabled">
  5. <a class="page-link" href="#" tabindex="-1" aria-disabled="true">
  6. {% if include.prev-description %}
  7. <div class="page-item-subtitle">previous</div>
  8. <div class="page-item-title">{{ include.prev-description }}</div>
  9. {% else %}
  10. {% if include.icons %}{% include ui/icon.html icon="chevron-left" %}{% else %}{% include ui/icon.html icon="chevron-left" %} prev{% endif %}
  11. {% endif %}
  12. </a>
  13. </li>
  14. {% for i in (1..count) %}
  15. <li class="page-item{% if i == active-item %} active{% endif %}"><a class="page-link" href="#">{{ i }}</a></li>
  16. {% endfor %}
  17. <li class="page-item{% if include.prev-description %} page-next{% endif %}">
  18. <a class="page-link" href="#">
  19. {% if include.next-description %}
  20. <div class="page-item-subtitle">next</div>
  21. <div class="page-item-title">{{ include.next-description }}</div>
  22. {% else %}
  23. {% if include.icons %}{% include ui/icon.html icon="chevron-right" %}{% else %}next {% include ui/icon.html icon="chevron-right" %}{% endif %}
  24. {% endif %}
  25. </a>
  26. </li>
  27. </ul>