Hierarchical navigation menu #4

Merged
lx merged 3 commits from hier-nav-menu into main 2022-06-01 15:04:11 +00:00
Showing only changes of commit d99afca9ea - Show all commits

View file

@ -7,6 +7,7 @@
{% for s in sec.subsections %}
{% set p = get_section(path=s) %}
<div class="toc-item">
{% if p.subsections or p.pages %}
{% if p.path == current.path %}
<a class="subtext" href="{{ p.permalink | safe}}"><b>{{ p.title }}</b></a>
{% elif hierarchy is containing(s) %}
@ -19,6 +20,13 @@
{{ nav::navsection(hierarchy=hierarchy,level=level + 1,current=current) }}
{% endif %}
{% endif %}
{% else %}
{% if p.path == current.path %}
<a class="subtext" href="{{p.permalink | safe}}"><b>{{ p.title }}</b></a>
{% else %}
<a class="subtext" href="{{p.permalink | safe}}">{{ p.title }}</a>
{% endif %}
{% endif %}
</div>
{% endfor %}
{% endif %}
@ -27,9 +35,9 @@
{% for p in sec.pages %}
<div class="toc-item">
{% if p.path == current.path %}
<a class="subtext" href="{{p.permalink | safe}}">&nbsp;&nbsp;<b>{{ p.title }}</b></a>
<a class="subtext" href="{{p.permalink | safe}}"><b>{{ p.title }}</b></a>
{% else %}
<a class="subtext" href="{{p.permalink | safe}}">&nbsp;&nbsp;{{ p.title }}</a>
<a class="subtext" href="{{p.permalink | safe}}">{{ p.title }}</a>
{% endif %}
</div>
{% endfor %}