{%- extends "!layout.html" %}

{% block docs_navbar %}
<nav class="navbar navbar-dark navbar-expand-lg bg-dark fixed-top bd-navbar" id="navbar-main">
    {%- include "sections/header.html" %}
</nav>
{% endblock %}

{% block docs_sidebar %}
{% if sidebars %}
<!-- Only show if we have sidebars configured, else just a small margin  -->
<div class="col-12 col-md-2 bd-sidebar">
  {%- for sidebartemplate in sidebars %}
  {%- include sidebartemplate %}
  {%- endfor %}
</div>
{% else %}
<div class="col-12 col-md-1 col-xl-2 bd-sidebar no-sidebar"></div>
{% endif %}
{% endblock %}

{% block docs_toc %}
<div class="d-none d-xl-block col-xl-2 bd-toc">
  {% if meta is defined and not (meta is not none and 'notoc' in meta) %}
  {% for toc_item in theme_page_sidebar_items %}
  <div class="toc-item">
    {% include toc_item %}
  </div>
  {% endfor %}
  {% endif %}
  {% if ('gallery' in pagename or 'reference' in pagename or 'user_guide' in pagename) and not pagename.endswith('index') %}
  <a href="https://mybinder.org/v2/gh/holoviz/panel/{{ last_release }}?urlpath=lab/tree/examples/{{ pagename }}.ipynb" style="padding-left: 1.5rem;">Open this page in Binder</a>
  {% endif %}
</div>
{% endblock %}

{% block docs_main %}
{% if sidebars %}
{% set content_col_class = "col-md-10 col-xl-8" %}
{% else %}
{% set content_col_class = "col-md-11 col-xl-8" %}
{% endif %}
<div class="bd-content col-12 {{ content_col_class }}" role="main">
  {% block docs_body %}
  <article class="bd-article" role="main">
    {% block body %} {% endblock %}
  </article>
  {% endblock %}
  {% if theme_show_prev_next %}
  <footer class="bd-footer-article">
    {% include "sections/footer-article.html" %}
  </footer>
  {% endif %}
</div>
{% endblock %}
