view docs/templates/inc/family-sidebar.html @ 852:4850f8c21b6e

core: Start of the big refactor for PieCrust 3.0. * Everything is a `ContentSource`, including assets directories. * Most content sources are subclasses of the base file-system source. * A source is processed by a "pipeline", and there are 2 built-in pipelines, one for assets and one for pages. The asset pipeline is vaguely functional, but the page pipeline is completely broken right now. * Rewrite the baking process as just running appropriate pipelines on each content item. This should allow for better parallelization.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 17 May 2017 00:11:48 -0700
parents 61d53d2163d6
children fd95fef51705
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 %}
{% if p.is_dir and p.is_page %}
    <li>{{ pagelink(p.title, p.url) }}
        <ul class="doc-level2">
        {% for p2 in p.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>