From fe4f1ec4eada14b4da42a48b15c83082c112306d Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Mon, 17 Jan 2022 16:06:39 +0800 Subject: [PATCH 1/4] Uniformize headers in simple theme In the simple theme, some templates are using `h1`, others are using `h2` for the main title of the page (other than the one in the header). This commit changes that so all of the pages are using `h1`. --- pelican/themes/simple/templates/article.html | 4 ++-- pelican/themes/simple/templates/author.html | 2 +- pelican/themes/simple/templates/category.html | 2 +- pelican/themes/simple/templates/tag.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pelican/themes/simple/templates/article.html b/pelican/themes/simple/templates/article.html index c8c9a4f7..f85c7410 100644 --- a/pelican/themes/simple/templates/article.html +++ b/pelican/themes/simple/templates/article.html @@ -24,9 +24,9 @@ {% block content %}
-

+

{{ article.title }}

+ title="Permalink to {{ article.title|striptags }}">{{ article.title }} {% import 'translations.html' as translations with context %} {{ translations.translations_for(article) }}
diff --git a/pelican/themes/simple/templates/author.html b/pelican/themes/simple/templates/author.html index a1901946..79d22c7d 100644 --- a/pelican/themes/simple/templates/author.html +++ b/pelican/themes/simple/templates/author.html @@ -3,6 +3,6 @@ {% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %} {% block content_title %} -

Articles by {{ author }}

+

Articles by {{ author }}

{% endblock %} diff --git a/pelican/themes/simple/templates/category.html b/pelican/themes/simple/templates/category.html index 14d7ff09..d73f6e31 100644 --- a/pelican/themes/simple/templates/category.html +++ b/pelican/themes/simple/templates/category.html @@ -3,6 +3,6 @@ {% block title %}{{ SITENAME }} - {{ category }} category{% endblock %} {% block content_title %} -

Articles in the {{ category }} category

+

Articles in the {{ category }} category

{% endblock %} diff --git a/pelican/themes/simple/templates/tag.html b/pelican/themes/simple/templates/tag.html index 9c958030..93878134 100644 --- a/pelican/themes/simple/templates/tag.html +++ b/pelican/themes/simple/templates/tag.html @@ -3,5 +3,5 @@ {% block title %}{{ SITENAME }} - {{ tag }} tag{% endblock %} {% block content_title %} -

Articles tagged with {{ tag }}

+

Articles tagged with {{ tag }}

{% endblock %} From 7b9a859e5e30180808794748e47e529485544b8d Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Mon, 17 Jan 2022 16:11:06 +0800 Subject: [PATCH 2/4] Use
and
tags in simple theme Add a
tag to surround all the content blocks, so that it's easier to target the main part of a page (be it an article, the list of posts or the different categories) using CSS. Because of this, the
part of the article.html template is made redundant, so it is removed. Finally, the generic
is replaced by an
tag to surround the article's content. --- pelican/themes/simple/templates/article.html | 6 ++---- pelican/themes/simple/templates/base.html | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pelican/themes/simple/templates/article.html b/pelican/themes/simple/templates/article.html index f85c7410..6dd0d967 100644 --- a/pelican/themes/simple/templates/article.html +++ b/pelican/themes/simple/templates/article.html @@ -22,7 +22,6 @@ {% endblock %} {% block content %} -

{% endif %} -
+
{{ article.content }} -
-

+
{% endblock %} diff --git a/pelican/themes/simple/templates/base.html b/pelican/themes/simple/templates/base.html index 2c17dbfb..b1ea57da 100644 --- a/pelican/themes/simple/templates/base.html +++ b/pelican/themes/simple/templates/base.html @@ -51,8 +51,10 @@ {% endfor %} {% endif %} +
{% block content %} {% endblock %} +