mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Pagination - update simple theme
This commit is contained in:
parent
17fe724ca4
commit
636e939d23
1 changed files with 14 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
|||
{% endblock %}
|
||||
|
||||
<ol id="post-list">
|
||||
{% for article in articles %}
|
||||
{% for article in articles_page.object_list %}
|
||||
<li><article class="hentry">
|
||||
<header> <h2 class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h2> </header>
|
||||
<footer class="post-info">
|
||||
|
|
@ -17,5 +17,18 @@
|
|||
</article></li>
|
||||
{% endfor %}
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
{% if articles_page.has_previous() %}
|
||||
{% if articles_page.previous_page_number() == 1 %}
|
||||
<a href="{{ SITEURL }}/{{ page_name }}.html">«</a>
|
||||
{% else %}
|
||||
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">«</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
|
||||
{% if articles_page.has_next() %}
|
||||
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">»</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
{% endblock content %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue