{% extends "!layout.html" %}

{% block header %}
    <div class="header-wrapper">
      <div class="header">
        {%- if logo %}
          <p class="logo"><a href="{{ pathto(master_doc) }}">
            <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
          </a></p>
        {%- endif %}
        {%- block headertitle %}
        <div class="headertitle">
          <a href="http://code.mindmeldr.com">code.mindmeldr.com</a>/<a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>
        </div>
        {%- endblock %}
        <div class="rel">
          {%- for rellink in rellinks|reverse %}
          <a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
             {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
          {%- if not loop.last %}{{ reldelim2 }}{% endif %}
          {%- endfor %}
        </div>
      </div>
    </div>
{% endblock %}

{%- block extrahead %}
{{ super() }}
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-35342722-1']);
  _gaq.push(['_trackPageview']);
</script>
{% endblock %}

{% block footer %}
{{ super() }}
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
  (function() {
    var ga = document.createElement('script');
    ga.src = ('https:' == document.location.protocol ?
              'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    ga.setAttribute('async', 'true');
    document.documentElement.firstChild.appendChild(ga);
  })();
</script>
</div>
{% endblock %}
