{% extends "!layout.html" %}
{% set rellinks = [('search', 'Enter search criteria', 'S', 'Search')] +
                  rellinks +
                  [('index', 'Full Table of Contents', 'C', 'Contents')] %}
{% set css_files = css_files + ["_static/kerb.css"] %}

{# Add a "feedback" button to the footer #}
{% macro feedback_rellinks() %}
    <div class="footer-wrapper" >
        <div class="footer" >
            <div class="right" ><i>Release: {{ release }}</i><br />
            {%- if show_copyright %}
              {%- if hasdoc('copyright') %}
                {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
              {%- else %}
                {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
              {%- endif %}
            {%- endif %}
            </div>
            <div class="left" >
                {%- for rellink in rellinks|reverse %}
                    <a href="{{ pathto(rellink[0]) }}"
                    title="{{ rellink[1]|striptags }}"
                    {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
                    {{ reldelim2 }}
                {%- endfor %}
                {%- block rootrellink %}
                    <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__{{ title }}">feedback</a>
                {%- endblock %}
            </div>
        </div>
    </div>
{%- endmacro %}

{% block footer %} {{ feedback_rellinks() }}{% endblock %}

{% block header %}
    <div class="header-wrapper">
        <div class="header" style="padding-bottom: 0px;">
            {% if logo %}
                <p class="logo">
                    {# Link logo to kerberos.org #}
                    <a href="http://kerberos.org"> <img class="logo"
                    src="{{ pathto('_static/' + logo, 1) }}" alt="Logo" /></a>
                </p>
            {% endif %}
            {% block headertitle %}
                <h1><a href="{{ pathto (master_doc) }}"
                style="color: {{ theme_bgcolor }}; font-size: 120%;
                padding-top: 10px;">{{ shorttitle|e }}</a></h1>
            {% endblock %}
            <div class="rel">
                {%- for rellink in rellinks|reverse %}
                    <a href="{{ pathto(rellink[0]) }}"
                    title="{{ rellink[1]|striptags }}"
                    {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
                    {{ reldelim2 }}
                {%- endfor %}
                <a href="mailto:krb5-bugs@mit.edu?subject=Documentation__{{ title }}">feedback</a>
            </div>
        </div>
    </div>
{% endblock %}

{%- block content %}
    <div class="content-wrapper">
        <div class="content">
            {%- block sidebar2 %} {%- endblock %}
            {%- block sidebar1 %}
                <div class="sidebar"
                    style="float: right; background: #F9F9F9">
                    <h2>{{ _('On this page') }} </h2>
                    {{ toc }}
                    <br/>
                    <h2>{{ _('Table of contents') }}</h2>
                    {{ toctree(collapse=true, maxdepth=3, titles_only=true, includehidden=false) }}
                    <br/>
                    <h4><a href="{{ pathto('index') }}">Full Table of Contents
                    </a></h4>
                    <h4>{{ _('Search') }}</h4>
                    <form class="search" action="{{ pathto('search') }}" method="get">
                        <input type="text" name="q" size="18" />
                        <input type="submit" value="{{ _('Go') }}" />
                        <input type="hidden" name="check_keywords" value="yes" />
                        <input type="hidden" name="area" value="default" />
                    </form>
                </div>
            {%- endblock %}
            <div class="document">
                 {%- block document %}{{ super() }}{%- endblock %}
            </div>
            <div class="clearer" ></div>
        </div>
    </div>
{% endblock %}
