Hierarchical navigation menu #4
1 changed files with 19 additions and 11 deletions
|
@ -7,16 +7,24 @@
|
||||||
{% for s in sec.subsections %}
|
{% for s in sec.subsections %}
|
||||||
{% set p = get_section(path=s) %}
|
{% set p = get_section(path=s) %}
|
||||||
<div class="toc-item">
|
<div class="toc-item">
|
||||||
{% if p.path == current.path %}
|
{% if p.subsections or p.pages %}
|
||||||
<a class="subtext" href="{{ p.permalink | safe}}">⯆ <b>{{ p.title }}</b></a>
|
{% if p.path == current.path %}
|
||||||
{% elif hierarchy is containing(s) %}
|
<a class="subtext" href="{{ p.permalink | safe}}">⯆ <b>{{ p.title }}</b></a>
|
||||||
<a class="subtext" href="{{ p.permalink | safe}}">⯆ {{ p.title }}</a>
|
{% elif hierarchy is containing(s) %}
|
||||||
|
<a class="subtext" href="{{ p.permalink | safe}}">⯆ {{ p.title }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a class="subtext" href="{{ p.permalink | safe}}">⯈ {{ p.title }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if hierarchy is containing(s) or current.path == p.path %}
|
||||||
|
{% if level + 1 < maxlevel %}
|
||||||
|
{{ nav::navsection(hierarchy=hierarchy,level=level + 1,current=current) }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="subtext" href="{{ p.permalink | safe}}">⯈ {{ p.title }}</a>
|
{% if p.path == current.path %}
|
||||||
{% endif %}
|
<a class="subtext" href="{{p.permalink | safe}}"><b>{{ p.title }}</b></a>
|
||||||
{% if hierarchy is containing(s) or current.path == p.path %}
|
{% else %}
|
||||||
{% if level + 1 < maxlevel %}
|
<a class="subtext" href="{{p.permalink | safe}}">{{ p.title }}</a>
|
||||||
{{ nav::navsection(hierarchy=hierarchy,level=level + 1,current=current) }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,9 +35,9 @@
|
||||||
{% for p in sec.pages %}
|
{% for p in sec.pages %}
|
||||||
<div class="toc-item">
|
<div class="toc-item">
|
||||||
{% if p.path == current.path %}
|
{% if p.path == current.path %}
|
||||||
<a class="subtext" href="{{p.permalink | safe}}"> <b>{{ p.title }}</b></a>
|
<a class="subtext" href="{{p.permalink | safe}}"><b>{{ p.title }}</b></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="subtext" href="{{p.permalink | safe}}"> {{ p.title }}</a>
|
<a class="subtext" href="{{p.permalink | safe}}">{{ p.title }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue