{% extends 'base.html' %}

{% block title %}{% set j = joiner(' &raquo; ') %}{% for name, _ in compound.breadcrumb %}{{ j() }}{{ name }}{% endfor %} source | {{ super() }}{% endblock %}

{% block header_links %}
{% if compound.footer_navigation and compound.footer_navigation[0] %}
  <link rel="prev" href="{{ compound.footer_navigation[0][0] }}" />
{% endif %}
{% if compound.footer_navigation and compound.footer_navigation[2] %}
  <link rel="next" href="{{ compound.footer_navigation[2][0] }}" />
{% endif %}
{% endblock %}

{% block main %}
        <h1>
          {% for name, target in compound.breadcrumb[:-1] %}
          <span class="m-breadcrumb"><a href="{{ target }}">{{ name }}</a> &raquo;</span>
          {% endfor %}
          {{ compound.breadcrumb[-1][0] }} <span class="m-thin">source</span>
        </h1>
        {% if compound.brief %}
        <p>{{ compound.brief }}</p>
        {% endif %}
        {% if compound.description %}
{{ compound.description }}
        {% endif %}
        {% if compound.footer_navigation %}
        <div class="m-note m-dim m-thin m-text-center">{% if compound.footer_navigation[0] %}<a href="{{ compound.footer_navigation[0][0] }}" class="m-doc">&laquo; {{ compound.footer_navigation[0][1] }}</a> | {% endif %}<a href="{{ compound.footer_navigation[1][0] }}" class="m-doc">{{ compound.footer_navigation[1][1] }}</a>{% if compound.footer_navigation[2] %} | <a href="{{ compound.footer_navigation[2][0] }}" class="m-doc">{{ compound.footer_navigation[2][1] }} &raquo;</a>{% endif %}</div>
        {% endif %}
{% endblock %}
