<!-- Vendored from https://github.com/executablebooks/sphinx-book-theme/blob/3736580774c84dcf8a2d84085ba022cc57552704/sphinx_book_theme/layout.html -->

{% extends "pydata_sphinx_theme/layout.html" %}

{% set is_single_page = (theme_single_page == True) or (theme_single_page == "True") %}
{% if is_single_page %}
{%- set sidebar_width_class = "col-md-2" %}
{% else %}
{%- set sidebar_width_class = "col-md-3" %}
{% endif %}

{% block extrahead %}
{{ super() }}

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z9MH3VT85Y"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());

    gtag('config', 'G-Z9MH3VT85Y');
</script>

{% if pageurl %}
<!-- Opengraph tags -->
<meta property="og:url" content="{{ pageurl }}" />
<meta property="og:type" content="article" />
<meta property="og:title" content="{% if pagetitle %}{{ pagetitle | e }}{% else %}{{ docstitle | e }}{% endif %}" />
<meta property="og:description" content="{{ page_description | e }}" />
{% if logourl %}
<meta property="og:image" content="{{ logourl }}" />{% endif %}

<meta name="twitter:card" content="summary" />
{% endif %}
{% endblock %}

<!-- Docs TOC is "d-none d-xl-block col-xl-2" -->

{% block docs_sidebar %}
<div class="col-12 {{ sidebar_width_class }} bd-sidebar site-navigation show{% if is_single_page %} single-page{% endif %}"
    id="site-navigation">
    {% if not is_single_page %}
    {% include "sidebar.html" %}
    {%- endif %}
</div>
{% endblock %}

{% block docs_main %}
<main class="col py-md-3 pl-md-4 bd-content overflow-auto" role="main">
    {% block docs_body %}
    {% include "topbar.html" %}
    <div id="main-content" class="row">
        <div class="col-12 col-md-9 pl-md-3 pr-md-0">
            {{ super() }}

            <div class="section" id="comments">
                <h2>
                    Comments
                    <a class="headerlink" href="#comments" title="Permalink to this headline">¶</a>
                </h2>
                <div id='discourse-comments'></div>
            </div>

            <script type="text/javascript">
                DiscourseEmbed = {
                    discourseUrl: 'https://pymedphys.discourse.group/',
                    discourseEmbedUrl: 'https://docs.pymedphys.com/{{ pagename }}'
                };

                (function () {
                    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
                    d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
                    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);
                })();
            </script>
            {% if theme_show_prev_next %}
            <div class='prev-next-bottom'>
                {{ prev_next(prev, next) }}
            </div>
            {% endif %}
        </div>
    </div>
    {% endblock %}
    {%- include "footer.html" %}
</main>
{% endblock %}

{% block docs_toc %}
{% endblock %}

{% block docs_navbar %}
{%- endblock %}

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