|
| 1 | +{# |
| 2 | + basic/layout.html |
| 3 | + ~~~~~~~~~~~~~~~~~ |
| 4 | + |
| 5 | + Master layout template for Sphinx themes. |
| 6 | + |
| 7 | + NOTE: This is copy pasted from Sphinx to DeepDiff and |
| 8 | + then the 3 lines related to Canonical links are removed |
| 9 | + to make sure we generate the proper canonical links via |
| 10 | + the alabaster team. |
| 11 | + |
| 12 | + :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. |
| 13 | + :license: BSD, see LICENSE for details. |
| 14 | +#} |
| 15 | +{%- block doctype -%}{%- if html5_doctype %} |
| 16 | +<!DOCTYPE html> |
| 17 | +{%- else %} |
| 18 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 19 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 20 | +{%- endif %}{%- endblock %} |
| 21 | +{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} |
| 22 | +{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} |
| 23 | +{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and |
| 24 | + (sidebars != []) %} |
| 25 | +{%- set url_root = pathto('', 1) %} |
| 26 | +{# XXX necessary? #} |
| 27 | +{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} |
| 28 | +{%- if not embedded and docstitle %} |
| 29 | + {%- set titlesuffix = " — "|safe + docstitle|e %} |
| 30 | +{%- else %} |
| 31 | + {%- set titlesuffix = "" %} |
| 32 | +{%- endif %} |
| 33 | + |
| 34 | +{%- macro relbar() %} |
| 35 | + <div class="related" role="navigation" aria-label="related navigation"> |
| 36 | + <h3>{{ _('Navigation') }}</h3> |
| 37 | + <ul> |
| 38 | + {%- for rellink in rellinks %} |
| 39 | + <li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}> |
| 40 | + <a href="{{ pathto(rellink[0])|e }}" title="{{ rellink[1]|striptags|e }}" |
| 41 | + {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a> |
| 42 | + {%- if not loop.first %}{{ reldelim2 }}{% endif %}</li> |
| 43 | + {%- endfor %} |
| 44 | + {%- block rootrellink %} |
| 45 | + <li class="nav-item nav-item-0"><a href="{{ pathto(master_doc)|e }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li> |
| 46 | + {%- endblock %} |
| 47 | + {%- for parent in parents %} |
| 48 | + <li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li> |
| 49 | + {%- endfor %} |
| 50 | + <li class="nav-item nav-item-this"><a href="{{ link|e }}">{{ title }}</a></li> |
| 51 | + {%- block relbaritems %} {% endblock %} |
| 52 | + </ul> |
| 53 | + </div> |
| 54 | +{%- endmacro %} |
| 55 | + |
| 56 | +{%- macro sidebar() %} |
| 57 | + {%- if render_sidebar %} |
| 58 | + <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
| 59 | + <div class="sphinxsidebarwrapper"> |
| 60 | + {%- block sidebarlogo %} |
| 61 | + {%- if logo %} |
| 62 | + <p class="logo"><a href="{{ pathto(master_doc)|e }}"> |
| 63 | + <img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/> |
| 64 | + </a></p> |
| 65 | + {%- endif %} |
| 66 | + {%- endblock %} |
| 67 | + {%- if sidebars != None %} |
| 68 | + {#- new style sidebar: explicitly include/exclude templates #} |
| 69 | + {%- for sidebartemplate in sidebars %} |
| 70 | + {%- include sidebartemplate %} |
| 71 | + {%- endfor %} |
| 72 | + {%- else %} |
| 73 | + {#- old style sidebars: using blocks -- should be deprecated #} |
| 74 | + {%- block sidebartoc %} |
| 75 | + {%- include "localtoc.html" %} |
| 76 | + {%- endblock %} |
| 77 | + {%- block sidebarrel %} |
| 78 | + {%- include "relations.html" %} |
| 79 | + {%- endblock %} |
| 80 | + {%- block sidebarsourcelink %} |
| 81 | + {%- include "sourcelink.html" %} |
| 82 | + {%- endblock %} |
| 83 | + {%- if customsidebar %} |
| 84 | + {%- include customsidebar %} |
| 85 | + {%- endif %} |
| 86 | + {%- block sidebarsearch %} |
| 87 | + {%- include "searchbox.html" %} |
| 88 | + {%- endblock %} |
| 89 | + {%- endif %} |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + {%- endif %} |
| 93 | +{%- endmacro %} |
| 94 | + |
| 95 | +{%- macro script() %} |
| 96 | + <script id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script> |
| 97 | + {%- for js in script_files %} |
| 98 | + {{ js_tag(js) }} |
| 99 | + {%- endfor %} |
| 100 | +{%- endmacro %} |
| 101 | + |
| 102 | +{%- macro css() %} |
| 103 | + <link rel="stylesheet" href="{{ pathto('_static/' + style, 1)|e }}" type="text/css" /> |
| 104 | + <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> |
| 105 | + {%- for css in css_files %} |
| 106 | + {%- if css|attr("filename") %} |
| 107 | + {{ css_tag(css) }} |
| 108 | + {%- else %} |
| 109 | + <link rel="stylesheet" href="{{ pathto(css, 1)|e }}" type="text/css" /> |
| 110 | + {%- endif %} |
| 111 | + {%- endfor %} |
| 112 | +{%- endmacro %} |
| 113 | + |
| 114 | +{%- if html_tag %} |
| 115 | +{{ html_tag }} |
| 116 | +{%- else %} |
| 117 | +<html{% if not html5_doctype %} xmlns="http://www.w3.org/1999/xhtml"{% endif %}{% if language is not none %} lang="{{ language }}"{% endif %}> |
| 118 | +{%- endif %} |
| 119 | + <head> |
| 120 | + {%- if not html5_doctype and not skip_ua_compatible %} |
| 121 | + <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> |
| 122 | + {%- endif %} |
| 123 | + {%- if use_meta_charset or html5_doctype %} |
| 124 | + <meta charset="{{ encoding }}" /> |
| 125 | + {%- else %} |
| 126 | + <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" /> |
| 127 | + {%- endif %} |
| 128 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 129 | + {{- metatags }} |
| 130 | + {%- block htmltitle %} |
| 131 | + <title>{{ title|striptags|e }}{{ titlesuffix }}</title> |
| 132 | + {%- endblock %} |
| 133 | + {%- block css %} |
| 134 | + {{- css() }} |
| 135 | + {%- endblock %} |
| 136 | + {%- if not embedded %} |
| 137 | + {%- block scripts %} |
| 138 | + {{- script() }} |
| 139 | + {%- endblock %} |
| 140 | + {%- if use_opensearch %} |
| 141 | + <link rel="search" type="application/opensearchdescription+xml" |
| 142 | + title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" |
| 143 | + href="{{ pathto('_static/opensearch.xml', 1) }}"/> |
| 144 | + {%- endif %} |
| 145 | + {%- if favicon %} |
| 146 | + <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1)|e }}"/> |
| 147 | + {%- endif %} |
| 148 | + {%- endif %} |
| 149 | +{%- block linktags %} |
| 150 | + {%- if hasdoc('about') %} |
| 151 | + <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" /> |
| 152 | + {%- endif %} |
| 153 | + {%- if hasdoc('genindex') %} |
| 154 | + <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" /> |
| 155 | + {%- endif %} |
| 156 | + {%- if hasdoc('search') %} |
| 157 | + <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" /> |
| 158 | + {%- endif %} |
| 159 | + {%- if hasdoc('copyright') %} |
| 160 | + <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" /> |
| 161 | + {%- endif %} |
| 162 | + {%- if next %} |
| 163 | + <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" /> |
| 164 | + {%- endif %} |
| 165 | + {%- if prev %} |
| 166 | + <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" /> |
| 167 | + {%- endif %} |
| 168 | +{%- endblock %} |
| 169 | +{%- block extrahead %} {% endblock %} |
| 170 | + </head> |
| 171 | + {%- block body_tag %}<body>{% endblock %} |
| 172 | +{%- block header %}{% endblock %} |
| 173 | + |
| 174 | +{%- block relbar1 %}{{ relbar() }}{% endblock %} |
| 175 | + |
| 176 | +{%- block content %} |
| 177 | + {%- block sidebar1 %} {# possible location for sidebar #} {% endblock %} |
| 178 | + |
| 179 | + <div class="document"> |
| 180 | + {%- block document %} |
| 181 | + <div class="documentwrapper"> |
| 182 | + {%- if render_sidebar %} |
| 183 | + <div class="bodywrapper"> |
| 184 | + {%- endif %} |
| 185 | + <div class="body" role="main"> |
| 186 | + {% block body %} {% endblock %} |
| 187 | + <div class="clearer"></div> |
| 188 | + </div> |
| 189 | + {%- if render_sidebar %} |
| 190 | + </div> |
| 191 | + {%- endif %} |
| 192 | + </div> |
| 193 | + {%- endblock %} |
| 194 | + |
| 195 | + {%- block sidebar2 %}{{ sidebar() }}{% endblock %} |
| 196 | + <div class="clearer"></div> |
| 197 | + </div> |
| 198 | +{%- endblock %} |
| 199 | + |
| 200 | +{%- block relbar2 %}{{ relbar() }}{% endblock %} |
| 201 | + |
| 202 | +{%- block footer %} |
| 203 | + <div class="footer" role="contentinfo"> |
| 204 | + {%- if show_copyright %} |
| 205 | + {%- if hasdoc('copyright') %} |
| 206 | + {% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %} |
| 207 | + {%- else %} |
| 208 | + {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} |
| 209 | + {%- endif %} |
| 210 | + {%- endif %} |
| 211 | + {%- if last_updated %} |
| 212 | + {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} |
| 213 | + {%- endif %} |
| 214 | + {%- if show_sphinx %} |
| 215 | + {% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %} |
| 216 | + {%- endif %} |
| 217 | + </div> |
| 218 | +{%- endblock %} |
| 219 | + </body> |
| 220 | +</html> |
0 commit comments