{# We redefine for "basic/layout.html" to add a default `data-theme` attribute when # a default mode has been set. This also improves compatibility when JavaScript is disabled. #} {% set html_tag %} {% endset %} {%- extends "basic/layout.html" %} {%- import "static/webpack-macros.html" as _webpack with context %} {# A flag for whether we include a secondary sidebar based on the page metadata #} {% set remove_sidebar_secondary = (meta is defined and meta is not none and 'html_theme.sidebar_secondary.remove' in meta) or not theme_secondary_sidebar_items %} {%- block css %} {# The data-cfasync attribute disables CloudFlare's Rocket loader so that #} {# mode/theme are correctly set before the browser renders the page. #} {# https://github.com/pydata/pydata-sphinx-theme/pull/1045 #} {{ _webpack.head_pre_assets() }} {{ _webpack.head_pre_icons() }} {{- css() }} {{ _webpack.head_js_preload() }} {%- endblock css %} {%- block extrahead %} {%- if last_updated %} {%- endif %} {%- endblock extrahead %} {% block body_tag %} {# set up with scrollspy to update the toc as we scroll #} {# ref: https://getbootstrap.com/docs/4.0/components/scrollspy/ #} {# A button hidden by default to help assistive devices quickly jump to main content #} {# ref: https://www.youtube.com/watch?v=VUR0I5mqq7I #} {%- endblock %} {%- block content %} {# A tiny helper pixel to detect if we've scrolled #}
{# the scroll to top button #} {# checkbox to toggle primary sidebar #} {# Checkboxes to toggle the secondary sidebar #} {# A search field pop-up that will only show when the search button is clicked #}
{% include "../components/search-field.html" %}
{%- if theme_announcement -%} {% include "sections/announcement.html" %} {%- endif %} {% block docs_navbar %} {% endblock docs_navbar %}
{# Primary sidebar #} {# If we have no sidebar TOC, pop the TOC component from the sidebar list #} {% if get_sidebar_toctree_length(show_nav_level=theme_show_nav_level|int) == 0 %} {% set sidebars = sidebars | reject("in", "sidebar-nav-bs.html") | list %} {% endif %} {# Using an ID here so that the skip-link works #}
{# Main content area #} {% block docs_main %}
{# Article header #}
{% include "sections/header-article.html" %}
{# Article content #} {% block docs_body %} {# This is empty and only shows up if text has been highlighted by the URL #} {% include "components/searchbox.html" %}
{% block body %}{% endblock %}
{% endblock docs_body %} {# Article Footer #} {% if theme_article_footer_items %}
{% include "sections/footer-article.html" %}
{% endif %} {# prev-next buttons #} {% if theme_show_prev_next %}
{% include "components/prev-next.html" %}
{% endif %}
{# Secondary sidebar #} {% block docs_toc %} {% if not remove_sidebar_secondary %}
{% include "sections/sidebar-secondary.html" %}
{% endif %} {% endblock docs_toc %}
{% include "sections/footer-content.html" %}
{% endblock docs_main %}
{# Scripts placed at the end of the page to cut down on time to first content #} {%- block scripts_end %}{{ _webpack.body_post() }}{%- endblock scripts_end %} {%- endblock content %} {# Footer #} {%- block footer %} {%- endblock footer %} {# Silence the sidebars and relbars since we define our own #} {% block header %}{% endblock %} {% block relbar1 %}{% endblock %} {% block relbar2 %}{% endblock %} {% block sidebarsourcelink %}{% endblock %}