{% set bootstrap_version, navbar_version = "3.3.7", "" %}

{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %}

{%- set bs_content_width = render_sidebar and "9" or "12"%}

{%- block doctype -%}{%- endblock %}

{%- macro bsidebar() %}
  {%- if render_sidebar %}
  <div class="col-md-3" role="complementary">
    <nav id="sidebar" class="hidden-print hidden-sm hidden-xs">
      {%- for sidebartemplate in sidebars %}
        {%- include sidebartemplate %}
      {%- endfor %}
    </nav>
  </div>
  {%- endif %}
{%- endmacro %}

{%- block extrahead %}{%- endblock %}

{# Silence the sidebar's, relbar's #}
{% block header %}{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}

{%- block content %}
<div class="row">
	{%- block sidebar1 %}{%- endblock %}
	<div class="col-md-{{ bs_content_width }} content" role="main">
	{% block body %}{% endblock %}
	</div>
	{%- block sidebar2 %}{{ bsidebar() }}{%- endblock %}
</div>
{%- endblock %}

{%- block footer %}{%- endblock %}
