mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Updates the template logic for when page navigation is included in the generated HTML in the notmyidea theme, fixing: * Issue #1068: useless pagination controls should not be displayed when a single page is generated (i.e. "Page 1/1"). New logic prevents the generation of these superfluous page navigation controls. Tests updated accordingly. * Issue #1572: when multiple pages are generated and the last page contains only one item, the closing </ol> and </section> tags are not generated, resulting in page breakage. We need to check if articles_page.has_other_pages(); if it does, a list has been generated per line 19 or 25 and the tags must be closed.
This commit is contained in:
parent
780ccfe137
commit
22bc56ddf1
17 changed files with 4 additions and 57 deletions
|
|
@ -51,9 +51,6 @@ YEAH !</p>
|
|||
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
|
||||
</div>
|
||||
<p>There are <a href="../oh-yeah.html#disqus_thread">comments</a>.</p> </article>
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</aside><!-- /#featured -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -120,9 +120,6 @@
|
|||
<p>There are <a href="../article-3.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -131,9 +131,6 @@ pelican.conf, it ...</p></div>
|
|||
<p>There are <a href="../tag/baz.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@
|
|||
<p>→ And now try with some utf8 hell: ééé</p>
|
||||
</div>
|
||||
<p>There are <a href="../this-is-a-super-article.html#disqus_thread">comments</a>.</p> </article>
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</aside><!-- /#featured -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -110,9 +110,6 @@ YEAH !</p>
|
|||
<p>There are <a href="../oh-yeah.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -80,9 +80,6 @@ as well as <strong>inline markup</strong>.</p>
|
|||
<p>There are <a href="../this-is-a-super-article.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@
|
|||
<p>→ And now try with some utf8 hell: ééé</p>
|
||||
</div>
|
||||
<p>There are <a href="../this-is-a-super-article.html#disqus_thread">comments</a>.</p> </article>
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</aside><!-- /#featured -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ YEAH !</p>
|
|||
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
|
||||
</div>
|
||||
<p>There are <a href="../oh-yeah.html#disqus_thread">comments</a>.</p> </article>
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</aside><!-- /#featured -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ YEAH !</p>
|
|||
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
|
||||
</div>
|
||||
<p>There are <a href="../posts/2010/octobre/20/oh-yeah/#disqus_thread">comments</a>.</p> </article>
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</aside><!-- /#featured -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -120,9 +120,6 @@
|
|||
<p>There are <a href="../posts/2011/février/17/article-3/#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -131,9 +131,6 @@ pelican.conf, it ...</p></div>
|
|||
<p>There are <a href="../tag/baz.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@
|
|||
<p>→ And now try with some utf8 hell: ééé</p>
|
||||
</div>
|
||||
<p>There are <a href="../posts/2010/décembre/02/this-is-a-super-article/#disqus_thread">comments</a>.</p> </article>
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</aside><!-- /#featured -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -110,9 +110,6 @@ YEAH !</p>
|
|||
<p>There are <a href="../posts/2010/octobre/20/oh-yeah/#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -80,9 +80,6 @@ as well as <strong>inline markup</strong>.</p>
|
|||
<p>There are <a href="../posts/2010/décembre/02/this-is-a-super-article/#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
</ol><!-- /#posts-list -->
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</section><!-- /#content -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@
|
|||
<p>→ And now try with some utf8 hell: ééé</p>
|
||||
</div>
|
||||
<p>There are <a href="../posts/2010/décembre/02/this-is-a-super-article/#disqus_thread">comments</a>.</p> </article>
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</aside><!-- /#featured -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ YEAH !</p>
|
|||
<img alt="alternate text" src="../pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
|
||||
</div>
|
||||
<p>There are <a href="../posts/2010/octobre/20/oh-yeah/#disqus_thread">comments</a>.</p> </article>
|
||||
<p class="paginator">
|
||||
Page 1 / 1
|
||||
</p>
|
||||
</aside><!-- /#featured -->
|
||||
<section id="extras" class="body">
|
||||
<div class="blogroll">
|
||||
|
|
|
|||
|
|
@ -11,9 +11,6 @@
|
|||
<h1 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h1>
|
||||
{% include 'article_infos.html' %}{{ article.content }}{% include 'comments.html' %}
|
||||
</article>
|
||||
{% if loop.length == 1 %}
|
||||
{% include 'pagination.html' %}
|
||||
{% endif %}
|
||||
</aside><!-- /#featured -->
|
||||
{% if loop.length > 1 %}
|
||||
<section id="content" class="body">
|
||||
|
|
@ -42,13 +39,11 @@
|
|||
</article></li>
|
||||
{% endif %}
|
||||
{% if loop.last %}
|
||||
{% if loop.length > 1 %}
|
||||
{% if loop.length > 1 or articles_page.has_other_pages() %}
|
||||
</ol><!-- /#posts-list -->
|
||||
{% endif %}
|
||||
{% if articles_page.has_previous() or loop.length > 1 %}
|
||||
{% include 'pagination.html' %}
|
||||
{% endif %}
|
||||
{% if loop.length > 1 %}
|
||||
{% if articles_page.has_other_pages() %}
|
||||
{% include 'pagination.html' %}
|
||||
{% endif %}
|
||||
</section><!-- /#content -->
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue