From bc2cfdcac7f0ce8f9ffd83645e44be21f7c602b8 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 24 Oct 2023 10:33:12 +0200 Subject: [PATCH] feat: with extra head instead Signed-off-by: kjuulh --- templates/base.html | 1 - templates/page.html | 45 +++++++++++++++---------------- templates/section.html | 60 +++++++++++++++++++++++------------------- 3 files changed, 56 insertions(+), 50 deletions(-) diff --git a/templates/base.html b/templates/base.html index 42094a6..d613ec9 100644 --- a/templates/base.html +++ b/templates/base.html @@ -19,7 +19,6 @@ - diff --git a/templates/page.html b/templates/page.html index f862564..d91c58d 100644 --- a/templates/page.html +++ b/templates/page.html @@ -3,6 +3,7 @@ {% block extra_head %} + {% endblock extra_head %} {% block title %} @@ -13,31 +14,31 @@
- {{ prev_macros::page_back_link(page=page) }} + {{ prev_macros::page_back_link(page=page) }}
- -{% if page.lower or page.higher %} -
- {% if page.lower %} - - {% endif %} - {% if page.higher %} - - {% endif %} -
-{% endif %} + {% if page.lower or page.higher %} +
+ {% if page.lower %} + + {% endif %} + {% if page.higher %} + + {% endif %} +
+ {% endif %}
-{% endblock content %} - +{% endblock content %} \ No newline at end of file diff --git a/templates/section.html b/templates/section.html index bb4ff3f..77fd2e9 100644 --- a/templates/section.html +++ b/templates/section.html @@ -1,44 +1,50 @@ {% extends "base.html" %} +{% block extra_head %} + + +{% endblock extra_head %} + {% block content %}
- -{% if section.ancestors | length > 0 %} + + {% if section.ancestors | length > 0 %} {{ prev_macros::section_back_link(section=section) }} -{% endif %} + {% endif %} -{% if section.extra.section_path -%} + {% if section.extra.section_path -%} {% set section = get_section(path=section.extra.section_path) %} -{% endif -%} -

- {{ section.title }} -

- -
- {%- if paginator %} - {%- set show_pages = paginator.pages -%} - {% else %} - {%- set show_pages = section.pages -%} {% endif -%} +

+ {{ section.title }} +

- {{ post_macros::list_posts(pages=show_pages) }} -
-{% if paginator %} -
    +
    + {%- if paginator %} + {%- set show_pages = paginator.pages -%} + {% else %} + {%- set show_pages = section.pages -%} + {% endif -%} + + {{ post_macros::list_posts(pages=show_pages) }} +
    + {% if paginator %} + -{% endif %} +
+ {% endif %}
-{% endblock content %} +{% endblock content %} \ No newline at end of file