{% extends "base" %}
{% import "breadcrumbs" as breadcrumbs with context %}
{% import "navbar" as navbar with context %}

{% set page = {"slug": "documentation"} %}
{% set script_files = script_files + ['_static/jquery.pin.min.js', '_static/headers.js'] %}
{% set css_files = ['_static/sphinx_design.css', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'] + css_files %}

{% set render_sidebar = true %}
{% if theme_nosidebar == true or title == 'Documentation' %}
{%     set render_sidebar = false %}
{% endif %}

{% block content %}
  {% if render_sidebar %}
  <section class="b-lightgray_block b-documentation_top b-clearbox p-documentation_in">
  {% else %}
  <section class="b-lightgray_block b-documentation_top b-clearbox">
  {% endif %}
    <div class="b-block-wrapper">
      <h2 class="b-section-title">{{ title }}</h2>
      {% if title == 'Documentation' %}
      {%   include "searchbox.html" %}
      {% endif %}
    </div>
  </section>
  {%- if render_sidebar %}
  <div class="b-cols_content b-clearbox">
    <div class="b-cols_content_left">
      {% if title != 'Documentation' %}
      {%   include "searchbox.html" %}
      {% endif %}
      {{ toctree(maxdepth=2) }}
    </div>
    <div class="b-cols_content_right">
      <div class="b-cols_content_right-slot">
  {% else %}
  <section class="b-block b-documentation">
    <div class="b-block-wrapper">
  {% endif %}
    {{- breadcrumbs.breadcrumbs() -}}
        <article class="b-article">
          {% if render_sidebar == false and title != 'Documentation' %}
            {{ toctree(maxdepth=2, collapse=false) }}
          {% endif %}
          {% block body %} {% endblock %}
        </article>
    {{- navbar.navbar(False) -}}
  {% if render_sidebar %}
      </div>
    </div>
  </div>
  {% else %}
    </div>
  </section>
  {%- endif %}
{% endblock content%}

{# vim: syntax=htmldjango ts=2 sts=2 sw=2 expandtab #}
