view docs/templates/inc/family-sidebar.html @ 1061:8178671f9a04

formatters: Remove Hoedown formatter, split it off to a pluging. Its availability was spotty depending on the platform (because `misaka` doesn't have binaries available for even Windows, for instance). So it was split off to a plugin that the user can install if needed.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 13 Feb 2018 13:32:09 -0800
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>