mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 19:55:54 +00:00
70 lines
3.6 KiB
HTML
70 lines
3.6 KiB
HTML
<div class="guide_toc">
|
|
{% if currentpage.doc_type is defined %}
|
|
<div class="sidenav_parent">
|
|
<a href="{{ (pages|selectattr('doc_type', 'equalto', currentpage.doc_type)|first).html }}">{{ currentpage.doc_type }}</a>
|
|
</div>
|
|
{% endif %}
|
|
<div id="sidenav_accordion" class="panel-group" role="tablist" aria-multiselectable="true">
|
|
{% for cat in categories %}
|
|
{% set catpages = pages|selectattr("category", "equalto", cat)|list %}
|
|
{% if currentpage.doc_type is defined %}
|
|
{% set catpages = catpages|selectattr("doc_type", "equalto", currentpage.doc_type)|list %}
|
|
{% endif %}
|
|
{% if catpages|length %}
|
|
<div class="panel panel-default{% if currentpage.category == cat %} active{% endif %}">
|
|
<div class="panel-heading" role="tab" id="sidenav_cat_head_{{loop.index}}">
|
|
<h5 class="panel-title">
|
|
{% if catpages|length > 1 %}
|
|
<a class="{% if currentpage.category != cat %}collapsed {% endif %}sidenav_cat_toggler" role="button" data-toggle="collapse" data-parent="#sidenav_accordion" href="#sidenav_collapse_{{loop.index}}" aria-expanded="true" aria-controls="sidenav_collapse_{{loop.index}}"> </a>
|
|
{% endif %}
|
|
<a class="sidenav_cat_title{% if currentpage == (pages|selectattr('category', 'equalto', cat)|first) %} active{% endif %}" href="{{ (pages|selectattr('category', 'equalto', cat)|first).html }}">{{ cat }}</a>
|
|
</h5>
|
|
</div><!-- /.panel-heading -->
|
|
|
|
<div id="sidenav_collapse_{{loop.index}}" class="collapse{% if currentpage.category == cat %} in{% endif %}" role="tabpanel" aria-labelledby="sidenav_cat_head_{{loop.index}}">
|
|
<div class="panel-body">
|
|
<ul class="sidebar_cat_pagelist">
|
|
{% set printed_subcategories = [] %}
|
|
{% for page in catpages %}
|
|
{% if loop.index != 1 %}{# Skip the first element since it's linked by the category header #}
|
|
{% if page.subcategory is undefined %}
|
|
{% if page == currentpage %}
|
|
<li><a class="active nosubcat-page" href="{{ page.html }}">{{ page.name }}</a></li>
|
|
{% else %}
|
|
<li><a class="nosubcat-page" href="{{ page.html }}">{{ page.name }}</a></li>
|
|
{% endif %}
|
|
{% elif page.subcategory not in printed_subcategories %}
|
|
{% if page == currentpage %}
|
|
<li><a class="subcat-title active" href="#main_content_body">{{ page.name }}</a></li>
|
|
{% elif page.subcategory == currentpage.subcategory %}
|
|
<li><a class="subcat-title active-parent" href="{{ page.html }}">{{ page.name }}</a></li>
|
|
{% else %}
|
|
<li><a class="subcat-title" href="{{ page.html }}">{{ page.name }}</a></li>
|
|
{% endif %}
|
|
|
|
{% for subpage in catpages|selectattr('subcategory', 'equalto', page.subcategory) %}
|
|
{% if subpage != page %}
|
|
{% if subpage == currentpage %}
|
|
<li><a class="active subpage" href="#main_content_body">{{ subpage.name }}</a></li>
|
|
{% else %}
|
|
<li><a class="subpage" href="{{ subpage.html }}">{{ subpage.name }}</a></li>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% set _ = printed_subcategories.append(page.subcategory) %}
|
|
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
</div><!-- /.panel-body -->
|
|
</div><!-- /#sidenav_collapse{{loop.index}} -->
|
|
|
|
</div><!-- /.panel -->
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
</div><!-- /#sidenav_accordion -->
|
|
</div><!-- /.guide_toc -->
|