Expose first and last page of pagination (#2618)

This commit is contained in:
Joachim Lusiardi 2020-04-30 19:05:48 +02:00 committed by GitHub
commit 82ff563f6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 32 additions and 12 deletions

View file

@ -122,6 +122,7 @@
<p class="paginator">
Page 1 / 3
<a href="../author/alexis-metaireau2.html">&raquo;</a>
<a href="../author/alexis-metaireau3.html">&#8649;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
@ -167,4 +168,4 @@
}());
</script>
</body>
</html>
</html>

View file

@ -133,9 +133,11 @@ YEAH !</p>
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="../author/alexis-metaireau.html">&#8647;</a>
<a href="../author/alexis-metaireau.html">&laquo;</a>
Page 2 / 3
<a href="../author/alexis-metaireau3.html">&raquo;</a>
<a href="../author/alexis-metaireau3.html">&#8649;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
@ -181,4 +183,4 @@ YEAH !</p>
}());
</script>
</body>
</html>
</html>

View file

@ -85,6 +85,7 @@ pelican.conf, it will …</p></div>
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="../author/alexis-metaireau.html">&#8647;</a>
<a href="../author/alexis-metaireau2.html">&laquo;</a>
Page 3 / 3
</p>
@ -132,4 +133,4 @@ pelican.conf, it will …</p></div>
}());
</script>
</body>
</html>
</html>

View file

@ -122,6 +122,7 @@
<p class="paginator">
Page 1 / 3
<a href="./index2.html">&raquo;</a>
<a href="./index3.html">&#8649;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
@ -167,4 +168,4 @@
}());
</script>
</body>
</html>
</html>

View file

@ -133,9 +133,11 @@ YEAH !</p>
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="./index.html">&#8647;</a>
<a href="./index.html">&laquo;</a>
Page 2 / 3
<a href="./index3.html">&raquo;</a>
<a href="./index3.html">&#8649;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
@ -181,4 +183,4 @@ YEAH !</p>
}());
</script>
</body>
</html>
</html>

View file

@ -85,6 +85,7 @@ pelican.conf, it will …</p></div>
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="./index.html">&#8647;</a>
<a href="./index2.html">&laquo;</a>
Page 3 / 3
</p>
@ -132,4 +133,4 @@ pelican.conf, it will …</p></div>
}());
</script>
</body>
</html>
</html>

View file

@ -122,6 +122,7 @@
<p class="paginator">
Page 1 / 3
<a href="../author/alexis-metaireau2.html">&raquo;</a>
<a href="../author/alexis-metaireau3.html">&#8649;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
@ -167,4 +168,4 @@
}());
</script>
</body>
</html>
</html>

View file

@ -133,9 +133,11 @@ YEAH !</p>
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="../author/alexis-metaireau.html">&#8647;</a>
<a href="../author/alexis-metaireau.html">&laquo;</a>
Page 2 / 3
<a href="../author/alexis-metaireau3.html">&raquo;</a>
<a href="../author/alexis-metaireau3.html">&#8649;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
@ -181,4 +183,4 @@ YEAH !</p>
}());
</script>
</body>
</html>
</html>

View file

@ -85,6 +85,7 @@ pelican.conf, it will …</p></div>
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="../author/alexis-metaireau.html">&#8647;</a>
<a href="../author/alexis-metaireau2.html">&laquo;</a>
Page 3 / 3
</p>
@ -132,4 +133,4 @@ pelican.conf, it will …</p></div>
}());
</script>
</body>
</html>
</html>

View file

@ -122,6 +122,7 @@
<p class="paginator">
Page 1 / 3
<a href="./index2.html">&raquo;</a>
<a href="./index3.html">&#8649;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
@ -167,4 +168,4 @@
}());
</script>
</body>
</html>
</html>

View file

@ -133,9 +133,11 @@ YEAH !</p>
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="./index.html">&#8647;</a>
<a href="./index.html">&laquo;</a>
Page 2 / 3
<a href="./index3.html">&raquo;</a>
<a href="./index3.html">&#8649;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
@ -181,4 +183,4 @@ YEAH !</p>
}());
</script>
</body>
</html>
</html>

View file

@ -85,6 +85,7 @@ pelican.conf, it will …</p></div>
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="./index.html">&#8647;</a>
<a href="./index2.html">&laquo;</a>
Page 3 / 3
</p>
@ -132,4 +133,4 @@ pelican.conf, it will …</p></div>
}());
</script>
</body>
</html>
</html>

View file

@ -1,11 +1,15 @@
{% if DEFAULT_PAGINATION %}
{% set first_page = articles_paginator.page(1) %}
{% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
<p class="paginator">
{% if articles_page.has_previous() %}
<a href="{{ SITEURL }}/{{ first_page.url }}">&#8647;</a>
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
{% endif %}
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
{% if articles_page.has_next() %}
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a>
<a href="{{ SITEURL }}/{{ last_page.url }}">&#8649;</a>
{% endif %}
</p>
{% endif %}