{% extends "layout.html" %}
{% block body %}
    <div class="container">
        <div class="columns">
            <div class="column sb_body">
                <div class="title is-1">{{ resource.title }}</div>
                <div id="kbb-sphinx-body">{{ body }}</div>

                {% set series = resource.series(resources) %}
                {% if series %}
                    <section class="section kbb-listing">
                        <h2 class="title kbb-listing-heading">This Series</h2>
                        {% for r in resource.series(resources) %}
                            {% set is_active = r.docname == resource.docname %}
                            <div class="kbb-listing-item{{ ' kbb-listing-active' if is_active }}">
                                <div class="kb-listing-title">
                                    <a href="{{ pathto(r.docname) + '.html' }}">{{ r.title }}</a>
                                </div>
                                {% if r.excerpt %}
                                    <div class="kb-listing-excerpt">
                                        {{ r.excerpt }}
                                    </div>
                                {% endif %}
                            </div>
                        {% endfor %}
                    </section>
                {% endif %}
            </div>

            <div class="column is-3">
                {% include "sidenav.html" %}
            </div>
        </div>
    </div>
{% endblock %}