Templates: Cleanup Whitespace (#1060)

While not perfect this cuts it down a lot and makes the html output much 
cleaner
This commit is contained in:
Aaron Carlisle 2021-03-01 10:09:03 -05:00 committed by GitHub
parent 331ba4e93c
commit 8ba9c8ac0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 151 additions and 155 deletions

View File

@ -1,6 +1,6 @@
{%- extends "!layout.html" %} {%- extends "!layout.html" %}
{# {#-
This template exists as a way to implement a version menu without changing what This template exists as a way to implement a version menu without changing what
the theme normally renders the menu on local builds and on builds on Read the the theme normally renders the menu on local builds and on builds on Read the
@ -8,8 +8,8 @@ Docs. This is for local testing purposes only.
#} #}
{% block footer %} {%- block footer %}
{% if not READTHEDOCS %} {%- if not READTHEDOCS %}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Versions') }}"> <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Versions') }}">
<span class="rst-current-version" data-toggle="rst-current-version"> <span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span> <span class="fa fa-book"> Read the Docs</span>
@ -19,15 +19,15 @@ Docs. This is for local testing purposes only.
<div class="rst-other-versions"> <div class="rst-other-versions">
<dl> <dl>
<dt>{{ _('Versions') }}</dt> <dt>{{ _('Versions') }}</dt>
{% if test_versions %} {%- if test_versions %}
{% for version in test_versions %} {%- for version in test_versions %}
<dd><a href="#">{{ version }}</a></dd> <dd><a href="#">{{ version }}</a></dd>
{% endfor %} {%- endfor %}
{% else %} {%- else %}
<dd><a href="#">latest</a></dd> <dd><a href="#">latest</a></dd>
<dd><a href="#">1.0</a></dd> <dd><a href="#">1.0</a></dd>
<dd><a href="#">1.1</a></dd> <dd><a href="#">1.1</a></dd>
{% endif %} {%- endif %}
</dl> </dl>
<dl> <dl>
<dt>{{ _('Downloads') }}</dt> <dt>{{ _('Downloads') }}</dt>
@ -36,7 +36,7 @@ Docs. This is for local testing purposes only.
<dd><a href="#">HTML</a></dd> <dd><a href="#">HTML</a></dd>
</dl> </dl>
<dl> <dl>
{# Translators: The phrase "Read the Docs" is not translated #} {#- Translators: The phrase "Read the Docs" is not translated #}
<dt>{{ _('On Read the Docs') }}</dt> <dt>{{ _('On Read the Docs') }}</dt>
<dd> <dd>
<a href="#">{{ _('Project Home') }}</a> <a href="#">{{ _('Project Home') }}</a>
@ -51,5 +51,5 @@ Docs. This is for local testing purposes only.
</dl> </dl>
</div> </div>
</div> </div>
{% endif %} {%- endif %}
{% endblock %} {%- endblock %}

View File

@ -1,84 +1,83 @@
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} {#- Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
{% if page_source_suffix %} {%- if page_source_suffix %}
{% set suffix = page_source_suffix %} {%- set suffix = page_source_suffix %}
{% else %} {%- else %}
{% set suffix = source_suffix %} {%- set suffix = source_suffix %}
{% endif %} {%- endif %}
{% if meta is defined and meta is not none %} {%- if meta is defined and meta is not none %}
{% set check_meta = True %} {%- set check_meta = True %}
{% else %} {%- else %}
{% set check_meta = False %} {%- set check_meta = False %}
{% endif %} {%- endif %}
{% if check_meta and 'github_url' in meta %} {%- if check_meta and 'github_url' in meta %}
{% set display_github = True %} {%- set display_github = True %}
{% endif %} {%- endif %}
{% if check_meta and 'bitbucket_url' in meta %} {%- if check_meta and 'bitbucket_url' in meta %}
{% set display_bitbucket = True %} {%- set display_bitbucket = True %}
{% endif %} {%- endif %}
{% if check_meta and 'gitlab_url' in meta %} {%- if check_meta and 'gitlab_url' in meta %}
{% set display_gitlab = True %} {%- set display_gitlab = True %}
{% endif %} {%- endif %}
{% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %} {%- set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
<div role="navigation" aria-label="{{ _('Breadcrumbs') }}"> <div role="navigation" aria-label="{{ _('Breadcrumbs') }}">
<ul class="wy-breadcrumbs"> <ul class="wy-breadcrumbs">
{% block breadcrumbs %} {%- block breadcrumbs %}
<li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a> &raquo;</li> <li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a> &raquo;</li>
{% for doc in parents %} {%- for doc in parents %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li> <li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
{% endfor %} {%- endfor %}
<li>{{ title }}</li> <li>{{ title }}</li>
{% endblock %} {%- endblock %}
{% block breadcrumbs_aside %} {%- block breadcrumbs_aside %}
<li class="wy-breadcrumbs-aside"> <li class="wy-breadcrumbs-aside">
{% if hasdoc(pagename) and display_vcs_links %} {%- if hasdoc(pagename) and display_vcs_links %}
{% if display_github %} {%- if display_github %}
{% if check_meta and 'github_url' in meta %} {%- if check_meta and 'github_url' in meta %}
<!-- User defined GitHub URL --> <!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> <a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% else %} {%- else %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> <a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% endif %} {%- endif %}
{% elif display_bitbucket %} {%- elif display_bitbucket %}
{% if check_meta and 'bitbucket_url' in meta %} {%- if check_meta and 'bitbucket_url' in meta %}
<!-- User defined Bitbucket URL --> <!-- User defined Bitbucket URL -->
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> <a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{% else %} {%- else %}
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> <a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{% endif %} {%- endif %}
{% elif display_gitlab %} {%- elif display_gitlab %}
{% if check_meta and 'gitlab_url' in meta %} {%- if check_meta and 'gitlab_url' in meta %}
<!-- User defined GitLab URL --> <!-- User defined GitLab URL -->
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> <a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{% else %} {%- else %}
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> <a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{% endif %} {%- endif %}
{% elif show_source and source_url_prefix %} {%- elif show_source and source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a> <a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a>
{% elif show_source and has_source and sourcename %} {%- elif show_source and has_source and sourcename %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a> <a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
{% endif %} {%- endif %}
{% endif %} {%- endif %}
</li> </li>
{% endblock %} {%- endblock %}
</ul> </ul>
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} {%- if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{{ _('Breadcrumbs') }}"> <div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{{ _('Breadcrumbs') }}">
{% if prev %} {%- if prev %}
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a> <a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
{% endif %} {%- endif %}
{% if next %} {%- if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> <a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
{% endif %} {%- endif %}
</div> </div>
{% endif %} {%- endif %}
<hr/> <hr/>
</div> </div>

View File

@ -17,44 +17,44 @@
<p> <p>
{%- if show_copyright %} {%- if show_copyright %}
{%- if hasdoc('copyright') %} {%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %} {%- trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %} {%- else %}
{% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %} {%- trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
{%- if build_id and build_url %} {%- if build_id and build_url %}
<span class="build"> <span class="build">
{# Translators: Build is a noun, not a verb #} {#- Translators: Build is a noun, not a verb -#}
{% trans %}Build{% endtrans %} {%- trans %}Build{% endtrans -%}
<a href="{{ build_url }}">{{ build_id }}</a>. <a href="{{ build_url }}">{{ build_id }}</a>.
</span> </span>
{%- elif commit %} {%- elif commit %}
<span class="commit"> <span class="commit">
{# Translators: the phrase "revision" comes from Git, referring to a commit #} {#- Translators: the phrase "revision" comes from Git, referring to a commit #}
{% trans %}Revision{% endtrans %} <code>{{ commit }}</code>. {%- trans %}Revision{% endtrans %} <code>{{ commit }}</code>.
</span> </span>
{%- endif %} {%- endif %}
{%- if last_updated %} {%- if last_updated %}
<span class="lastupdated"> <span class="lastupdated">
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} {%- trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
</span> </span>
{%- endif %} {%- endif -%}
</p> </p>
{%- endblock %} {%- endblock %}
</div> </div>
{%- if show_sphinx %} {% if show_sphinx %}
{% set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %} {%- set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
{% set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %} {%- set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
{# Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #} {#- Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
{% trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %} {%- trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
{# Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documenation #} {#- Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documenation #}
<a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a> <a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
{# Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #} {#- Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}. {%- trans %}provided by {{ readthedocs_web }}{% endtrans %}.
{%- endif %} {% endif %}
{%- block extrafooter %} {% endblock %} {%- block extrafooter %} {% endblock %}

View File

@ -7,61 +7,61 @@
{%- set titlesuffix = "" %} {%- set titlesuffix = "" %}
{%- endif %} {%- endif %}
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %} {%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
{%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' %} {%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' -%}
<!DOCTYPE html> <!DOCTYPE html>
<html class="{{ sphinx_writer }}" lang="{{ lang_attr }}" > <html class="{{ sphinx_writer }}" lang="{{ lang_attr }}" >
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
{{ metatags }} {{- metatags }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% block htmltitle %} {%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title> <title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{% endblock %} {%- endblock -%}
{# CSS #} {#- CSS #}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for css in css_files %} {%- for css in css_files %}
{%- if css|attr("rel") %} {%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} /> <link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
{%- else %} {%- else %}
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- for cssfile in extra_css_files %} {%- for cssfile in extra_css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %} {%- endfor -%}
{# FAVICON #} {#- FAVICON #}
{% if favicon %} {%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/> <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{% endif %} {%- endif -%}
{# CANONICAL URL (deprecated) #} {#- CANONICAL URL (deprecated) #}
{% if theme_canonical_url and not pageurl %} {%- if theme_canonical_url and not pageurl %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/> <link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
{% endif %} {%- endif -%}
{# CANONICAL URL #} {#- CANONICAL URL #}
{%- if pageurl %} {%- if pageurl %}
<link rel="canonical" href="{{ pageurl|e }}" /> <link rel="canonical" href="{{ pageurl|e }}" />
{%- endif %} {%- endif -%}
{# JAVASCRIPTS #} {#- JAVASCRIPTS #}
{%- block scripts %} {%- block scripts %}
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script> <script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
<![endif]--> <![endif]-->
{%- if not embedded %} {%- if not embedded %}
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #} {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
{% if sphinx_version >= "1.8.0" %} {%- if sphinx_version >= "1.8.0" -%}
<script type="text/javascript" id="documentation_options" data-url_root="{{ url_root }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script> <script type="text/javascript" id="documentation_options" data-url_root="{{ url_root }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
{%- for scriptfile in script_files %} {%- for scriptfile in script_files %}
{{ js_tag(scriptfile) }} {{ js_tag(scriptfile) }}
{%- endfor %} {%- endfor %}
{% else %} {%- else %}
<script type="text/javascript"> <script type="text/javascript">
var DOCUMENTATION_OPTIONS = { var DOCUMENTATION_OPTIONS = {
URL_ROOT:'{{ url_root }}', URL_ROOT:'{{ url_root }}',
@ -76,10 +76,10 @@
{%- for scriptfile in script_files %} {%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script> <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %} {%- endfor %}
{% endif %} {%- endif %}
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script> <script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{# OPENSEARCH #} {#- OPENSEARCH #}
{%- if use_opensearch %} {%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml" <link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
@ -113,110 +113,107 @@
<body class="wy-body-for-nav"> <body class="wy-body-for-nav">
{% block extrabody %} {% endblock %} {%- block extrabody %} {% endblock %}
<div class="wy-grid-for-nav"> <div class="wy-grid-for-nav">
{# SIDE NAV, TOGGLES ON MOBILE #} {#- SIDE NAV, TOGGLES ON MOBILE #}
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> <nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll"> <div class="wy-side-scroll">
<div class="wy-side-nav-search" {% if theme_style_nav_header_background %} style="background: {{theme_style_nav_header_background}}" {% endif %}> <div class="wy-side-nav-search" {% if theme_style_nav_header_background %} style="background: {{theme_style_nav_header_background}}" {% endif %}>
{% block sidebartitle %} {%- block sidebartitle %}
{% if logo and theme_logo_only %} {%- if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}"> <a href="{{ pathto(master_doc) }}">
{% else %} {%- else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }} <a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
{% endif %} {%- endif %}
{% if logo %} {%- if logo %}
{# Not strictly valid HTML, but it's the only way to display/scale {#- Not strictly valid HTML, but it's the only way to display/scale
it properly, without weird scripting or heaps of work it properly, without weird scripting or heaps of work
#} #}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/> <img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
{% endif %} {%- endif %}
</a> </a>
{% if theme_display_version %} {%- if theme_display_version %}
{%- set nav_version = version %} {%- set nav_version = version %}
{% if READTHEDOCS and current_version %} {%- if READTHEDOCS and current_version %}
{%- set nav_version = current_version %} {%- set nav_version = current_version %}
{% endif %} {%- endif %}
{% if nav_version %} {%- if nav_version %}
<div class="version"> <div class="version">
{{ nav_version }} {{ nav_version }}
</div> </div>
{% endif %} {%- endif %}
{% endif %} {%- endif %}
{% include "searchbox.html" %} {%- include "searchbox.html" %}
{% endblock %} {%- endblock %}
</div> </div>
{% block navigation %} {%- block navigation %}
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="{{ _('Main') }}"> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="{{ _('Main') }}">
{% block menu %} {%- block menu %}
{# {#-
The singlehtml builder doesn't handle this toctree call when the The singlehtml builder doesn't handle this toctree call when the
toctree is empty. Skip building this for now. toctree is empty. Skip building this for now.
#} #}
{% if 'singlehtml' not in builder %} {%- if 'singlehtml' not in builder %}
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int, {%- set global_toc = toctree(maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool, collapse=theme_collapse_navigation|tobool,
includehidden=theme_includehidden|tobool, includehidden=theme_includehidden|tobool,
titles_only=theme_titles_only|tobool) %} titles_only=theme_titles_only|tobool) %}
{% endif %} {%- endif %}
{% if global_toc %} {%- if global_toc %}
{{ global_toc }} {{ global_toc }}
{% else %} {%- else %}
<!-- Local TOC --> <!-- Local TOC -->
<div class="local-toc">{{ toc }}</div> <div class="local-toc">{{ toc }}</div>
{% endif %} {%- endif %}
{% endblock %} {%- endblock %}
</div> </div>
{% endblock %} {%- endblock %}
</div> </div>
</nav> </nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #} {#- MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
<nav class="wy-nav-top" aria-label="{{ _('Top') }}"> <nav class="wy-nav-top" aria-label="{{ _('Top') }}">
{% block mobile_nav %} {%- block mobile_nav %}
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="{{ pathto(master_doc) }}">{{ project }}</a> <a href="{{ pathto(master_doc) }}">{{ project }}</a>
{% endblock %} {%- endblock %}
</nav> </nav>
<div class="wy-nav-content"> <div class="wy-nav-content">
{%- block content %} {%- block content %}
{% if theme_style_external_links|tobool %} {%- if theme_style_external_links|tobool %}
<div class="rst-content style-external-links"> <div class="rst-content style-external-links">
{% else %} {%- else %}
<div class="rst-content"> <div class="rst-content">
{% endif %} {%- endif %}
{% include "breadcrumbs.html" %} {% include "breadcrumbs.html" %}
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
{%- block document %} {%- block document %}
<div itemprop="articleBody"> <div itemprop="articleBody">
{% block body %}{% endblock %} {% block body %}{% endblock %}
</div> </div>
{% if self.comments()|trim %} {%- if self.comments()|trim %}
<div class="articleComments"> <div class="articleComments">
{% block comments %}{% endblock %} {%- block comments %}{% endblock %}
</div> </div>
{% endif%} {%- endif%}
</div> </div>
{%- endblock %} {%- endblock %}
{% include "footer.html" %} {% include "footer.html" %}
</div> </div>
{%- endblock %} {%- endblock %}
</div> </div>
</section> </section>
</div> </div>
{% include "versions.html" %} {% include "versions.html" -%}
<script type="text/javascript"> <script type="text/javascript">
jQuery(function () { jQuery(function () {
@ -224,9 +221,9 @@
}); });
</script> </script>
{# Do not conflict with RTD insertion of analytics script #} {#- Do not conflict with RTD insertion of analytics script #}
{% if not READTHEDOCS %} {%- if not READTHEDOCS %}
{% if theme_analytics_id %} {%- if theme_analytics_id %}
<!-- Theme Analytics --> <!-- Theme Analytics -->
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@ -235,14 +232,14 @@
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ theme_analytics_id }}', 'auto'); ga('create', '{{ theme_analytics_id }}', 'auto');
{% if theme_analytics_anonymize_ip|tobool %} {%- if theme_analytics_anonymize_ip|tobool %}
ga('set', 'anonymizeIp', true); ga('set', 'anonymizeIp', true);
{% endif %} {%- endif %}
ga('send', 'pageview'); ga('send', 'pageview');
</script> </script>
{% endif %} {%- endif %}
{% endif %} {%- endif %}
{%- block footer %} {% endblock %} {%- block footer %} {% endblock %}