Support older versions of Sphinx
parent
c1c682402a
commit
664d9a2144
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
Master layout template for Sphinx themes.
|
Master layout template for Sphinx themes.
|
||||||
|
|
||||||
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
|
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
#}
|
#}
|
||||||
{%- block doctype -%}{%- if html5_doctype %}
|
{%- block doctype -%}{%- if html5_doctype %}
|
||||||
|
@ -87,9 +87,18 @@
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro script() %}
|
{%- macro script() %}
|
||||||
<script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
|
<script type="text/javascript">
|
||||||
{%- for js in script_files %}
|
var DOCUMENTATION_OPTIONS = {
|
||||||
{{ js_tag(js) }}
|
URL_ROOT: '{{ url_root }}',
|
||||||
|
VERSION: '{{ release|e }}',
|
||||||
|
COLLAPSE_INDEX: false,
|
||||||
|
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
|
||||||
|
HAS_SOURCE: {{ has_source|lower }},
|
||||||
|
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
{%- for scriptfile in script_files %}
|
||||||
|
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
@ -97,8 +106,8 @@
|
||||||
<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("filename") %}
|
{%- if css|attr("rel") %}
|
||||||
{{ css_tag(css) }}
|
<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 %}
|
||||||
|
@ -111,10 +120,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"{% if language is not none %} lang="{{ language }}"{% endif %}>
|
<html xmlns="http://www.w3.org/1999/xhtml"{% if language is not none %} lang="{{ language }}"{% endif %}>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
<head>
|
<head>
|
||||||
{%- if not html5_doctype and not skip_ua_compatible %}
|
{%- if use_meta_charset %}
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
|
||||||
{%- endif %}
|
|
||||||
{%- if use_meta_charset or html5_doctype %}
|
|
||||||
<meta charset="{{ encoding }}" />
|
<meta charset="{{ encoding }}" />
|
||||||
{%- else %}
|
{%- else %}
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
|
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
|
||||||
|
@ -123,19 +129,13 @@
|
||||||
{%- block htmltitle %}
|
{%- block htmltitle %}
|
||||||
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
|
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{%- block css %}
|
{%- block csss %}
|
||||||
{{- css() }}
|
{{- css() }}
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{%- if not embedded %}
|
{%- if not embedded %}
|
||||||
{%- block scripts %}
|
{%- block scripts %}
|
||||||
{{- script() }}
|
{{- script() }}
|
||||||
{% if theme_collapsiblesidebar|tobool %}
|
|
||||||
<script type="text/javascript" src="{{ pathto('_static/sidebar.js', 1) }}"></script>
|
|
||||||
{% endif %}
|
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{%- if pageurl %}
|
|
||||||
<link rel="canonical" href="{{ pageurl }}" />
|
|
||||||
{%- endif %}
|
|
||||||
{%- 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 %}"
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{%- block extrahead %} {% endblock %}
|
{%- block extrahead %} {% endblock %}
|
||||||
</head>
|
</head>
|
||||||
{%- block body_tag %}<body>{% endblock %}
|
<body>
|
||||||
{%- block header %}{% endblock %}
|
{%- block header %}{% endblock %}
|
||||||
|
|
||||||
{%- block relbar1 %}{{ relbar() }}{% endblock %}
|
{%- block relbar1 %}{{ relbar() }}{% endblock %}
|
||||||
|
@ -197,6 +197,7 @@
|
||||||
|
|
||||||
{%- block relbar2 %}{{ relbar() }}{% endblock %}
|
{%- block relbar2 %}{{ relbar() }}{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{%- block footer %}
|
{%- block footer %}
|
||||||
<div class="footer" role="contentinfo">
|
<div class="footer" role="contentinfo">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue