From dceceff5fda7ec791bb2e0311663bb034ec0d582 Mon Sep 17 00:00:00 2001 From: welpo Date: Mon, 6 Mar 2023 00:20:31 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20improve=20spac?= =?UTF-8?q?ing=20and=20indentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/404.html | 2 ++ templates/archive.html | 5 ++++- templates/macros/cards_posts.html | 2 ++ templates/macros/content.html | 2 ++ templates/macros/page_desc.html | 2 ++ templates/macros/page_header.html | 2 ++ templates/macros/paginate.html | 2 ++ templates/page.html | 2 ++ templates/partials/footer.html | 18 +++++++++--------- templates/partials/header.html | 12 ++++++------ templates/section.html | 2 ++ 11 files changed, 35 insertions(+), 16 deletions(-) diff --git a/templates/404.html b/templates/404.html index facb826..9dfad10 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,8 +1,10 @@ {% extends "page.html" %} {% block main_content %} +
{{ macros_page_header::page_header(title="404")}} not found
+ {% endblock main_content %} diff --git a/templates/archive.html b/templates/archive.html index 32d6ef2..7f7333f 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -1,4 +1,6 @@ -{% extends "base.html" %} {% block main_content %} +{% extends "base.html" %} + +{% block main_content %} {{ macros_page_header::page_header(title=section.title) }} @@ -27,4 +29,5 @@ + {% endblock main_content %} diff --git a/templates/macros/cards_posts.html b/templates/macros/cards_posts.html index dc6907b..4edb704 100644 --- a/templates/macros/cards_posts.html +++ b/templates/macros/cards_posts.html @@ -1,4 +1,5 @@ {% macro cards_posts(pages) %} +
{%- for page in pages %}
@@ -38,4 +39,5 @@ {% endfor -%}
+ {% endmacro cards_posts %} diff --git a/templates/macros/content.html b/templates/macros/content.html index 0c8c1bf..4c04b58 100644 --- a/templates/macros/content.html +++ b/templates/macros/content.html @@ -1,4 +1,5 @@ {% macro content(page) %} + {% set separator = config.extra.separator | default(value="•") %}
@@ -81,4 +82,5 @@
+ {% endmacro content %} diff --git a/templates/macros/page_desc.html b/templates/macros/page_desc.html index d35fbf1..2449145 100644 --- a/templates/macros/page_desc.html +++ b/templates/macros/page_desc.html @@ -1,4 +1,5 @@ {% macro page_desc(desc, page) %} + + {% endmacro %} diff --git a/templates/macros/page_header.html b/templates/macros/page_header.html index d0b5710..e0a19bd 100644 --- a/templates/macros/page_header.html +++ b/templates/macros/page_header.html @@ -1,5 +1,7 @@ {% macro page_header(title) %} +
{{ title }}
+ {% endmacro page_header %} diff --git a/templates/macros/paginate.html b/templates/macros/paginate.html index 1f44525..7e01af6 100644 --- a/templates/macros/paginate.html +++ b/templates/macros/paginate.html @@ -1,4 +1,5 @@ {% macro paginate() %} + {% if paginator %} {% endif %} + {% endmacro paginate %} diff --git a/templates/page.html b/templates/page.html index 071651e..dc989d7 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,5 +1,7 @@ {% extends "base.html" %} {% block main_content %} + {{ macros_content::content(page=page)}} + {% endblock main_content %} diff --git a/templates/partials/footer.html b/templates/partials/footer.html index a2a93e5..868e78c 100644 --- a/templates/partials/footer.html +++ b/templates/partials/footer.html @@ -1,14 +1,14 @@
- +
diff --git a/templates/partials/header.html b/templates/partials/header.html index 37a61e0..68e73d9 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -8,7 +8,7 @@ {# Favicon #} {% if config.extra.favicon %} - + {% endif %} {# RSS #} @@ -17,16 +17,16 @@ {% if config.extra.stylesheets %} - {% for stylesheet in config.extra.stylesheets %} - - {% endfor %} + {% for stylesheet in config.extra.stylesheets %} + + {% endfor %} {% endif %} {% if is_404 %} - + {% else %} - + {% endif %} diff --git a/templates/section.html b/templates/section.html index a96ace0..f3f95dd 100644 --- a/templates/section.html +++ b/templates/section.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% block main_content %} + {% if section.extra.section_path -%} {% set extra_section = get_section(path=section.extra.section_path) %} {% endif -%} @@ -27,4 +28,5 @@ {% if paginator %} {{ macros_paginate::paginate() }} {% endif %} + {% endblock main_content %}