diff options
Diffstat (limited to 'doc/_themes/sphinx13/layout.html')
-rw-r--r-- | doc/_themes/sphinx13/layout.html | 107 |
1 files changed, 46 insertions, 61 deletions
diff --git a/doc/_themes/sphinx13/layout.html b/doc/_themes/sphinx13/layout.html index 7fe550ebd..f6f858a57 100644 --- a/doc/_themes/sphinx13/layout.html +++ b/doc/_themes/sphinx13/layout.html @@ -1,75 +1,60 @@ -{# - sphinxdoc/layout.html - ~~~~~~~~~~~~~~~~~~~~~ - - Sphinx layout template for the sphinxdoc theme. - - :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -#} +{# Sphinx layout template for the sphinxdoc theme. #} {%- extends "basic/layout.html" %} -{# put the sidebar before the body #} -{% block sidebar1 %}{{ sidebar() }}{% endblock %} -{% block sidebar2 %}{% endblock %} - {% block extrahead %} - <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,700' - rel='stylesheet' type='text/css' /> {{ super() }} -{%- if not embedded %} - <style type="text/css"> - table.right { float: right; margin-left: 20px; } - table.right td { border: 1px solid #ccc; } - {% if pagename == 'index' %} - .related { display: none; } - {% endif %} - </style> - <script> - // intelligent scrolling of the sidebar content - window.onscroll = () => { - const sb = document.getElementsByClassName('sphinxsidebarwrapper')[0] - const sbh = sb.offsetHeight - const offset = document.getElementsByClassName('sphinxsidebar')[0].offsetTop; - const wintop = window.scrollTop; - const winbot = wintop + window.offsetHeight - const curtop = sb.offsetTop; - const curbot = curtop + sbh; - // does sidebar fit in window? - if (sbh < window.offsetHeight) { - // yes: easy case -- always keep at the top - sb.style.top = Math.min(Math.max(0, wintop - offset - 10), window.innerHeight - sbh - 200) - } else { - // no: only scroll if top/bottom edge of sidebar is at - // top/bottom edge of window - if (curtop > wintop && curbot > winbot) { - sb.style.top = Math.max(wintop - offset - 10, 0) - } else if (curtop < wintop && curbot < winbot) { - sb.style.top = Math.min(winbot - sbh - offset - 20, window.innerHeight - sbh - 200) - } - } - } - </script> +{%- if not embedded and pagename == 'index' %} +<style>.related { display: none; }</style> {%- endif %} {% endblock %} -{% block rootrellink %} - <li><a href="{{ pathto('index') }}">Sphinx home</a> |</li> - <li><a href="{{ pathto('contents') }}">Documentation</a> »</li> -{% endblock %} - {% block header %} <div class="pageheader"> +<a href="{{ pathto('index') }}"> + <img src="{{ pathto('_static/sphinxheader.png', 1) }}" alt="SPHINX" /> +</a> +</div> +{% endblock %} + +{%- block relbar1 %} +<div class="related" role="navigation" aria-label="related navigation"> + <h3>{{ _('Navigation') }}</h3> <ul> - <li><a href="{{ pathto('index') }}">Home</a></li> - <li><a href="{{ pathto('usage/installation') }}">Get it</a></li> - <li><a href="{{ pathto('contents') }}">Docs</a></li> - <li><a href="{{ pathto('development/index') }}">Extend</a></li> + <li><a href="{{ pathto('index') }}">Documentation</a> »</li> + {%- for parent in parents %} + <li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li> + {%- endfor %} + <li class="nav-item nav-item-this"><a href="{{ link|e }}">{{ title }}</a></li> </ul> +</div> +{% endblock %} + +{%- block content %} +<div class="document"> + <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> + {%- include "searchbox.html" %} <div> - <a href="{{ pathto('index') }}"> - <img src="{{ pathto('_static/sphinxheader.png', 1) }}" alt="SPHINX" /> - </a> + <h3>{{ _('Contents') }}</h3> + {%- if pagename != "index" %} + {{ toc }} + {%- else %} + {{ toctree(includehidden=True, maxdepth=3) }} + {%- endif %} + </div> + </div> + {%- block document %} + <div class="body" role="main"> + {% block body %}{% endblock %} </div> + {%- endblock %} </div> -{% endblock %} +{%- endblock %} + +{%- block relbar2 %}{% endblock %} + +{%- block footer %} +<div class="footer" role="contentinfo"> + {% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %} + {% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %} +</div> +{%- endblock %} |