view docs/templates/inc/family-sidebar.html @ 1149:be74ba54a06f

admin: Improvements to micropub endpoint's photo handling. - Add `.jpg` extension to photos that don't have any extension. - Add photos in the config section instead of the body, so that the layout can put them in separate `u-photo` tags.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 10 Jul 2018 21:03:58 -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>