From d813c5148edab58c1052644dab42fc17fabee8f1 Mon Sep 17 00:00:00 2001 From: Frederik Elwert Date: Thu, 10 Oct 2024 14:10:12 +0200 Subject: [PATCH] Add more blocks to simple base template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change makes it easier to create new themes by inheriting from the simple theme. It allows customization of the whole body (while still making use of the theme’s head), or individual parts of the body like header, menu, or footer. --- pelican/themes/simple/templates/base.html | 64 +++++++++++++---------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/pelican/themes/simple/templates/base.html b/pelican/themes/simple/templates/base.html index e9461fd5..7afbc3c2 100644 --- a/pelican/themes/simple/templates/base.html +++ b/pelican/themes/simple/templates/base.html @@ -40,33 +40,41 @@ -
-

{{ SITENAME }}

{% if SITESUBTITLE %}

{{ SITESUBTITLE }}

{% endif %}
- -
-
- {% block content %} - {% endblock %} -
- + {% block body %} +
+ {% block header %} +

{{ SITENAME }}

{% if SITESUBTITLE %}

{{ SITESUBTITLE }}

{% endif %}
+ {% endblock %} + {% block nav %} + + {% endblock %} +
+
+ {% block content %} + {% endblock %} +
+ + {% endblock %}