tree nav: handle virtual pages consistently as parents

This commit is contained in:
mDuo13
2021-04-30 17:54:24 -07:00
parent 517ba6663f
commit 68bb453508

View File

@@ -15,12 +15,17 @@
{% if "//" in pg.html %}
<a class="nav-link nav-leaf external-link" target="_blank" href="{% if "//" not in pg.html %}{{currentpage.prefix}}{% endif %}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'+pg.status+'.html' %}{% endif %} <i aria-hidden="true" class="fa fa-external-link"></i></a>
{% else %}
<a class="nav-link nav-leaf" href="{% if "//" not in pg.html %}{{currentpage.prefix}}{% endif %}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'+pg.status+'.html' %}{% endif %}</a>
<a class="nav-link nav-leaf" href="{% if "//" not in pg.html %}{{currentpage.prefix}}{% endif %}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'+pg.status+'.html' %}{% endif %}</a>
{% endif %}
{% else %}
<a class="nav-toggler {% if not active_parent and currentpage != pg %}collapsed{% endif %}" role="button" data-toggle="collapse" href="#tree_nav_group_{{n}}" aria-expanded="{% if active_parent or currentpage == pg %}true{% else %}false{% endif %}" aria-controls="tree_nav_group_{{n}}"></a>
<a class="nav-link{% if "//" in pg.html %} external-link{% endif %}" href="{% if "//" not in pg.html %}{{currentpage.prefix}}{% endif %}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'~pg.status~'.html' %}{% endif %}</a>
{% if "//" in pg.html %}
<a class="nav-link external-link" target="_blank" href="{% if "//" not in pg.html %}{{currentpage.prefix}}{% endif %}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'+pg.status+'.html' %}{% endif %} <i aria-hidden="true" class="fa fa-external-link"></i></a>
{% else %}
<a class="nav-link" href="{% if "//" not in pg.html %}{{currentpage.prefix}}{% endif %}{{pg.html}}">{{ pg.name }}{% if pg.status is defined %} {% include 'template-status_'+pg.status+'.html' %}{% endif %}</a>
{% endif %}
<nav class="nav flex-column {% if active_parent or pg == currentpage %}show {% else %}collapse{% endif %}" id="tree_nav_group_{{n}}">
{% for child in pg.children %}