{# Import the theme's layout. #}
{% extends "!layout.html" %}

{% block extrahead %}
    <!-- Google Analytics tracking code -->
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
            Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
                })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-38125837-1', 'auto', {'storage': 'none'});
      ga('set', 'anonymizeIp', true);
      ga('send', 'pageview');
    </script>
{% endblock %}


{% block htmltitle %}
    {% if title == '' or title == 'Home' %}
        <title>{{ docstitle|e }}</title>
    {% else %}
        <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
    {% endif %}
{% endblock %}


{% block menu %}
    {{ super() }}

    {% if menu_links %}
        <p class="caption">
            <span class="caption-text">
            {% if menu_links_name %}
                {{ menu_links_name }}
            {% else %}
                External links
            {% endif %}
            </span>
        </p>
        <ul>
            {% for text, link in menu_links %}
                <li class="toctree-l1"><a href="{{ link }}">{{ text }}</a></li>
            {% endfor %}
        </ul>
    {% endif %}
{% endblock %}
