diff options
Diffstat (limited to 'templates/_nav.html')
-rw-r--r-- | templates/_nav.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/templates/_nav.html b/templates/_nav.html index 0ab8ac7..31bfbe4 100644 --- a/templates/_nav.html +++ b/templates/_nav.html @@ -17,9 +17,11 @@ {{ nav::hamburger(root=root) }} {# Section title #} + {# <div class="toc-item toc-section"> - <a class="subtext" href="{{root.permalink | safe}}">{{ root.title }}</a> - </div> + <a class="subtext" href="{{root.permalink | safe}}">{{ root.title }}</a> + </div> + #} {# Choose between "tree" (has extra.parent) and "list" (default) collections #} {% set root_tree = root.pages | group_by(attribute="extra.parent") %} @@ -40,13 +42,18 @@ <input id="menu-toggle" type="checkbox" /> <label class='menu-button-container' for="menu-toggle"> <div class="menu-button"></div> - <div class="toc-item toc-menu-title subtext">{{ root.title }}</div> + <div class="toc-item toc-menu-title subtext">Sommaire</div> </label> {% endmacro %} {# (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) %} |