Sha256: 2db2047faaf6bd62c95cb44f243cde449e59b562b8642bf781476858ecef9b93

Contents?: true

Size: 1.48 KB

Versions: 11

Compression:

Stored size: 1.48 KB

Contents

{% if paginator.total_pages > 1 and site.paginate %}
  <div class="pager">
    <ul class="pagination">
      <li><a href="{{-paginator.previous_page_path-}}" class="previous-page button{%-unless paginator.previous_page %} disabled{%-endunless-%}">&laquo; Prev</a></li>
  {%-for page in (1..paginator.total_pages) %}
    {%-if page == paginator.page %}
      <li><div class="current-page page active">{{-paginator.page-}}</div></li>
    {% elsif page == 1 %}
      <li><a href="{{-site.paginate_path | replace: ':num', '' | replace: '//', '/'-}}" class="page">{{-page-}}</a></li>
    {%-elsif page == paginator.previous_page or page == paginator.next_page %}
      <li><a href="{{-site.paginate_path | replace: ':num', page-}}" class="page">{{-page-}}</a></li>
    {%-else %}
      {%-assign skip_pages_max = paginator.total_pages | minus: 3 %}
      {%-if paginator.total_pages > 7 and page == 4 or page == skip_pages_max-%}{%-unless paginator.page < 3 and page == 4-%}{%-unless paginator.page > skip_pages_max and page == skip_pages_max-%}<li>...</li>{%-endunless-%}{%-endunless-%}{%-endif-%}
      {%-if paginator.total_pages > 7 and page > 3 and page <= skip_pages_max-%}{%-continue-%}{%-endif-%}
      <li><a href="{{-site.paginate_path | replace: ':num', page-}}" class="page">{{-page-}}</a></li>
    {%-endif %}
  {%-endfor %}
      <li><a href="{{-paginator.next_page_path-}}" class="next-page button{%-unless paginator.next_page %} disabled{%-endunless-%}">Next &raquo;</a></li>
    </ul>
  </div>
{%-endif %}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
jekyll-theme-editorial-1.0.11 _includes/pagination.html
jekyll-theme-editorial-1.0.10 _includes/pagination.html
jekyll-theme-editorial-1.0.9 _includes/pagination.html
jekyll-theme-editorial-1.0.8 _includes/pagination.html
jekyll-theme-editorial-1.0.7 _includes/pagination.html
jekyll-theme-editorial-1.0.6 _includes/pagination.html
jekyll-theme-editorial-1.0.5 _includes/pagination.html
jekyll-theme-editorial-1.0.4 _includes/pagination.html
jekyll-theme-editorial-1.0.3 _includes/pagination.html
jekyll-theme-editorial-1.0.2 _includes/pagination.html
jekyll-theme-editorial-1.0.1 _includes/pagination.html