view docs/templates/inc/family-sidebar.html @ 1169:978ed6deea91

tests: Add ability to test different expected outputs based on Python version. Similar to the previous change, there was also a change in what gets escaped by `urllib.parse.quote` (as in: the tilde sign ('~') stopped being escaped). So now we need to be able to test different outputs in the tests, yay again.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 04 Oct 2019 11:15:11 -0700
parents fd95fef51705
children
line wrap: on
line source

{% macro pagelink(title, url) -%}
    <a href="{{url}}"{% if url == page.url %} class="active"{% endif %}>{{title}}</a>
{%- endmacro %}

<ul class="doc-level1">
{% for p in family.root.family.siblings %}
{% if p.is_dir and p.is_page %}
    <li>{{ pagelink(p.title, p.url) }}
        <ul class="doc-level2">
        {% for p2 in p.family.children %}
            <li>{{ pagelink(p2.title, p2.url) }}</li>
        {% endfor %}
        </ul>
    </li>
{% elif not p.is_dir and p.order %}
    <li>{{ pagelink(p.title, p.url) }}</li>
{% endif %}
{% endfor %}
</ul>