added pagination
This commit is contained in:
parent
8428f55745
commit
8471956854
2 changed files with 21 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ description: > # this means to ignore newlines until "baseurl:"
|
||||||
Our focus is on intermedia arts and technologies, but we love to be surprised..!
|
Our focus is on intermedia arts and technologies, but we love to be surprised..!
|
||||||
baseurl: "" # the subpath of your site, e.g. /blog/
|
baseurl: "" # the subpath of your site, e.g. /blog/
|
||||||
url: "http://scopesessions.org" # the base hostname & protocol for your site
|
url: "http://scopesessions.org" # the base hostname & protocol for your site
|
||||||
paginate: 2
|
paginate: 4
|
||||||
paginate_path: "page:num/"
|
paginate_path: "page:num/"
|
||||||
# Build settings
|
# Build settings
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
|
|
|
||||||
21
index.html
21
index.html
|
|
@ -8,7 +8,7 @@ layout: default
|
||||||
|
|
||||||
<h1 class="page-heading">Events</h1>
|
<h1 class="page-heading">Events</h1>
|
||||||
|
|
||||||
{% for post in site.posts %}
|
{% for post in paginator.posts %}
|
||||||
|
|
||||||
<div class="row event">
|
<div class="row event">
|
||||||
|
|
||||||
|
|
@ -32,6 +32,25 @@ layout: default
|
||||||
|
|
||||||
{% endfor%}
|
{% endfor%}
|
||||||
|
|
||||||
|
<div class="row pagination">
|
||||||
|
|
||||||
|
<!-- Pagination links -->
|
||||||
|
<div class="pagination">
|
||||||
|
{% if paginator.previous_page %}
|
||||||
|
<a href="{{ paginator.previous_page_path }}" class="previous">Previous</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="previous">Previous</span>
|
||||||
|
{% endif %}
|
||||||
|
<span class="page_number ">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span>
|
||||||
|
{% if paginator.next_page %}
|
||||||
|
<a href="{{ paginator.next_page_path }}" class="next">Next</a>
|
||||||
|
{% else %}
|
||||||
|
<span class="next ">Next</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue