Skip to content

Commit

Permalink
Refresh the Sphinx13 theme (#10652)
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jul 10, 2022
1 parent 3db1844 commit 9112cfe
Show file tree
Hide file tree
Showing 17 changed files with 222 additions and 435 deletions.
Binary file removed doc/_static/pocoo.png
Binary file not shown.
6 changes: 6 additions & 0 deletions doc/_templates/contents.html
@@ -0,0 +1,6 @@
{% extends "layout.html" %}
{% set title = _('Sphinx documentation contents') %}
{% block body %}
<h1>{{ _('Sphinx documentation contents') }}</h1>
{{ toctree(includehidden=True, collapse=False, maxdepth=3) }}
{% endblock %}
129 changes: 0 additions & 129 deletions doc/_templates/index.html

This file was deleted.

23 changes: 0 additions & 23 deletions doc/_templates/indexsidebar.html

This file was deleted.

107 changes: 46 additions & 61 deletions 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>&#160;|</li>
<li><a href="{{ pathto('contents') }}">Documentation</a> &#187;</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> &raquo;</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 %}&#169; <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 %}
Binary file removed doc/_themes/sphinx13/static/bodybg.png
Binary file not shown.
Binary file removed doc/_themes/sphinx13/static/footerbg.png
Binary file not shown.
Binary file removed doc/_themes/sphinx13/static/headerbg.png
Binary file not shown.
Binary file removed doc/_themes/sphinx13/static/listitem.png
Binary file not shown.
Binary file removed doc/_themes/sphinx13/static/relbg.png
Binary file not shown.

0 comments on commit 9112cfe

Please sign in to comment.