From 3cc45233104ea50749f0feac2c1a6f689ef4dfd5 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Sun, 9 Feb 2014 15:17:23 +0100 Subject: [PATCH 1/5] Some browsers like Lynx render adjacent links without implicit spaces. Put an extra space at the end of each link to a tag so that Lynx doesnt render the tags as a single word. --- pelican/themes/notmyidea/templates/taglist.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/themes/notmyidea/templates/taglist.html b/pelican/themes/notmyidea/templates/taglist.html index c792fd7d..b8f4ba95 100644 --- a/pelican/themes/notmyidea/templates/taglist.html +++ b/pelican/themes/notmyidea/templates/taglist.html @@ -1,2 +1,2 @@ -{% if article.tags %}

tags: {% for tag in article.tags %}{{ tag }}{% endfor %}

{% endif %} +{% if article.tags %}

tags: {% for tag in article.tags %}{{ tag }} {% endfor %}

{% endif %} {% if PDF_PROCESSOR %}

get the pdf

{% endif %} From 3d4eff922a1c6d310037b86ea7c13b57195b4316 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Wed, 12 Feb 2014 11:47:22 +0100 Subject: [PATCH 2/5] HTML error in notmyidea/tags.html: li not allowed in section. li tags need to be inside of ul or ol. Thanks to the w3c_validate plugin for finding this. --- pelican/themes/notmyidea/templates/tags.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pelican/themes/notmyidea/templates/tags.html b/pelican/themes/notmyidea/templates/tags.html index 76955f27..5fae82ff 100644 --- a/pelican/themes/notmyidea/templates/tags.html +++ b/pelican/themes/notmyidea/templates/tags.html @@ -6,10 +6,11 @@

Tags for {{ SITENAME }}

- +
    {%- for tag, articles in tags|sort %}
  • {{ tag }} ({{ articles|count }})
  • {% endfor %} +
{% endblock %} From 18d089e8ea9e8666d5b8c9c64e69da3cd88e2d4c Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Wed, 12 Feb 2014 12:19:10 +0100 Subject: [PATCH 3/5] HTML error in notmyidea/authors.html: li not allowed in section. li tags need to be inside of ul or ol. --- pelican/themes/notmyidea/templates/authors.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pelican/themes/notmyidea/templates/authors.html b/pelican/themes/notmyidea/templates/authors.html index a203422b..f6429e8a 100644 --- a/pelican/themes/notmyidea/templates/authors.html +++ b/pelican/themes/notmyidea/templates/authors.html @@ -6,10 +6,11 @@

Authors on {{ SITENAME }}

- +
    {%- for author, articles in authors|sort %}
  • {{ author }} ({{ articles|count }})
  • {% endfor %} +
{% endblock %} From b9846b5a7f56ff22d0bf23ca2fbcf970807a5f78 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Wed, 12 Feb 2014 12:34:22 +0100 Subject: [PATCH 4/5] Simplify unnecessarily complicated conditional. if (a) if (a and (b or not b and c)) can be simplified as if (a) if (b or c) --- pelican/themes/notmyidea/templates/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pelican/themes/notmyidea/templates/index.html b/pelican/themes/notmyidea/templates/index.html index 2d45bb2a..abd33c35 100644 --- a/pelican/themes/notmyidea/templates/index.html +++ b/pelican/themes/notmyidea/templates/index.html @@ -43,8 +43,7 @@ {% endif %} {% if loop.last %} - {% if loop.last and (articles_page.has_previous() - or not articles_page.has_previous() and loop.length > 1) %} + {% if articles_page.has_previous() or loop.length > 1 %} {% include 'pagination.html' %} {% endif %} From 828e7bcb4c123e438cd977d88a58dbaabc1edaa3 Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Wed, 12 Feb 2014 12:42:27 +0100 Subject: [PATCH 5/5] Fix stray ol and section end tag if only one article was displayed. We already check if loop.length > 1 before outputting
and
    tags, but we neglected to do the same check when outputting the corresponding end tags. --- pelican/themes/notmyidea/templates/index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pelican/themes/notmyidea/templates/index.html b/pelican/themes/notmyidea/templates/index.html index abd33c35..c8982476 100644 --- a/pelican/themes/notmyidea/templates/index.html +++ b/pelican/themes/notmyidea/templates/index.html @@ -42,11 +42,15 @@ {% endif %} {% if loop.last %} -
+ {% if loop.length > 1 %} + + {% endif %} {% if articles_page.has_previous() or loop.length > 1 %} {% include 'pagination.html' %} {% endif %} -
+ {% if loop.length > 1 %} + + {% endif %} {% endif %} {% endfor %} {% else %}