From 4bdd716db003c597049e92464285b45b10941792 Mon Sep 17 00:00:00 2001 From: ADRN Date: Sun, 8 Dec 2024 15:16:03 +0100 Subject: [PATCH] indentation --- templates/_nav.html | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/templates/_nav.html b/templates/_nav.html index 270f028..600ec4d 100644 --- a/templates/_nav.html +++ b/templates/_nav.html @@ -17,9 +17,11 @@ {{ nav::hamburger(root=root) }} {# Section title #} - - - + {# +
+ {{ root.title }} +
+ #} {# Choose between "tree" (has extra.parent) and "list" (default) collections #} {% set root_tree = root.pages | group_by(attribute="extra.parent") %} @@ -46,7 +48,12 @@ {# (Private) Build a breadcrumb for the page #} {# It's ugly because this is the hacky part of the project #} -{% macro breadcrumb(corpus, root, target) %}{% if 'parent' in target.extra and target.extra.parent != root %}{% set new_target = get_page(path=target.extra.parent) %}{{ nav::breadcrumb(corpus=corpus, root=root, target=new_target) }}:{{ new_target.relative_path }}{% endif %}{% endmacro %} +{% macro breadcrumb(corpus, root, target) %} + {% if 'parent' in target.extra and target.extra.parent != root %} + {% set new_target = get_page(path=target.extra.parent) %} + {{ nav::breadcrumb(corpus=corpus, root=root, target=new_target) }}:{{ new_target.relative_path }} + {% endif %} +{% endmacro %} {# (Private) Render a list menu (this is the simple fallback when extra.parent is not defined #} {% macro list(list, selected) %}