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

{# Custom CSS overrides #}
{% set bootswatch_css_custom = ['_static/cloudtheme/css/catalystcloud.css'] %}

{% set css_files = css_files + ['_static/bootstrap/css/bootstrap.min.css',
                                '_static/bootstrap/css/bootstrap-theme.min.css',
                                '_static/cloudtheme/css/catalystcloud.css'] %}

{% set script_files = script_files + [
    '_static/js/jquery-1.11.0.min.js',
    '_static/js/jquery-fix.js',
    '_static/bootstrap/js/bootstrap.min.js',
    '_static/bootstrap-sphinx.js'
  ]
%}

{%- set render_sidebar = False %}

{% block header %}{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}

{%- block content %}
<div class="row">
  {% include "navbar.html" %}
</div>
<div class="container-fluid">

  <div class="row">
    <div class="xs-hidden col-sm-3 col-md-2 sidebar">
      <div class="collapse navbar-collapse nav-collapse">
           {% block menu %}
          {% set toctree = toctree(maxdepth=2, collapse=true, includehidden=True) %}
          {% if toctree %}
              {{ toctree }}
          {% else %}
              <!-- Local TOC -->
              <div class="local-toc">{{ toc }}</div>
          {% endif %}
        {% endblock %}
        </div>
    </div>

    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
      <div class="{{ bs_span_prefix }}{{ bs_content_width }}">
      {% include "breadcrumbs.html" %}
        {% block body %}{% endblock %}
      </div>
    </div>

    {% block sidebar2 %} {# possible location for sidebar #} {% endblock %}
  </div>
</div>
{%- endblock %}
{%- block footer %}
<footer class="footer">
  <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <p class="pull-right">
      <a href="#">Back to top</a>
      {% if theme_source_link_position == "footer" %}
        <br/>
        {% include "sourcelink.html" %}
      {% endif %}
    </p>
    <p>
    {%- if show_copyright %}
      {%- if hasdoc('copyright') %}
        {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/>
      {%- else %}
        {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}<br/>
      {%- endif %}
    {%- endif %}
    {%- if last_updated %}
      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/>
    {%- endif %}
    {%- if show_sphinx %}
      {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}<br/>
    {%- endif %}
    </p>
  </div>
</footer>
<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//www.catalyst-analytics.nz/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', 81]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//www.catalyst-analytics.nz/piwik.php?idsite=81" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
{%- endblock %}
