  <div id="navbar" class="{{ theme_navbar_class }} navbar-default {% if theme_navbar_fixed_top|tobool -%} navbar-fixed-top{%- endif -%}">
    <div class="container">
      <div class="navbar-header">
        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand"  href="{{ pathto('index') }}">
          {%- block sidebarlogo %}
            {%- if logo %}<span class=""><img src="{{ pathto('_static/' + logo, 1) }}"></span>{%- endif %}
          {%- endblock %}
          {% if theme_navbar_title -%}{{ theme_navbar_title|e }}{%- else -%}{{ project|e }}{%- endif -%}
        </a>
        <span class="navbar-text navbar-version pull-left hidden-sm hidden-xs"><b>{{ version|e }}</b></span>
      </div>

      {% block navcontent %}
        <div class="collapse navbar-collapse nav-collapse">
          <ul class="nav navbar-nav">
            {% block navbartoc %}
              {% include "globaltoc.html" %}
              {% if theme_navbar_pagenav %}
                {% include "navbartoc.html" %}
              {% endif %}
            {% endblock %}
            {% if theme_navbar_sidebarrel %}
              {% block sidebarrel %}
                {% include "relations.html" %}
              {% endblock %}
            {% endif %}
            {% block navbarextra %}
            {% endblock %}
            {% if theme_source_link_position == "nav" %}
              <li class="hidden-sm hidden-xs">{% include "sourcelink.html" %}</li>
            {% endif %}
          </ul>
          <ul class="nav navbar-nav navbar-right">
          {% block navbarsearch %}
            {% include "navbarsearchbox.html" %}
          {% endblock %}

          {% block language_selector %}
            {% include "language.html" %}
          {% endblock %}
          </ul>
        </div>
      {% endblock %}
    </div>
  </div>
