No arrows for empty sections
This commit is contained in:
parent
0900f2910e
commit
d99afca9ea
1 changed files with 19 additions and 11 deletions
|
@ -7,6 +7,7 @@
|
||||||
{% 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.subsections or p.pages %}
|
||||||
{% 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>
|
||||||
{% elif hierarchy is containing(s) %}
|
{% elif hierarchy is containing(s) %}
|
||||||
|
@ -19,6 +20,13 @@
|
||||||
{{ nav::navsection(hierarchy=hierarchy,level=level + 1,current=current) }}
|
{{ nav::navsection(hierarchy=hierarchy,level=level + 1,current=current) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% 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>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -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