{% extends "!layout.html" %}

{% block extrahead %}
    <link href="{{ pathto('_static/custom.css', True) }}" rel="stylesheet" type="text/css">
    <link rel="shortcut icon" href="{{ pathto('_static/favicon.ico', True) }}">
{% endblock %}

<!-- LOGO TEMPLATE OVERLOAD -->

{% block sidebartitle %}

{% if logo %}
    {# Not strictly valid HTML, but it's the only way to display/scale
        it properly, without weird scripting or heaps of work
    #}
    <a href="{{ pathto(master_doc) }}" id="logo_main"><img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="Logo" /></a>
{% endif %}

{% if logo and theme_logo_only %}
    <a id="title_under_logo" href="{{ pathto(master_doc) }}">
{% else %}
    <a id="title_under_logo" href="{{ pathto(master_doc) }}"> {{ project }}
{% endif %}
</a>

{% if theme_display_version %}
    {%- set nav_version = version %}
    {% if READTHEDOCS and current_version %}
        {%- set nav_version = current_version %}
    {% endif %}
    {% if nav_version %}
        <div class="version">
            {{ nav_version }}
        </div>
    {% endif %}
{% endif %}

{% include "searchbox.html" %}

{% endblock %}



<!-- MOBILE TOP BAR OVERLOAD -->
{% block mobile_nav %}
    <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
    <a href="{{ pathto(master_doc) }}">
        <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="Logo"/>
        </a>
    <a href="{{ pathto(master_doc) }}">
        {{ project }}
    </a>
{% endblock %}
