diff options
Diffstat (limited to 'doc/_themes')
-rw-r--r-- | doc/_themes/sphinx13/layout.html | 107 | ||||
-rw-r--r-- | doc/_themes/sphinx13/static/bodybg.png | bin | 429 -> 0 bytes | |||
-rw-r--r-- | doc/_themes/sphinx13/static/footerbg.png | bin | 180 -> 0 bytes | |||
-rw-r--r-- | doc/_themes/sphinx13/static/headerbg.png | bin | 189 -> 0 bytes | |||
-rw-r--r-- | doc/_themes/sphinx13/static/listitem.png | bin | 149 -> 0 bytes | |||
-rw-r--r-- | doc/_themes/sphinx13/static/relbg.png | bin | 183 -> 0 bytes | |||
-rw-r--r-- | doc/_themes/sphinx13/static/sphinx13.css | 220 | ||||
-rw-r--r-- | doc/_themes/sphinx13/theme.conf | 2 |
8 files changed, 99 insertions, 230 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 %} diff --git a/doc/_themes/sphinx13/static/bodybg.png b/doc/_themes/sphinx13/static/bodybg.png Binary files differdeleted file mode 100644 index 6f667b99e..000000000 --- a/doc/_themes/sphinx13/static/bodybg.png +++ /dev/null diff --git a/doc/_themes/sphinx13/static/footerbg.png b/doc/_themes/sphinx13/static/footerbg.png Binary files differdeleted file mode 100644 index d1bcb009b..000000000 --- a/doc/_themes/sphinx13/static/footerbg.png +++ /dev/null diff --git a/doc/_themes/sphinx13/static/headerbg.png b/doc/_themes/sphinx13/static/headerbg.png Binary files differdeleted file mode 100644 index 522504964..000000000 --- a/doc/_themes/sphinx13/static/headerbg.png +++ /dev/null diff --git a/doc/_themes/sphinx13/static/listitem.png b/doc/_themes/sphinx13/static/listitem.png Binary files differdeleted file mode 100644 index f7f814d00..000000000 --- a/doc/_themes/sphinx13/static/listitem.png +++ /dev/null diff --git a/doc/_themes/sphinx13/static/relbg.png b/doc/_themes/sphinx13/static/relbg.png Binary files differdeleted file mode 100644 index 68a9b77eb..000000000 --- a/doc/_themes/sphinx13/static/relbg.png +++ /dev/null diff --git a/doc/_themes/sphinx13/static/sphinx13.css b/doc/_themes/sphinx13/static/sphinx13.css index 5d64eda51..562b1757b 100644 --- a/doc/_themes/sphinx13/static/sphinx13.css +++ b/doc/_themes/sphinx13/static/sphinx13.css @@ -1,187 +1,74 @@ -/* - * sphinx13.css - * ~~~~~~~~~~~~ - * - * Sphinx stylesheet -- sphinx13 theme. - * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ +/* Stylesheet for Sphinx's documentation */ -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ +/* Set master colours */ +:root { + --fonts-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; + --colour-sphinx-blue: #0A507A; + --colour-text: #333; + --colour-links-light: #057; +} body { - font-family: 'Open Sans', 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; - font-size: 14px; - text-align: center; - background-image: url(bodybg.png); - color: black; - padding: 0; - border-right: 1px solid #0a507a; - border-left: 1px solid #0a507a; - + font-family: var(--fonts-sans-serif); margin: 0 auto; - min-width: 780px; - max-width: 1080px; + color: var(--colour-text); } .pageheader { - background-image: url(headerbg.png); - text-align: left; + background-color: var(--colour-sphinx-blue); padding: 10px 15px; } -.pageheader ul { - float: right; - color: white; - list-style-type: none; - padding-left: 0; - margin-top: 30px; - margin-right: 10px; -} - -.pageheader li { - float: left; - margin: 0 0 0 10px; -} - -.pageheader li a { - border-radius: 1px; - padding: 8px 12px; - color: #f9f9f0; - text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); -} - -.pageheader li a:hover { - background-color: #f9f9f0; - color: #0a507a; - text-shadow: none; -} - div.document { - background-color: white; - text-align: left; -} - -div.bodywrapper { - margin: 0 240px 0 0; - border-right: 1px solid #0a507a; + display: flex; + margin: 0 0.5em; } div.body { + border-left: 1px solid var(--colour-sphinx-blue); margin: 0; - padding: 0.5em 20px 20px 20px; + padding: 0.5em 1.25em; + min-width: 0; + max-width: 800px; } div.related { - font-size: 1em; + display: flex; color: white; -} - -div.related ul { - background-image: url(relbg.png); - height: 1.9em; + background-color: var(--colour-sphinx-blue); border-top: 1px solid #002e50; - border-bottom: 1px solid #002e50; } div.related ul li { margin: 0 5px 0 0; - padding: 0; float: left; } -div.related ul li.right { - float: right; - margin-right: 5px; -} - div.related ul li a { - margin: 0; padding: 0 5px 0 5px; line-height: 1.75em; - color: #f9f9f0; - text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5); + color: white; } div.related ul li a:hover { - color: white; - /*text-decoration: underline;*/ - text-shadow: 0px 0px 1px rgba(255, 255, 255, 0.5); + text-shadow: 0 0 1px rgba(255, 255, 255, 0.5); } div.sphinxsidebarwrapper { - position: relative; - top: 0px; padding: 0; } div.sphinxsidebar { + overflow-wrap: break-word; margin: 0; - padding: 0 15px 15px 0; + padding-right: 15px; width: 210px; - float: right; font-size: 1em; - text-align: left; - max-height: 0px; -} - -div.sphinxsidebar .logo { - font-size: 1.8em; - color: #0A507A; - font-weight: 300; - text-align: center; -} - -div.sphinxsidebar .logo img { - vertical-align: middle; -} - -div.sphinxsidebar .download a img { - vertical-align: middle; -} - -div.subscribeformwrapper { - display: block; - overflow: auto; - margin-bottom: 1.2em; -} - -div.sphinxsidebar input { - border: 1px solid #aaa; - font-family: 'Open Sans', 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; -} - -div.sphinxsidebar .subscribeform { - margin-top: 0; -} - -div.sphinxsidebar .subscribeform input { - border: 1px solid #aaa; - font-size: 0.9em; - float: left; - padding: 0.25em 0.5em; - box-sizing: border-box; -} - -div.sphinxsidebar .subscribeform input[type="text"] { - width: 60%; -} - -div.sphinxsidebar .subscribeform input[type="submit"] { - width: 40%; - border-left: none; } div.sphinxsidebar h3 { font-size: 1.5em; - border-top: 1px solid #0a507a; - margin-top: 1em; + margin-top: 0; margin-bottom: 0.5em; padding-top: 0.5em; } @@ -198,12 +85,6 @@ div.sphinxsidebar h3, div.sphinxsidebar h4 { padding-left: 14px; color: #333; font-weight: 300; - /*text-shadow: 0px 0px 0.5px rgba(0, 0, 0, 0.4);*/ -} - -div.sphinxsidebarwrapper > h3:first-child { - margin-top: 0.5em; - border: none; } div.sphinxsidebar h3 a { @@ -219,17 +100,16 @@ div.sphinxsidebar ul { div.sphinxsidebar ul ul { margin-left: 20px; - list-style-image: url(listitem.png); + list-style-type: none; } div.footer { - background-image: url(footerbg.png); + background-color: var(--colour-sphinx-blue); color: #ccc; text-shadow: 0 0 .2px rgba(255, 255, 255, 0.8); padding: 3px 8px 3px 0; clear: both; font-size: 0.8em; - text-align: right; } /* no need to make a visible link to Sphinx on the Sphinx page */ @@ -244,14 +124,10 @@ p { } a { - color: #A2881D; + color: var(--colour-links-light); text-decoration: none; } -a:hover { - color: #E1C13F; -} - div.body a { text-decoration: underline; } @@ -259,12 +135,18 @@ div.body a { h1 { margin: 10px 0 0 0; font-size: 2.4em; - color: #0A507A; + color: var(--colour-sphinx-blue); font-weight: 300; } +h1 span.pre { + /* for code in titles */ + word-break: break-all; + white-space: normal; +} + h2 { - margin: 1.em 0 0.2em 0; + margin: 1em 0 0.2em 0; font-size: 1.5em; font-weight: 300; padding: 0; @@ -282,12 +164,12 @@ div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.b } div.body h1 a tt, div.body h2 a tt, div.body h3 a tt, div.body h4 a tt, div.body h5 a tt, div.body h6 a tt { - color: #0A507A !important; + color: var(--colour-sphinx-blue) !important; font-size: inherit !important; } a.headerlink { - color: #0A507A !important; + color: var(--colour-sphinx-blue) !important; font-size: 12px; margin-left: 6px; padding: 0 4px 0 4px; @@ -308,7 +190,7 @@ h1 code, h2 code, h3 code, h4 code { cite, code, tt { font-family: 'Consolas', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 14px; + font-size: 1em; letter-spacing: -0.02em; } @@ -335,17 +217,13 @@ hr { a tt { border: 0; - color: #a2881d; -} - -a tt:hover { - color: #e1c13f; + color: var(--colour-links-light); } pre { font-family: 'Consolas', 'Courier New', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 13px; + font-size: 1em; letter-spacing: 0.015em; line-height: 120%; padding: 0.5em; @@ -428,8 +306,7 @@ div.admonition div.highlight { } .viewcode-back { - font-family: 'Open Sans', 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; + font-family: var(--fonts-sans-serif); } div.viewcode-block:target { @@ -438,8 +315,15 @@ div.viewcode-block:target { border-bottom: 1px solid #ac9; } -.contentstable { - margin-left: 30px; - margin: 0 auto; - table-layout: fixed; + +/* media queries */ + +/* Reduce padding & margins for smaller screens */ +@media (max-width: 750px) { + .sphinxsidebar { + display: none; + } + div.body { + border-left: none; + } } diff --git a/doc/_themes/sphinx13/theme.conf b/doc/_themes/sphinx13/theme.conf index 19a480a6b..78bb78f10 100644 --- a/doc/_themes/sphinx13/theme.conf +++ b/doc/_themes/sphinx13/theme.conf @@ -1,4 +1,4 @@ [theme] inherit = basic -stylesheet = sphinx13.css pygments_style = default +sidebars = |