mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Expose first and last page of pagination (#2618)
This commit is contained in:
parent
2a6b7d9e7c
commit
82ff563f6f
13 changed files with 32 additions and 12 deletions
|
|
@ -122,6 +122,7 @@
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
Page 1 / 3
|
Page 1 / 3
|
||||||
<a href="../author/alexis-metaireau2.html">»</a>
|
<a href="../author/alexis-metaireau2.html">»</a>
|
||||||
|
<a href="../author/alexis-metaireau3.html">⇉</a>
|
||||||
</p>
|
</p>
|
||||||
</section><!-- /#content -->
|
</section><!-- /#content -->
|
||||||
<section id="extras" class="body">
|
<section id="extras" class="body">
|
||||||
|
|
@ -167,4 +168,4 @@
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,11 @@ YEAH !</p>
|
||||||
</article></li>
|
</article></li>
|
||||||
</ol><!-- /#posts-list -->
|
</ol><!-- /#posts-list -->
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
|
<a href="../author/alexis-metaireau.html">⇇</a>
|
||||||
<a href="../author/alexis-metaireau.html">«</a>
|
<a href="../author/alexis-metaireau.html">«</a>
|
||||||
Page 2 / 3
|
Page 2 / 3
|
||||||
<a href="../author/alexis-metaireau3.html">»</a>
|
<a href="../author/alexis-metaireau3.html">»</a>
|
||||||
|
<a href="../author/alexis-metaireau3.html">⇉</a>
|
||||||
</p>
|
</p>
|
||||||
</section><!-- /#content -->
|
</section><!-- /#content -->
|
||||||
<section id="extras" class="body">
|
<section id="extras" class="body">
|
||||||
|
|
@ -181,4 +183,4 @@ YEAH !</p>
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ pelican.conf, it will …</p></div>
|
||||||
</article></li>
|
</article></li>
|
||||||
</ol><!-- /#posts-list -->
|
</ol><!-- /#posts-list -->
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
|
<a href="../author/alexis-metaireau.html">⇇</a>
|
||||||
<a href="../author/alexis-metaireau2.html">«</a>
|
<a href="../author/alexis-metaireau2.html">«</a>
|
||||||
Page 3 / 3
|
Page 3 / 3
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -132,4 +133,4 @@ pelican.conf, it will …</p></div>
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
Page 1 / 3
|
Page 1 / 3
|
||||||
<a href="./index2.html">»</a>
|
<a href="./index2.html">»</a>
|
||||||
|
<a href="./index3.html">⇉</a>
|
||||||
</p>
|
</p>
|
||||||
</section><!-- /#content -->
|
</section><!-- /#content -->
|
||||||
<section id="extras" class="body">
|
<section id="extras" class="body">
|
||||||
|
|
@ -167,4 +168,4 @@
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,11 @@ YEAH !</p>
|
||||||
</article></li>
|
</article></li>
|
||||||
</ol><!-- /#posts-list -->
|
</ol><!-- /#posts-list -->
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
|
<a href="./index.html">⇇</a>
|
||||||
<a href="./index.html">«</a>
|
<a href="./index.html">«</a>
|
||||||
Page 2 / 3
|
Page 2 / 3
|
||||||
<a href="./index3.html">»</a>
|
<a href="./index3.html">»</a>
|
||||||
|
<a href="./index3.html">⇉</a>
|
||||||
</p>
|
</p>
|
||||||
</section><!-- /#content -->
|
</section><!-- /#content -->
|
||||||
<section id="extras" class="body">
|
<section id="extras" class="body">
|
||||||
|
|
@ -181,4 +183,4 @@ YEAH !</p>
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ pelican.conf, it will …</p></div>
|
||||||
</article></li>
|
</article></li>
|
||||||
</ol><!-- /#posts-list -->
|
</ol><!-- /#posts-list -->
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
|
<a href="./index.html">⇇</a>
|
||||||
<a href="./index2.html">«</a>
|
<a href="./index2.html">«</a>
|
||||||
Page 3 / 3
|
Page 3 / 3
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -132,4 +133,4 @@ pelican.conf, it will …</p></div>
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
Page 1 / 3
|
Page 1 / 3
|
||||||
<a href="../author/alexis-metaireau2.html">»</a>
|
<a href="../author/alexis-metaireau2.html">»</a>
|
||||||
|
<a href="../author/alexis-metaireau3.html">⇉</a>
|
||||||
</p>
|
</p>
|
||||||
</section><!-- /#content -->
|
</section><!-- /#content -->
|
||||||
<section id="extras" class="body">
|
<section id="extras" class="body">
|
||||||
|
|
@ -167,4 +168,4 @@
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,11 @@ YEAH !</p>
|
||||||
</article></li>
|
</article></li>
|
||||||
</ol><!-- /#posts-list -->
|
</ol><!-- /#posts-list -->
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
|
<a href="../author/alexis-metaireau.html">⇇</a>
|
||||||
<a href="../author/alexis-metaireau.html">«</a>
|
<a href="../author/alexis-metaireau.html">«</a>
|
||||||
Page 2 / 3
|
Page 2 / 3
|
||||||
<a href="../author/alexis-metaireau3.html">»</a>
|
<a href="../author/alexis-metaireau3.html">»</a>
|
||||||
|
<a href="../author/alexis-metaireau3.html">⇉</a>
|
||||||
</p>
|
</p>
|
||||||
</section><!-- /#content -->
|
</section><!-- /#content -->
|
||||||
<section id="extras" class="body">
|
<section id="extras" class="body">
|
||||||
|
|
@ -181,4 +183,4 @@ YEAH !</p>
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ pelican.conf, it will …</p></div>
|
||||||
</article></li>
|
</article></li>
|
||||||
</ol><!-- /#posts-list -->
|
</ol><!-- /#posts-list -->
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
|
<a href="../author/alexis-metaireau.html">⇇</a>
|
||||||
<a href="../author/alexis-metaireau2.html">«</a>
|
<a href="../author/alexis-metaireau2.html">«</a>
|
||||||
Page 3 / 3
|
Page 3 / 3
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -132,4 +133,4 @@ pelican.conf, it will …</p></div>
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
Page 1 / 3
|
Page 1 / 3
|
||||||
<a href="./index2.html">»</a>
|
<a href="./index2.html">»</a>
|
||||||
|
<a href="./index3.html">⇉</a>
|
||||||
</p>
|
</p>
|
||||||
</section><!-- /#content -->
|
</section><!-- /#content -->
|
||||||
<section id="extras" class="body">
|
<section id="extras" class="body">
|
||||||
|
|
@ -167,4 +168,4 @@
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,11 @@ YEAH !</p>
|
||||||
</article></li>
|
</article></li>
|
||||||
</ol><!-- /#posts-list -->
|
</ol><!-- /#posts-list -->
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
|
<a href="./index.html">⇇</a>
|
||||||
<a href="./index.html">«</a>
|
<a href="./index.html">«</a>
|
||||||
Page 2 / 3
|
Page 2 / 3
|
||||||
<a href="./index3.html">»</a>
|
<a href="./index3.html">»</a>
|
||||||
|
<a href="./index3.html">⇉</a>
|
||||||
</p>
|
</p>
|
||||||
</section><!-- /#content -->
|
</section><!-- /#content -->
|
||||||
<section id="extras" class="body">
|
<section id="extras" class="body">
|
||||||
|
|
@ -181,4 +183,4 @@ YEAH !</p>
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ pelican.conf, it will …</p></div>
|
||||||
</article></li>
|
</article></li>
|
||||||
</ol><!-- /#posts-list -->
|
</ol><!-- /#posts-list -->
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
|
<a href="./index.html">⇇</a>
|
||||||
<a href="./index2.html">«</a>
|
<a href="./index2.html">«</a>
|
||||||
Page 3 / 3
|
Page 3 / 3
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -132,4 +133,4 @@ pelican.conf, it will …</p></div>
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
{% if DEFAULT_PAGINATION %}
|
{% if DEFAULT_PAGINATION %}
|
||||||
|
{% set first_page = articles_paginator.page(1) %}
|
||||||
|
{% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
|
||||||
<p class="paginator">
|
<p class="paginator">
|
||||||
{% if articles_page.has_previous() %}
|
{% if articles_page.has_previous() %}
|
||||||
|
<a href="{{ SITEURL }}/{{ first_page.url }}">⇇</a>
|
||||||
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">«</a>
|
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">«</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
|
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
|
||||||
{% if articles_page.has_next() %}
|
{% if articles_page.has_next() %}
|
||||||
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">»</a>
|
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">»</a>
|
||||||
|
<a href="{{ SITEURL }}/{{ last_page.url }}">⇉</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue