{#
    basic/layout.html
    ~~~~~~~~~~~~~~~~~

    Master layout template for Sphinx themes.

    :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
#}

{%- block doctype -%}
{%- if html5_doctype %}
<!DOCTYPE html>
{%- else %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{%- endif %}
{%- endblock %}

{%- set bcdelim = bcdelim is not defined and ' &#187;' or bcdelim %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
                         (sidebars != []) %}
{%- set url_root = pathto('', 1) %}

{# XXX necessary? #}
{%- if url_root == '#' %}
  {% set url_root = '' %}
{% endif %}
{%- if not embedded and docstitle %}
  {%- set titlesuffix = " &#8212; "|safe + docstitle|e %}
{%- else %}
  {%- set titlesuffix = "" %}
{%- endif %}

{%- macro relbar() %}
  <ul class="pagination pagination-sm" role="navigation" aria-label="related navigation">

    {%- for rellink in rellinks %}
    <li class="page-item">
      <a class="page-link" href="{{ pathto(rellink[0])|e }}" title="{{ rellink[1]|striptags|e }}"
          {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
    </li>
    {%- endfor %}

    {%- block relbaritems %}{% endblock %}

  </ul>
{%- endmacro %}

{%- macro breadcrumb() %}
<ul class="breadcrumb">

  {%- block rootrellink %}
  <li class="breadcrumb-item">
    <a href="{{ pathto(master_doc)|e }}">{{ shorttitle|e }}</a>
  </li>
  {%- endblock %}

  {%- for parent in parents %}
  <li class="breadcrumb-item">
    <a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>
  </li>
  {%- endfor %}

  <li class="breadcrumb-item active">{{ title }}</li>


</ul>
{%- endmacro %}

{%- macro sidebar() %}
  {%- if render_sidebar %}
  <div class="sidebar-overlay hidden" role="navigation" aria-label="main navigation">
    <div class="sidebar">

      {%- block sidebarlogo %}
      {%- if logo %}
        <p class="logo"><a href="{{ pathto(master_doc)|e }}">
          <img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/>
        </a></p>
      {%- endif %}
      {%- endblock %}

      {%- if sidebars != None %}
        {#- new style sidebar: explicitly include/exclude templates #}
        {%- for sidebartemplate in sidebars %}
        {%- include sidebartemplate %}
        {%- endfor %}
      {%- else %}
        {#- old style sidebars: using blocks -- should be deprecated #}
        {%- block sidebartoc %}
        {%- include "localtoc.html" %}
        {%- endblock %}
        {%- block sidebarrel %}
        {%- include "relations.html" %}
        {%- endblock %}
        {%- block sidebarsourcelink %}
        {%- include "sourcelink.html" %}
        {%- endblock %}
        {%- if customsidebar %}
        {%- include customsidebar %}
        {%- endif %}
      {%- endif %}
      
    </div>
  </div>
  {%- endif %}
{%- endmacro %}

{%- macro script() %}
  <script id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
  {%- for js in script_files %}
  {{ js_tag(js) }}
  {%- endfor %}
{%- endmacro %}

{%- macro css() %}
  <link rel="stylesheet" href="{{ pathto('_static/' + style, 1)|e }}" type="text/css" />
  <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.1.1/css/all.min.css" type="text/css" />
  {%- for css in css_files %}
    {%- if css|attr("filename") %}
  {{ css_tag(css) }}
    {%- else %}
  <link rel="stylesheet" href="{{ pathto(css, 1)|e }}" type="text/css" />
    {%- endif %}
  {%- endfor %}
{%- endmacro %}

{%- if html_tag %}
{{ html_tag }}
{%- else %}
<html {% if not html5_doctype %} xmlns="http://www.w3.org/1999/xhtml" {% endif %}
{% if language is not none %} lang="{{ language }}"{% endif %}>
{%- endif %}

<head>
  
  {%- if not html5_doctype and not skip_ua_compatible %}
  <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  {%- endif %}
  
  {%- if use_meta_charset or html5_doctype %}
  <meta charset="{{ encoding }}" />
  {%- else %}
  <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
  {%- endif %}

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />

  {{- metatags }}

  {%- block htmltitle %}
  <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
  {%- endblock %}

  {%- block css %}
  {{- css() }}
  {%- endblock %}


  {%- if not embedded %}

  {%- block scripts %}
  {{- script() }}
  {%- endblock %}

  {%- if pageurl %}
  <link rel="canonical" href="{{ pageurl|e }}" />
  {%- endif %}

  {%- if use_opensearch %}
  <link rel="search" type="application/opensearchdescription+xml"
        title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
        href="{{ pathto('_static/opensearch.xml', 1) }}"/>
  {%- endif %}

  {%- if favicon %}
  <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1)|e }}"/>
  {%- endif %}

  {%- endif %}


  {%- block linktags %}
    {%- if hasdoc('about') %}
    <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
    {%- endif %}
    {%- if hasdoc('genindex') %}
    <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
    {%- endif %}
    {%- if hasdoc('search') %}
    <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
    {%- endif %}
    {%- if hasdoc('copyright') %}
    <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
    {%- endif %}
    {%- if next %}
    <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
    {%- endif %}
    {%- if prev %}
    <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
    {%- endif %}
  {%- endblock %}

  {%- block extrahead %} {% endblock %}
</head>

<body>

{%- block navbar %}
<nav id="navbar" class="navbar fixed-top navbar-expand-lg navbar-light border-bottom border-2">
  <div class="container docs-container">
    
    <a class="navbar-brand" href="#">{{ project }}</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-content" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbar-content">
      
      <div class="d-flex ms-auto">
        <div class="nav-item pe-2">
          <button type="button" class="btn btn-outline-primary d-block d-lg-none" data-bs-toggle="offcanvas"
          data-bs-target="#sidebar-offcanvas" aria-controls="sidebar-offcanvas">
            <i class="fas fa-plus"></i>
          </button>
        </div>
        <div class="w-100">
        {%- block searchbox %}
          <form class="d-flex" action="{{ pathto('search') }}" method="get" role="search">
            <input class="form-control me-2" type="search" name="q" aria-label="Search">
            <button class="btn btn-primary" type="submit">{{ _('search') }}</button>
          </form>
          {%- endblock %}
        </div>
      </div>
      

    </div>

  </div>
</nav>
{%- endblock %}

{%- block content %}
<div id="main-container" class="docs-container">
  <div class="row py-3">

    {%- if render_sidebar %}
    {%- block sidebar %}
    <div id="sidebar-container" class="d-none d-lg-block">
      {{ sidebar() }}
    </div>
    {% endblock %}
    {%- endif %}
    
    {%- block document %}
    <div class="col">
      {{ relbar() }}
      {{ breadcrumb() }}
      
      <hr />
      <div class="body" role="main">
      {% block body %}{% endblock %}
      </div>
      <hr />

      {{ relbar() }}
    </div>
    {%- endblock %}

  </div>
</div>
{%- endblock %}

{%- block offcanvas %}
<div class="offcanvas offcanvas-start" tabindex="-1" id="sidebar-offcanvas">
  <div class="offcanvas-header">
    <h5 class="offcanvas-title">{{ project }}</h5>
    <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  </div>
  <div class="offcanvas-body">
    {{ sidebar() }}
  </div>
</div>
{%- endblock %}

{%- block footer %}
<footer id="page-footer" role="contentinfo">
  <div class="docs-container pt-3 pb-5 text-center">

  {%- if show_copyright %}
    {%- if hasdoc('copyright') %}
      {% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
    {%- else %}
      {% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
    {%- endif %}
  {%- endif %}

  {%- if last_updated %}
    {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
  {%- endif %}

  {%- if show_sphinx %}
    {% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
  {%- endif %}

  </div>
</div>
{%- endblock %}

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"></script>

</body>
</html>
