{%- extends "basic/layout.html" %}

{% if not title %}
{% set title = project %}
{% endif %}

{%- block htmltitle %}
<title>kplr—{{ title }}</title>
{% endblock %}

{%- block extrahead %}

    {{ super() }}

    <link rel="shortcut icon" href="{{ pathto('_static/favicon.png', 1) }}">
    <link rel="stylesheet" href="{{ pathto('_static/kplr.css', 1) }}" type="text/css" />

{% endblock %}

{%- block relbar1 %}{% endblock %}
{%- block relbar2 %}{% endblock %}

{%- block document %}

    <div class="container">

        <div class="title">
            <a href="{{ pathto(master_doc) }}">{{ project }}</a>
        </div>
        <div class="subtitle">{{ title }}</div>


        {{ super() }}

    </div>

{% endblock %}

{%- block footer %}

    <div class="container">
        <div id="footer">
            Copyright 2013 <a href="http://dan.iel.fm">Dan Foreman-Mackey</a>.
            Released under the MIT License.<br>
            This documentation was lovingly built using
            <a href="http://sphinx-doc.org/">Sphinx</a>.
        </div>

        <a href="{{ theme_github }}" class="github">
            <img style="position: absolute; top: 0; right: 0; border: 0;"
                src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"
                alt="Fork me on GitHub" class="github"/>
        </a>

        {% if theme_google_analytics != "None" %}
        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', '{{ theme_google_analytics }}']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>
        {% endif %}
    </div>

{%- endblock %}
