Compare commits

..
Author SHA1 Message Date
Aaron Carlisle f2cdcecea9 Merge branch 'master' into blendify/cleanup-sass 2021-03-01 09:53:37 -05:00
Aaron Carlisle 51b5fe20f0 Cleanup: Move Breadcrumbs to layout and clean up unused rules
I moved breadcrumbs to the rest of the layout as it seems to belong 
better here.
I also went through and removed some unused rules.

These changes can be split up into two patchs if needed.
2021-02-26 00:32:57 -05:00
29 changed files with 1876 additions and 694 deletions

No files matched your search

+1 -3
View File
@@ -1,11 +1,9 @@
version: 2
python:
version: 3.8
version: 3
install:
- requirements: docs/requirements.txt
- method: pip
path: .
sphinx:
configuration: docs/conf.py
+1
View File
@@ -1,6 +1,7 @@
include *.txt
include babel.cfg
include LICENSE
include bin/preinstall.js
recursive-include sphinx_rtd_theme *.conf
recursive-include sphinx_rtd_theme *.css
recursive-include sphinx_rtd_theme *.eot
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env node
const package = require('../package.json');
// Sorry everyone, this is the closest we can get to commenting on package.json
// dependencies :(
if (package.devDependencies['bourbon-neat'] !== '~1.9') {
// Wyrm is not compatible with Neat 2.0+, and Neat 1.9 at least pins a
// node-sass version that doesn't require Python 2. The changes to Wyrm to
// support Neat 2.0+ are all fairly minor changes, but it deeply affects the
// grid system and might be more of a liability than an old release of Neat.
// See: https://github.com/readthedocs/sphinx_rtd_theme/pull/771
console.error(
'bourbon-neat 1.9 is required, Wyrm is not compatible with Neat 2.0+.'
);
console.error(
'The expected selector for the bourbon-neat dependency in package.json is "~1.9".'
);
process.exit(1);
}
+11 -11
View File
@@ -1,6 +1,6 @@
{%- extends "!layout.html" %}
{#-
{#
This template exists as a way to implement a version menu without changing what
the theme normally renders the menu on local builds and on builds on Read the
@@ -8,8 +8,8 @@ Docs. This is for local testing purposes only.
#}
{%- block footer %}
{%- if not READTHEDOCS %}
{% block footer %}
{% if not READTHEDOCS %}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Versions') }}">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span>
@@ -19,15 +19,15 @@ Docs. This is for local testing purposes only.
<div class="rst-other-versions">
<dl>
<dt>{{ _('Versions') }}</dt>
{%- if test_versions %}
{%- for version in test_versions %}
{% if test_versions %}
{% for version in test_versions %}
<dd><a href="#">{{ version }}</a></dd>
{%- endfor %}
{%- else %}
{% endfor %}
{% else %}
<dd><a href="#">latest</a></dd>
<dd><a href="#">1.0</a></dd>
<dd><a href="#">1.1</a></dd>
{%- endif %}
{% endif %}
</dl>
<dl>
<dt>{{ _('Downloads') }}</dt>
@@ -36,7 +36,7 @@ Docs. This is for local testing purposes only.
<dd><a href="#">HTML</a></dd>
</dl>
<dl>
{#- Translators: The phrase "Read the Docs" is not translated #}
{# Translators: The phrase "Read the Docs" is not translated #}
<dt>{{ _('On Read the Docs') }}</dt>
<dd>
<a href="#">{{ _('Project Home') }}</a>
@@ -51,5 +51,5 @@ Docs. This is for local testing purposes only.
</dl>
</div>
</div>
{%- endif %}
{%- endblock %}
{% endif %}
{% endblock %}
+15 -3
View File
@@ -4,9 +4,21 @@ import sys
import os
import re
# Prefer to use the version of the theme in this repo
# and not the installed version of the theme.
sys.path.insert(0, os.path.abspath('..'))
# If we are building locally, or the build on Read the Docs looks like a PR
# build, prefer to use the version of the theme in this repo, not the installed
# version of the theme.
def is_development_build():
# PR builds have an interger version
re_version = re.compile(r'^[\d]+$')
if 'READTHEDOCS' in os.environ:
version = os.environ.get('READTHEDOCS_VERSION', '')
if re_version.match(version):
return True
return False
return True
if is_development_build():
sys.path.insert(0, os.path.abspath('..'))
sys.path.append(os.path.abspath('./demo/'))
import sphinx_rtd_theme
+41 -41
View File
@@ -37,49 +37,49 @@ documentation navigation.
.. confval:: collapse_navigation
:type: boolean
:default: ``True``
With this enabled, navigation entries are not expandable -- the ``[+]``
icons next to each entry are removed.
.. confval:: sticky_navigation
:type: boolean
:default: ``True``
.. note::
Setting :confval:`collapse_navigation` to ``False`` and using a high value
for :confval:`navigation_depth` on projects with many files and a deep file
structure can cause long compilation times and can result in HTML files that
are significantly larger in file size.
.. confval:: sticky_navigation
Scroll the navigation with the main page content as you scroll the page.
:type: boolean
:default: ``True``
.. confval:: navigation_depth
The maximum depth of the table of contents tree. Set
this to ``-1`` to allow unlimited depth.
:type: integer
:default: ``4``
The maximum depth of the table of contents tree. Set
this to ``-1`` to allow unlimited depth.
.. confval:: includehidden
:type: boolean
:default: ``True``
Specifies if the navigation includes hidden table(s) of contents -- that is,
any :rst:dir:`sphinx:toctree` directive that is marked with the ``:hidden:``
option.
:type: boolean
:default: ``True``
.. confval:: titles_only
:type: boolean
:default: False
When enabled, page subheadings are not included in the
navigation.
:type: boolean
:default: False
.. note::
Setting :confval:`collapse_navigation` to ``False`` and using a high value
for :confval:`navigation_depth` on projects with many files and a deep file
structure can cause long compilation times and can result in HTML files that
are significantly larger in file size.
.. _table of contents configuration options: http://www.sphinx-doc.org/en/stable/templating.html#toctree
@@ -96,28 +96,28 @@ Miscellaneous options
.. confval:: analytics_id
:type: string
If specified, Google Analytics' javascript is included in your pages.
Set the value to the ID provided to you by google (like ``UA-XXXXXXX``).
:type: string
.. confval:: analytics_anonymize_ip
Anonymize visitor IP addresses in Google Analytics.
:type: boolean
:default: ``False``
Anonymize visitor IP addresses in Google Analytics.
.. confval:: canonical_url
:type: URL
This will specify a `canonical URL`_ meta link element to tell search
engines which URL should be ranked as the primary URL for your
documentation. This is important if you have multiple URLs that your
documentation is available through. The URL points to the root path of the
documentation and requires a trailing slash.
:type: URL
.. deprecated:: 0.6.0
Use :confval:`sphinx:html_baseurl` instead.
@@ -126,52 +126,51 @@ Miscellaneous options
.. confval:: display_version
If ``True``, the version number is shown at the top of the sidebar.
:type: boolean
:default: ``True``
If ``True``, the version number is shown at the top of the sidebar.
.. confval:: logo_only
:type: boolean
:default: ``False``
Only display the logo image, do not display the project name at the top of
the sidebar
:type: boolean
:default: ``False``
.. confval:: prev_next_buttons_location
Location to display :guilabel:`Next` and :guilabel:`Previous` buttons. This
can be either ``bottom``, ``top``, ``both`` , or ``None``.
:type: string
:default: ``bottom``
.. confval:: style_external_links
Location to display :guilabel:`Next` and :guilabel:`Previous` buttons. This
can be either ``bottom``, ``top``, ``both`` , or ``None``.
Add an icon next to external links.
.. confval:: style_external_links
:type: boolean
:default: ``False``
Add an icon next to external links.
.. confval:: vcs_pageview_mode
:type: string
:default: ``blob`` or ``view``
Changes how to view files when using ``display_github``, ``display_gitlab``,
etc. When using GitHub or GitLab this can be: ``blob`` (default), ``edit``,
or ``raw``. On Bitbucket, this can be either: ``view`` (default) or
``edit``.
:type: string
:default: ``blob`` or ``view``
.. confval:: style_nav_header_background
Changes the background of the search area in the navigation bar. The value
can be anything valid in a CSS `background` property.
:type: string
:default: ``#2980B9``
Changes the background of the search area in the navigation bar. The value
can be anything valid in a CSS `background` property.
File-wide metadata
==================
@@ -191,6 +190,7 @@ The following options can be used as :ref:`file-wide metadata
Force the :guilabel:`Edit on GitLab` button to use the configured URL.
Other configuration
===================
+6 -5
View File
@@ -59,6 +59,7 @@ can be used to test built assets:
.. _Webpack: https://webpack.js.org/
.. _node-sass: https://github.com/sass/node-sass
.. _SASS: http://www.sass-lang.com
.. _Wyrm: http://www.github.com/snide/wyrm/
.. _Sphinx: http://www.sphinx-doc.org/en/stable/
Translations
@@ -100,17 +101,17 @@ To release a new version of the theme, core team will take the following steps:
#. Update the changelog (``docs/changelog.rst``) with the version information.
#. Run ``python setup.py update_translations`` to compile new translation files
and update Transifex.
#. Run ``python setup.py build_assets`` to rebuild all the theme assets and the Python
#. Run ``python setup.py build`` to rebuild all the theme assets and the Python
package.
#. Commit these changes.
#. Tag the release in git: ``git tag $NEW_VERSION``.
#. Push the tag to GitHub: ``git push --tags origin``.
#. Upload the package to PyPI:
.. code:: console
.. code:: console
$ rm -rf dist/
$ python setup.py sdist bdist_wheel
$ twine upload --sign --identity security@readthedocs.org dist/*
$ rm -rf dist/
$ python setup.py sdist bdist_wheel
$ twine upload --sign --identity security@readthedocs.org dist/*
.. _PEP440: https://www.python.org/dev/peps/pep-0440/
+4 -18
View File
@@ -23,20 +23,14 @@ In your ``conf.py`` file:
.. note::
Adding this theme as an extension is what enables localization of theme
strings in your translated output. If these strings are not translated in
your output, either we lack the localized strings for your locale, or you
are using an old version of the theme.
Adding this theme as an extension is what enables localization of theme
strings in your translated output. If these strings are not translated in
your output, either we lack the localized strings for your locale, or you
are using an old version of the theme.
Via Git or Download
===================
.. warning::
Installing directly from the repo is deprecated.
Static assets won't be included in the repo in a future release.
Symlink or subtree the ``sphinx_rtd_theme/sphinx_rtd_theme`` repository into your documentation at
``docs/_themes/sphinx_rtd_theme`` then add the following two settings to your Sphinx
``conf.py`` file:
@@ -45,11 +39,3 @@ Symlink or subtree the ``sphinx_rtd_theme/sphinx_rtd_theme`` repository into you
html_theme = "sphinx_rtd_theme"
html_theme_path = ["_themes", ]
Compatibility
=============
``sphinx_rtd_theme`` depends on at least Sphinx 1.6 although,
we recommend at least Sphinx 2 to take advantage of the html5 writer.
The html4 writer is still supported however,
it is deprecated and support will be removed in the near future.
+1149 -28
View File
File diff suppressed because it is too large. Load diff
+8 -15
View File
@@ -4,33 +4,25 @@
"version": "0.5.1",
"scripts": {
"dev": "webpack-dev-server --open --config webpack.dev.js",
"build": "webpack --config webpack.prod.js"
"build": "webpack --config webpack.prod.js",
"preinstall": "bin/preinstall.js"
},
"repository": {
"type": "git",
"url": "https://github.com/readthedocs/sphinx_rtd_theme.git"
},
"author": "Read the Docs",
"license": "MIT",
"bugs": {
"url": "https://github.com/readthedocs/sphinx_rtd_theme/issues"
},
"homepage": "https://github.com/readthedocs/sphinx_rtd_theme",
"dependencies": {},
"devDependencies": {
"bootstrap": "^4.6.0",
"bourbon": "~4.3",
"bourbon-neat": "~1.9",
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.1.0",
"file-loader": "^3.0.1",
"font-awesome": "^4.7.0",
"html5shiv": "^3.7.3",
"imports-loader": "^0.8.0",
"jquery": "^3.4.1",
"lato-font": "^3.0.0",
"mini-css-extract-plugin": "^0.6.0",
"node-sass": "^4.13.1",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"popper.js": "^1.16.1",
"roboto-fontface": "^0.10.0",
"sass": "^1.32.8",
"sass-loader": "^7.3.0",
"style-loader": "^0.23.1",
"webpack": "^4.30.0",
@@ -38,6 +30,7 @@
"webpack-dev-server": "^3.3.1",
"webpack-merge": "^4.2.1",
"webpack-shell-plugin": "^0.5.0",
"webpack-watch-files-plugin": "^1.0.3"
"webpack-watch-files-plugin": "^1.0.3",
"wyrm": "^1.0.9"
}
}
+15 -22
View File
@@ -1,29 +1,27 @@
# -*- coding: utf-8 -*-
"""`sphinx_rtd_theme` lives on `Github`_.
.. _github: https://github.com/readthedocs/sphinx_rtd_theme
"""
import distutils.cmd
import os
import subprocess
import distutils.cmd
import setuptools.command.build_py
from io import open
from setuptools import setup
class WebpackBuildCommand(distutils.cmd.Command):
class WebpackBuildCommand(setuptools.command.build_py.build_py):
description = "Generate static assets"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
"""Prefix Python build with Webpack asset build"""
def run(self):
if not 'CI' in os.environ and not 'TOX_ENV_NAME' in os.environ:
subprocess.run(['npm', 'install'], check=True)
subprocess.run(['node_modules/.bin/webpack', '--config', 'webpack.prod.js'], check=True)
setuptools.command.build_py.build_py.run(self)
class WebpackDevelopCommand(distutils.cmd.Command):
@@ -97,7 +95,7 @@ setup(
cmdclass={
'update_translations': UpdateTranslationsCommand,
'transifex': TransifexCommand,
'build_assets': WebpackBuildCommand,
'build_py': WebpackBuildCommand,
'watch': WebpackDevelopCommand,
},
zip_safe=False,
@@ -117,7 +115,7 @@ setup(
]
},
install_requires=[
'sphinx>=1.6'
'sphinx'
],
tests_require=[
'pytest',
@@ -139,17 +137,12 @@ setup(
'Intended Audience :: Developers',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Operating System :: OS Independent',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
],
project_urls={
'Homepage': 'https://sphinx-rtd-theme.readthedocs.io/',
'Source Code': 'https://github.com/readthedocs/sphinx_rtd_theme',
'Issue Tracker': 'https://github.com/readthedocs/sphinx_rtd_theme/issues',
},
)
+9 -11
View File
@@ -8,7 +8,12 @@ from os import path
from sphinx import version_info
from sphinx.locale import _
from sphinx.util.logging import getLogger
try:
# Avaliable from Sphinx 1.6
from sphinx.util.logging import getLogger
except ImportError:
from logging import getLogger
__version__ = '0.5.1'
@@ -33,16 +38,9 @@ def config_initiated(app, config):
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
def setup(app):
app.require_sphinx('1.6')
if version_info <= (2, 0, 0):
if not app.config.html_experimental_html5_writer:
logger.warning("'html4_writer' is deprecated with sphinx_rtd_theme")
else:
if app.config.html4_writer:
logger.warning("'html4_writer' is deprecated with sphinx_rtd_theme")
# Register the theme that can be referenced without adding a theme path
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))
if version_info >= (1, 6, 0):
# Register the theme that can be referenced without adding a theme path
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))
if version_info >= (1, 8, 0):
# Add Sphinx message catalog for newer versions of Sphinx
+58 -58
View File
@@ -1,84 +1,84 @@
{#- Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
{%- if page_source_suffix %}
{%- set suffix = page_source_suffix %}
{%- else %}
{%- set suffix = source_suffix %}
{%- endif %}
{% if page_source_suffix %}
{% set suffix = page_source_suffix %}
{% else %}
{% set suffix = source_suffix %}
{% endif %}
{%- if meta is defined and meta is not none %}
{%- set check_meta = True %}
{%- else %}
{%- set check_meta = False %}
{%- endif %}
{% if meta is defined and meta is not none %}
{% set check_meta = True %}
{% else %}
{% set check_meta = False %}
{% endif %}
{%- if check_meta and 'github_url' in meta %}
{%- set display_github = True %}
{%- endif %}
{% if check_meta and 'github_url' in meta %}
{% set display_github = True %}
{% endif %}
{%- if check_meta and 'bitbucket_url' in meta %}
{%- set display_bitbucket = True %}
{%- endif %}
{% if check_meta and 'bitbucket_url' in meta %}
{% set display_bitbucket = True %}
{% endif %}
{%- if check_meta and 'gitlab_url' in meta %}
{%- set display_gitlab = True %}
{%- endif %}
{% if check_meta and 'gitlab_url' in meta %}
{% set display_gitlab = True %}
{% endif %}
{%- set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
{% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
<div role="navigation" aria-label="{{ _('Breadcrumbs') }}">
<ol class="breadcrumb">
{%- block breadcrumbs %}
<li class="breadcrumb-item"><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a></li>
{%- for doc in parents %}
<li class="breadcrumb-item"><a href="{{ doc.link|e }}">{{ doc.title }}</a></li>
{%- endfor %}
<li class="breadcrumb-item active">{{ title }}</li>
{%- endblock %}
{%- block breadcrumbs_aside %}
<li class="breadcrumb-aside">
{%- if hasdoc(pagename) and display_vcs_links %}
{%- if display_github %}
{%- if check_meta and 'github_url' in meta %}
<ul class="wy-breadcrumbs">
{% block breadcrumbs %}
<li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a> &raquo;</li>
{% for doc in parents %}
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
{% endfor %}
<li>{{ title }}</li>
{% endblock %}
{% block breadcrumbs_aside %}
<li class="wy-breadcrumbs-aside">
{% if hasdoc(pagename) and display_vcs_links %}
{% if display_github %}
{% if check_meta and 'github_url' in meta %}
<!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{%- else %}
{% else %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{%- endif %}
{%- elif display_bitbucket %}
{%- if check_meta and 'bitbucket_url' in meta %}
{% endif %}
{% elif display_bitbucket %}
{% if check_meta and 'bitbucket_url' in meta %}
<!-- User defined Bitbucket URL -->
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{%- else %}
{% else %}
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{%- endif %}
{%- elif display_gitlab %}
{%- if check_meta and 'gitlab_url' in meta %}
{% endif %}
{% elif display_gitlab %}
{% if check_meta and 'gitlab_url' in meta %}
<!-- User defined GitLab URL -->
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{%- else %}
{% else %}
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{%- endif %}
{%- elif show_source and source_url_prefix %}
{% endif %}
{% elif show_source and source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a>
{%- elif show_source and has_source and sourcename %}
{% elif show_source and has_source and sourcename %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
{%- endif %}
{%- endif %}
{% endif %}
{% endif %}
</li>
{%- endblock %}
</ol>
{% endblock %}
</ul>
{%- if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{{ _('Breadcrumbs') }}">
{%- if prev %}
<a href="{{ prev.link|e }}" class="btn btn-light float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
{%- endif %}
{%- if next %}
<a href="{{ next.link|e }}" class="btn btn-light float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
{%- endif %}
{% if prev %}
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
{% endif %}
{% if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
{% endif %}
</div>
{%- endif %}
{% endif %}
<hr/>
</div>
+19 -19
View File
@@ -2,10 +2,10 @@
{%- if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
<div class="rst-footer-buttons" role="navigation" aria-label="{{ _('Footer') }}">
{%- if prev %}
<a href="{{ prev.link|e }}" class="btn btn-light float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
{%- endif %}
{%- if next %}
<a href="{{ next.link|e }}" class="btn btn-light float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
{%- endif %}
</div>
{%- endif %}
@@ -17,44 +17,44 @@
<p>
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{%- trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{%- trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
{% trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if build_id and build_url %}
<span class="build">
{#- Translators: Build is a noun, not a verb -#}
{%- trans %}Build{% endtrans -%}
{# Translators: Build is a noun, not a verb #}
{% trans %}Build{% endtrans %}
<a href="{{ build_url }}">{{ build_id }}</a>.
</span>
{%- elif commit %}
<span class="commit">
{#- Translators: the phrase "revision" comes from Git, referring to a commit #}
{%- trans %}Revision{% endtrans %} <code>{{ commit }}</code>.
{# Translators: the phrase "revision" comes from Git, referring to a commit #}
{% trans %}Revision{% endtrans %} <code>{{ commit }}</code>.
</span>
{%- endif %}
{%- if last_updated %}
<span class="lastupdated">
{%- trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
</span>
{%- endif -%}
{%- endif %}
</p>
{%- endblock %}
</div>
{% if show_sphinx %}
{%- set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
{%- set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
{#- Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
{%- trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
{#- Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documenation #}
{%- if show_sphinx %}
{% set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
{% set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
{# Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
{% trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
{# Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documenation #}
<a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
{#- Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
{%- trans %}provided by {{ readthedocs_web }}{% endtrans %}.
{% endif %}
{# Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
{%- endif %}
{%- block extrafooter %} {% endblock %}
+116 -105
View File
@@ -6,58 +6,62 @@
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) -%}
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
{%- set sphinx_writer = 'writer-html5' if html5_doctype else 'writer-html4' %}
<!DOCTYPE html>
<html lang="{{ lang_attr }}" >
<html class="{{ sphinx_writer }}" lang="{{ lang_attr }}" >
<head>
<meta charset="utf-8" />
{{- metatags }}
{{ metatags }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{%- block htmltitle %}
{% block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock -%}
{% endblock %}
{#- CSS #}
{# CSS #}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for css in css_files %}
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
{%- else %}
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
{%- endif %}
{%- endfor %}
{%- for cssfile in extra_css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor -%}
{%- endfor %}
{#- FAVICON #}
{%- if favicon %}
{# FAVICON #}
{% if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{%- endif -%}
{% endif %}
{#- CANONICAL URL (deprecated) #}
{%- if theme_canonical_url and not pageurl %}
{# CANONICAL URL (deprecated) #}
{% if theme_canonical_url and not pageurl %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
{%- endif -%}
{% endif %}
{#- CANONICAL URL #}
{# CANONICAL URL #}
{%- if pageurl %}
<link rel="canonical" href="{{ pageurl|e }}" />
{%- endif -%}
{%- endif %}
{#- JAVASCRIPTS #}
{# JAVASCRIPTS #}
{%- block scripts %}
<!--[if lt IE 9]>
<script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
<![endif]-->
{%- if not embedded %}
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
{%- if sphinx_version >= "1.8.0" -%}
{% if sphinx_version >= "1.8.0" %}
<script type="text/javascript" id="documentation_options" data-url_root="{{ url_root }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
{%- for scriptfile in script_files %}
{{ js_tag(scriptfile) }}
{%- endfor %}
{%- else %}
{% else %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'{{ url_root }}',
@@ -72,10 +76,10 @@
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{%- endif %}
{% endif %}
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{#- OPENSEARCH #}
{# OPENSEARCH #}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
@@ -107,105 +111,112 @@
{%- block extrahead %} {% endblock %}
</head>
<body>
{%- block extrabody %} {% endblock %}
<body class="wy-body-for-nav">
<div class="d-flex" id="wrapper">
{% block extrabody %} {% endblock %}
<div class="wy-grid-for-nav">
{# SIDE NAV, TOGGLES ON MOBILE #}
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" {% if theme_style_nav_header_background %} style="background: {{theme_style_nav_header_background}}" {% endif %}>
{% block sidebartitle %}
<!-- Sidebar -->
<div class="sidebar-right" id="sidebar-wrapper">
<div class="sidebar-scroll">
<div class="sidebar-heading">
{%- block sidebartitle %}
{%- if logo and theme_logo_only %}
{% if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}">
{%- else %}
{% else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
{%- endif %}
{%- if logo %}
{#- Not strictly valid HTML, but it's the only way to display/scale
it properly, without weird scripting or heaps of work
{% endif %}
{% if logo %}
{# Not strictly valid HTML, but it's the only way to display/scale
it properly, without weird scripting or heaps of work
#}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
{%- endif %}
{% endif %}
</a>
{%- if theme_display_version %}
{% if theme_display_version %}
{%- set nav_version = version %}
{%- if READTHEDOCS and current_version %}
{% if READTHEDOCS and current_version %}
{%- set nav_version = current_version %}
{%- endif %}
{%- if nav_version %}
{% endif %}
{% if nav_version %}
<div class="version">
{{ nav_version }}
</div>
{%- endif %}
{%- endif %}
{%- include "searchbox.html" %}
{%- endblock %}
{% endif %}
{% endif %}
{% include "searchbox.html" %}
{% endblock %}
</div>
{%- block navigation %}
<div class="sidebar-navigation" data-spy="affix" role="navigation" aria-label="{{ _('Main') }}">
{%- block menu %}
{%- set toctree = toctree(maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=theme_includehidden|tobool,
titles_only=theme_titles_only|tobool) %}
{%- if toctree %}
{{ toctree }}
{%- else %}
{% block navigation %}
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="{{ _('Main') }}">
{% block menu %}
{#
The singlehtml builder doesn't handle this toctree call when the
toctree is empty. Skip building this for now.
#}
{% if 'singlehtml' not in builder %}
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int,
collapse=theme_collapse_navigation|tobool,
includehidden=theme_includehidden|tobool,
titles_only=theme_titles_only|tobool) %}
{% endif %}
{% if global_toc %}
{{ global_toc }}
{% else %}
<!-- Local TOC -->
<div class="local-toc">{{ toc }}</div>
{%- endif %}
{%- endblock %}
</div>
{%- endblock %}
{% endif %}
{% endblock %}
</div>
{% endblock %}
</div>
</div>
<!-- /#sidebar-wrapper -->
</nav>
<!-- Page Content -->
<div class="page-content-wrapper">
<nav class="wy-nav-top navbar navbar-expand-lg navbar-light bg-light border-bottom" aria-label="{{ _('Top') }}">
{%- block mobile_nav %}
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
{%- endblock %}
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
<nav class="wy-nav-top" aria-label="{{ _('Top') }}">
{% block mobile_nav %}
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
{% endblock %}
</nav>
<div class="container-fluid">
{%- block content %}
{%- if theme_style_external_links|tobool %}
<div class="rst-content style-external-links">
{%- else %}
<div class="rst-content">
{%- endif %}
{% include "breadcrumbs.html" %}
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
{%- block document %}
<div itemprop="articleBody">
{% block body %}{% endblock %}
</div>
{%- if self.comments()|trim %}
<div class="articleComments">
{%- block comments %}{% endblock %}
</div>
{%- endif%}
</div>
{%- endblock %}
{%- include "footer.html" %}
<div class="wy-nav-content">
{%- block content %}
{% if theme_style_external_links|tobool %}
<div class="rst-content style-external-links">
{% else %}
<div class="rst-content">
{% endif %}
{% include "breadcrumbs.html" %}
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
{%- block document %}
<div itemprop="articleBody">
{% block body %}{% endblock %}
</div>
{%- endblock %}
{% if self.comments()|trim %}
<div class="articleComments">
{% block comments %}{% endblock %}
</div>
{% endif%}
</div>
{%- endblock %}
{% include "footer.html" %}
</div>
{%- endblock %}
</div>
</div>
<!-- /#page-content-wrapper -->
</section>
</div>
{%- include "versions.html" -%}
{% include "versions.html" %}
<script type="text/javascript">
jQuery(function () {
@@ -213,9 +224,9 @@
});
</script>
{#- Do not conflict with RTD insertion of analytics script #}
{%- if not READTHEDOCS %}
{%- if theme_analytics_id %}
{# Do not conflict with RTD insertion of analytics script #}
{% if not READTHEDOCS %}
{% if theme_analytics_id %}
<!-- Theme Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
@@ -224,14 +235,14 @@
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ theme_analytics_id }}', 'auto');
{%- if theme_analytics_anonymize_ip|tobool %}
{% if theme_analytics_anonymize_ip|tobool %}
ga('set', 'anonymizeIp', true);
{%- endif %}
{% endif %}
ga('send', 'pageview');
</script>
{%- endif %}
{%- endif %}
{% endif %}
{% endif %}
{%- block footer %} {% endblock %}
+3 -3
View File
@@ -1,7 +1,7 @@
{%- if 'singlehtml' not in builder %}
<div class="form-outline" role="search">
<form id="rtd-search-form" action="{{ pathto('search') }}" method="get">
<input type="search" name="q" class="form-control" placeholder="{{ _('Search docs') }}" />
<div role="search">
<form id="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" placeholder="{{ _('Search docs') }}" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
+1 -1
View File
@@ -1,4 +1,4 @@
html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a,.wy-menu-vertical li.current>a span.toctree-expand:before,.wy-menu-vertical li.on a,.wy-menu-vertical li.on a span.toctree-expand:before,.wy-menu-vertical li span.toctree-expand:before,.wy-nav-top a,.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a span.toctree-expand,.wy-menu-vertical li.on a span.toctree-expand,.wy-menu-vertical li span.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p.caption .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a span.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a span.fa-pull-left.toctree-expand,.wy-menu-vertical li span.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p.caption .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a span.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a span.fa-pull-right.toctree-expand,.wy-menu-vertical li span.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p.caption .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a span.pull-left.toctree-expand,.wy-menu-vertical li.on a span.pull-left.toctree-expand,.wy-menu-vertical li span.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p.caption .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.downloadLine truncated
*/@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a span.toctree-expand,.wy-menu-vertical li.on a span.toctree-expand,.wy-menu-vertical li span.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p.caption .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a span.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a span.fa-pull-left.toctree-expand,.wy-menu-vertical li span.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p.caption .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a span.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a span.fa-pull-right.toctree-expand,.wy-menu-vertical li span.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p.caption .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a span.pull-left.toctree-expand,.wy-menu-vertical li.on a span.pull-left.toctree-expand,.wy-menu-vertical li span.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p.caption .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.downloadLine truncated
+11 -11
View File
@@ -4,23 +4,23 @@
left: 0
width: $nav-desktop-width
color: $section-background-color
background: darken($nav-background-color, 8%)
font-family: $font-family-base
z-index: $zindex-popover
background: darken($menu-background-color, 8%)
font-family: $base-font-family
z-index: $z-index-tray
a
color: $link_color
text-decoration: none
.rst-badge-small
display: none
.rst-current-version
padding: $line-height-base / 2
background-color: darken($nav-background-color, 5%)
padding: $base-line-height / 2
background-color: darken($menu-background-color, 5%)
display: block
text-align: right
font-size: 90%
cursor: pointer
color: $green
@include clearfix
+clearfix
.fa
color: $section-background-color
.fa-book
@@ -41,7 +41,7 @@
display: block
.rst-other-versions
font-size: 90%
padding: $line-height-base / 2
padding: $base-line-height / 2
color: $text-medium
display: none
hr
@@ -50,13 +50,13 @@
border: 0
margin: 20px 0
padding: 0
border-top: solid 1px lighten($nav-background-color, 5%)
border-top: solid 1px lighten($menu-background-color, 5%)
dd
display: inline-block
margin: 0
a
display: inline-block
padding: $line-height-base / 4
padding: $base-line-height / 4
color: $section-background-color
&.rst-badge
width: auto
@@ -82,11 +82,11 @@
width: auto
height: 30px
line-height: 30px
padding: 0 $line-height-base / 4
padding: 0 $base-line-height / 4
display: block
text-align: center
@media (max-width: $nav-media-query)
+media($tablet)
.rst-versions
width: 85%
display: none
+3
View File
@@ -1,5 +1,7 @@
// Slimmer version of FA for use on the badge_only.sass file.
+font-face(FontAwesome, '#{$fa-font-path}/fontawesome-webfont')
.fa:before
display: inline-block
font-family: FontAwesome
@@ -7,6 +9,7 @@
font-weight: normal
line-height: 1
text-decoration: inherit
+font-smooth
a .fa
display: inline-block
-14
View File
@@ -1,14 +0,0 @@
.breadcrumb
padding-left: 0px
background-color: inherit
.breadcrumb-aside
margin-left: auto
@include media-breakpoint-down(sm)
.breadcrumb li.breadcrumb-aside
display: none
@media print
.breadcrumb li.breadcrumb-aside
display: none
+4 -2
View File
@@ -1,5 +1,7 @@
$lato-font-path: "~lato-font/fonts"
$roboto-font-path: "~roboto-fontface/fonts/roboto-slab"
$lato-font-path: "~lato-font/fonts";
$roboto-font-path: "~roboto-fontface/fonts/roboto-slab";
// $font-full-path: '#{$roboto-font-path}/roboto-slab/Roboto-Slab';
@font-face
font-family: 'Lato'
+101 -104
View File
@@ -1,41 +1,20 @@
// Set uniform (but not relative) base font size
body
font-family: $font-family-base
font-size: $font-size-base
h1, h2, h3, h4, h5, h6
font-family: $font-family-headings
font-weight: 700
margin-bottom: $line-height-base
h1
font-size: 175%
h2
font-size: 150%
h3
font-size: 125%
h4
font-size: 115%
h5
font-size: 110%
h6
font-size: 100%
ol, ul
padding-left: 0px
.sidebar-navigation
width: $nav-desktop-width
html
font-size: $base-font-size
.wy-menu
a:hover
text-decoration: none
.wy-menu-vertical
width: $nav-desktop-width
header, p.caption
color: $nav-caption
height: $font-size-base * 2
line-height: $font-size-base * 2
height: $base-font-size * 2
line-height: $base-font-size * 2
padding: 0 $gutter
margin: $line-height-base / 2 0 0 0
margin: $base-line-height / 2 0 0 0
display: block
font-weight: bold
text-transform: uppercase
@@ -50,13 +29,13 @@ ol, ul
&.divide-bottom
border-bottom: solid 1px hsl(0, 0%, 25%)
&.current
background: darken($nav-menu-background-color, 10%)
background: darken($menu-vertical-background-color, 10%)
a
color: $menu-link-medium
border-right: solid 1px darken($nav-menu-background-color, 20%)
border-right: solid 1px darken($menu-vertical-background-color, 20%)
padding: $gutter / 4 $gutter * 1.5
&:hover
background: darken($nav-menu-background-color, 15%)
background: darken($menu-vertical-background-color, 15%)
code
border: none
background: inherit
@@ -70,7 +49,8 @@ ol, ul
margin-left: -1.2em
@extend .fa
@extend .fa-plus-square-o
line-height: 18px
font-size: .8em
line-height: 1.6em
color: darken($menu-link-medium, 20%)
// On state for the first level
@@ -79,23 +59,25 @@ ol, ul
padding: $gutter / 4 $gutter
font-weight: bold
position: relative
background: $nav-menu-background-color
background: $menu-vertical-background-color
border: none
padding-left: $gutter -4px
+font-smooth
&:hover
background: $nav-menu-background-color
background: $menu-vertical-background-color
span.toctree-expand
color: $menu-link-medium
span.toctree-expand
@extend .fa
@extend .fa-minus-square-o
display: block
line-height: 18px
font-size: .8em
line-height: 1.6em
color: darken($menu-link-medium, 30%)
li.toctree-l1.current > a
border-bottom: solid 1px darken($nav-menu-background-color, 20%)
border-top: solid 1px darken($nav-menu-background-color, 20%)
border-bottom: solid 1px darken($menu-vertical-background-color, 20%)
border-top: solid 1px darken($menu-vertical-background-color, 20%)
// This is the on state for pages beyond second level
@@ -132,7 +114,6 @@ ol, ul
li.toctree-l#{$toc_level + 1} > a
@extend %display_current_toctree_element
padding: $gutter / 4 $gutter * ($toc_level + .5)
padding-right: $gutter
a:hover span.toctree-expand
@extend %toctree_hover_link_color
@if $toc_level > 2 and $toc_level < 5
@@ -142,19 +123,19 @@ ol, ul
li.toctree-l2
&.current
> a
background: darken($nav-menu-background-color, 20%)
background: darken($menu-vertical-background-color, 20%)
li.toctree-l3 > a
background: darken($nav-menu-background-color, 20%)
background: darken($menu-vertical-background-color, 20%)
span.toctree-expand
color: darken($nav-menu-background-color, 35%)
color: darken($menu-vertical-background-color, 35%)
li.toctree-l3
&.current
> a
background: darken($nav-menu-background-color, 25%)
background: darken($menu-vertical-background-color, 25%)
li.toctree-l4 > a
background: darken($nav-menu-background-color, 25%)
background: darken($menu-vertical-background-color, 25%)
span.toctree-expand
color: darken($nav-menu-background-color, 40%)
color: darken($menu-vertical-background-color, 40%)
li.current ul
display: block
@@ -173,23 +154,23 @@ ol, ul
font-size: 90%
color: $menu-link-light
&:hover
background-color: lighten($nav-background-color, 10%)
background-color: lighten($menu-background-color, 10%)
cursor: pointer
span.toctree-expand
color: $menu-link-light
&:active
background-color: $nav-search-background-color
background-color: $menu-logo-color
cursor: pointer
color: $menu-link-active
span.toctree-expand
color: $menu-link-active
.sidebar-heading
.wy-side-nav-search
display: block
width: $nav-desktop-width
padding: $gutter / 2
margin-bottom: $gutter / 2
z-index: $zindex-fixed
z-index: $z-index-popover
background-color: $nav-search-background-color
text-align: center
color: $nav-search-color
@@ -203,16 +184,17 @@ ol, ul
margin: auto auto $gutter / 2 auto
height: 45px
width: 45px
background-color: $nav-search-background-color
background-color: $menu-logo-color
padding: 5px
border-radius: 100%
> a
> a, .wy-dropdown > a
color: $nav-search-color
font-size: 100%
font-weight: bold
display: inline-block
padding: $line-height-base / 6 $line-height-base / 4
padding: $base-line-height / 6 $base-line-height / 4
margin-bottom: $gutter / 2
+font-smooth
&:hover
background: rgba(255,255,255,.1)
img.logo
@@ -232,29 +214,24 @@ ol, ul
font-weight: normal
color: rgba(255,255,255,.3)
[data-menu-wrap]
+transition(all .2s ease-in)
position: absolute
opacity: 1
width: 100%
opacity: 0
&.move-center
left: 0
right: auto
opacity: 1
&.move-left
right: auto
left: -100%
opacity: 0
&.move-right
right: -100%
left: auto
opacity: 0
.wy-nav .wy-menu-vertical
header
color: $link-color
a
color: $text-light
&:hover
background-color: $link-color
color: $white
.d-flex
.wy-body-for-nav
background: $section-background-color
.sidebar-right
.wy-grid-for-nav
position: absolute
width: 100%
height: 100%
.wy-nav-side
position: fixed
top: 0
bottom: 0
@@ -264,11 +241,11 @@ ol, ul
overflow-x: hidden
overflow-y: hidden
min-height: 100%
color: $menu-medium
background: $nav-background-color
z-index: $zindex-fixed
z-index: $z-index-popover
.sidebar-scroll
padding-bottom: $gutter / 2
.wy-side-scroll
width: $nav-desktop-width + 20px
position: relative
overflow-x: hidden
@@ -284,15 +261,16 @@ ol, ul
line-height: 50px
text-align: center
font-size: 100%
@include clearfix
+clearfix
a
color: $white
font-weight: bold
+font-smooth
img
margin-right: $line-height-base / 2
margin-right: $base-line-height / 2
height: 45px
width: 45px
background-color: $nav-search-background-color
background-color: $menu-logo-color
padding: 5px
border-radius: 100%
i
@@ -301,12 +279,25 @@ ol, ul
cursor: pointer
padding-top: inherit
.page-content-wrapper
.wy-breadcrumbs
+clearfix
.wy-breadcrumbs li
display: inline-block
&.wy-breadcrumbs-aside
float: right
a
display: inline-block
padding: 5px
&:first-child
padding-left: 0
.wy-nav-content-wrap
margin-left: $nav-desktop-width
background: $content-background-color
background: $section-background-color
min-height: 100%
.container-fluid
.wy-nav-content
padding: $gutter $gutter * 2
height: 100%
max-width: $nav-content-width
@@ -315,49 +306,53 @@ ol, ul
footer
color: $footer-color
p
margin-bottom: $line-height-base / 2
margin-bottom: $base-line-height / 2
span.commit code
padding: 0px
font-family: $font-family-code
font-family: $code-font-family
font-size: 1em
background: none
border: none
color: $footer-color
.rst-footer-buttons
@include clearfix
&:before, &:after
width: 100%
+clearfix
.rst-breadcrumbs-buttons
@include clearfix
margin-top: 12px
+clearfix
#search-results
.search li
margin-bottom: $line-height-base
margin-bottom: $base-line-height
border-bottom: solid 1px $table_border_color
padding-bottom: $line-height-base
padding-bottom: $base-line-height
.search li:first-child
border-top: solid 1px $table_border_color
padding-top: $line-height-base
padding-top: $base-line-height
.search li a
font-size: 120%
margin-bottom: $line-height-base / 2
margin-bottom: $base-line-height / 2
display: inline-block
.context
color: $text-medium
font-size: 90%
.genindextable li > ul
margin-left: $line-height-base
margin-left: $base-line-height
@media (max-width: $nav-media-query)
.d-flex
+media($mobile)
.wy-breadcrumbs li.wy-breadcrumbs-aside
display: none
+media($tablet)
.wy-body-for-nav
background: $section-background-color
.wy-nav-top
display: block
.sidebar-right
.wy-nav-side
@if $nav-desktop-position == left
left: -$nav-desktop-width
@else
@@ -365,15 +360,15 @@ footer
&.shift
width: 85%
left: 0
.sidebar-scroll
.wy-side-scroll
width: auto
.sidebar-heading
.wy-side-nav-search
width: auto
.sidebar-navigation
.wy-menu.wy-menu-vertical
width: auto
.page-content-wrapper
.wy-nav-content-wrap
margin-left: 0
.container-fluid
.wy-nav-content
padding: $gutter
&.shift
position: fixed
@@ -384,14 +379,16 @@ footer
overflow: hidden
@media screen and (min-width: $nav-media-query)
.page-content-wrapper
.wy-nav-content-wrap
background: rgba(0,0,0,.05)
.container-fluid
.wy-nav-content
margin: 0
background: $content-background-color
background: $section-background-color
@media print
.rst-versions, footer, .sidebar-right
.rst-versions, footer, .wy-nav-side
display: none
.page-content-wrapper
.wy-breadcrumbs li.wy-breadcrumbs-aside
display: none
.wy-nav-content-wrap
margin-left: 0
+152 -150
View File
@@ -7,8 +7,9 @@
// * That said, know that I'm very unlikely to accept PRs from wyrm just to change style here.
// 2. I plan to remove the !importants in here. Part of it is due to lazyness, part to sphinx's fondness for nesting.
// 3. Try to use variables from wyrm_core/wy_variables.sass. Notable are...
// * $line-height-base // All margins, padding and line-height should use this in .25 increments.
// * $base-line-height // All margins, padding and line-height should use this in .25 increments.
// * $text-color, $text-light, $text-dark...etc
// * $base-font-family, $custom-font-family, $code-font-family
// 4. If you have changes for mobile/tablet, put them at the bottom of the sass file.
// --------------------------------------------------------------------------------------------------------------------
@@ -19,7 +20,7 @@
height: auto
div.figure
margin-bottom: $line-height-base
margin-bottom: $base-line-height
p.caption
font-style: italic
p:last-child.caption
@@ -30,7 +31,7 @@
// Usually it's a good idea to give images some space.
.section > img, .section > a > img
margin-bottom: $line-height-base
margin-bottom: $base-line-height
// normalize browser styling
abbr[title]
@@ -48,24 +49,22 @@
// For the most part, its safe to assume that sphinx wants you to use a blockquote as an indent. It gets
// used in many different ways, so don't assume you can apply some fancy style, just leave it be.
blockquote
@extend .blockquote
margin-left: $line-height-base
line-height: $line-height-base
margin-bottom: $line-height-base
font-size: $font-size-base
margin-left: $base-line-height
line-height: $base-line-height
margin-bottom: $base-line-height
pre.literal-block
white-space: pre
margin: 0
padding: $line-height-base / 2 $line-height-base / 2
font-family: $font-family-code
padding: $base-line-height / 2 $base-line-height / 2
font-family: $code-font-family
display: block
overflow: auto
pre.literal-block, div[class^='highlight']
border: 1px solid $gray-300
border: 1px solid $table-border-color
overflow-x: auto
// 1px hack otherwise border won't show. lame
margin: 1px 0 $line-height-base 0
margin: 1px 0 $base-line-height 0
div[class^='highlight']
padding: 0px
border: none
@@ -74,33 +73,30 @@
div[class^='highlight'] td.code
width: 100%
.linenodiv pre
border-right: solid 1px $gray-300
border-right: solid 1px lighten($table-border-color, 2%)
margin: 0
padding: $line-height-base / 2 $line-height-base / 2
font-family: $font-family-code
padding: $base-line-height / 2 $base-line-height / 2
font-family: $code-font-family
user-select: none
pointer-events: none
div[class^='highlight'] pre
white-space: pre
margin: 0
padding: $line-height-base / 2 $line-height-base / 2
padding: $base-line-height / 2 $base-line-height / 2
display: block
overflow: auto
& .hll
// Line emphasis spans full width
display: block
margin: 0 -1 * $line-height-base / 2
padding: 0 $line-height-base / 2
margin: 0 -1 * $base-line-height / 2
padding: 0 $base-line-height / 2
pre.literal-block, div[class^='highlight'] pre, .linenodiv pre
font-family: $font-family-code
font-family: $code-font-family
font-size: 12px
line-height: 1.4
.literal-block-wrapper
padding: 0px
// Do not allow selection of code block prompts
div.highlight .gp
div.highlight .gp
user-select: none
pointer-events: none
@@ -117,27 +113,26 @@
// These are the various note pullouts that sphinx applies
.note, .attention, .caution, .danger, .error, .hint, .important, .tip, .warning, .seealso, .admonition-todo, .admonition
@extend .alert
color: $text-color
@extend .wy-alert
// These block elements are unsuitable for having floating objects next
// to them
clear: both
.last, > *:last-child
margin-bottom: 0
.admonition-title
// @extend .alert-heading
@extend .wy-alert-title
@extend .fa
@extend .fa-exclamation-circle
&:before
margin-right: 4px
.note, .seealso
@extend .alert-info
@extend .wy-alert.wy-alert-info
.hint, .tip, .important
@extend .alert-success
@extend .wy-alert.wy-alert-success
.error, .danger
@extend .alert-danger
@extend .wy-alert.wy-alert-danger
.warning, .caution, .attention, .admonition-todo
@extend .alert-warning
@extend .wy-alert.wy-alert-warning
// Some people put tables in notes. Let's give them very basic support.
.admonition table
border-color: rgba(0,0,0,.1)
@@ -145,53 +140,27 @@
background: transparent !important
border-color: rgba(0,0,0,.1) !important
.section ul, .toctree-wrapper ul
list-style: disc
line-height: $line-height-base
margin-bottom: $line-height-base
li
list-style: disc
margin-left: $line-height-base
p:last-child
margin-bottom: 0
ul
margin-bottom: 0
li
list-style: circle
li
list-style: square
ol li
list-style: decimal
@extend .wy-plain-list-disc
.section ol.loweralpha, .section ol.loweralpha > li
list-style: lower-alpha
.section ol.upperalpha, .section ol.upperalpha > li
list-style: upper-alpha
.section ol, ol.arabic
list-style: decimal
line-height: $line-height-base
margin-bottom: $line-height-base
li
list-style: decimal
margin-left: $line-height-base
p:last-child
margin-bottom: 0
ul
margin-bottom: 0
li
list-style: disc
@extend .wy-plain-list-decimal
// Complex bullet lists, they have more item margins than simple lists
.section ol li, .section ul li
> *
margin-top: $line-height-base / 2
margin-bottom: $line-height-base / 2
margin-top: $base-line-height / 2
margin-bottom: $base-line-height / 2
&:first-child
margin-top: 0rem
> p
&, &:last-child
margin-bottom: $line-height-base / 2
margin-bottom: $base-line-height / 2
&:only-child, &:only-child:last-child
margin-bottom: 0rem
> ul, > ol
margin-bottom: $line-height-base / 2
margin-bottom: $base-line-height / 2
// Simple lists, no item margins
.section ol.simple li, .section ul.simple li
> *
@@ -202,26 +171,24 @@
margin-bottom: 0rem
.line-block
margin-left: 0px
margin-bottom: $line-height-base
line-height: $line-height-base
margin-bottom: $base-line-height
line-height: $base-line-height
.line-block .line-block
margin-left: $line-height-base
margin-left: $base-line-height
margin-bottom: 0px
// Generics handling of headings and toc stuff.
.topic-title
font-weight: bold
margin-bottom: $line-height-base / 2
margin-bottom: $base-line-height / 2
.toc-backref
color: $text-color
&:hover
text-decoration-line: none
.align-right
float: right
margin: 0px 0px $line-height-base $line-height-base
margin: 0px 0px $base-line-height $base-line-height
.align-left
float: left
margin: 0px $line-height-base $line-height-base 0px
margin: 0px $base-line-height $base-line-height 0px
.align-center
margin: auto
// Do not override display:table for tables
@@ -248,10 +215,33 @@
.centered
text-align: center
// Sidebar content. You'll see at the bottom of this file I change it in mobile.
.sidebar
float: right
width: 40%
display: block
margin: 0 0 $base-line-height $base-line-height
padding: $base-line-height
background: $sidebar-background-color
border: solid 1px $sidebar-border-color
// Sidebar content is usually less relevant, so adjust the margins and sizes.
p, ul, dl
font-size: 90%
.last, > *:last-child
margin-bottom: 0
.sidebar-title
display: block
font-family: $custom-font-family
font-weight: bold
background: $table-border-color
padding: $base-line-height / 4 $base-line-height / 2
margin: -$base-line-height
margin-bottom: $base-line-height
font-size: 100%
// Sphinx can highlight searched text with ?highlighted=searchterm
.highlighted
background: $highlight-color
box-shadow: 0 0 0 $line-height-base / 12 $highlight-color
box-shadow: 0 0 0 $base-line-height / 12 $highlight-color
display: inline
font-weight: bold
@@ -267,81 +257,98 @@
.hlist
width: 100%
// Formate citation and footnotes as a table.
// We will use the fairly well supported css `grid` attribute
dl dt span.classifier
&:before
content: " : "
dl.footnote,
dl.field-list
display: grid
grid-template-columns: max-content auto
> dt
padding-left: 1rem
&:after
content: ":"
> dt, > dd
margin-bottom: 0rem
dl.footnote
font-size: .9rem
> dt
margin: 0rem .5rem .5rem 0rem
line-height: 1.2rem
word-break: break-all
font-weight: normal
> span.brackets
margin-right: .5rem
&:before
content: "["
// The html4 writer outputs the citation and footnotes as a table, and the
// html5 writer outputs these as a definition list. We will use the fairly
// well supported css `grid` attribute to make these back into a table
// HTML4 writer
html.writer-html4 &
table.docutils.citation, table.docutils.footnote
background: none
border: none
td, tr
border: none
background-color: transparent !important
white-space: normal
td.label
padding-left: 0
padding-right: 0
vertical-align: top
// HTML5 writer
html.writer-html5 &
dl dt span.classifier
&:before
content: " : "
dl.footnote,
dl.field-list
display: grid
grid-template-columns: max-content auto
> dt
padding-left: 1rem
&:after
content: "]"
> span.fn-backref
font-style: italic
> dd
margin: 0rem 0rem .5rem 0rem
line-height: 1.2rem
p
font-size: .9rem
dl.option-list
kbd
content: ":"
> dt, > dd
margin-bottom: 0rem
dl.footnote
font-size: .9rem
table.docutils.footnote, dl.footnote
> dt
margin: 0rem .5rem .5rem 0rem
line-height: 1.2rem
word-break: break-all
font-weight: normal
> span.brackets
margin-right: .5rem
&:before
content: "["
&:after
content: "]"
> span.fn-backref
font-style: italic
> dd
margin: 0rem 0rem .5rem 0rem
line-height: 1.2rem
p
font-size: .9rem
dl.option-list
kbd
font-size: .9rem
// Both
html.writer-html4 & table.docutils.citation, table.docutils.footnote,
html.writer-html5 & dl.footnote
color: $text-medium
code
color: $gray-500
color: $gray
// Remove the large vertical space between citations and footnotes
.table-responsive.citation, .table-responsive.footnote
.wy-table-responsive.citation, .wy-table-responsive.footnote
margin-bottom: 0
// Re-add vertical space to element directly following citation and footnotes,
// if the following element is of a different type
.table-responsive.citation + :not(.citation),
.table-responsive.footnote + :not(.footnote)
margin-top: $line-height-base
.wy-table-responsive.citation + :not(.citation),
.wy-table-responsive.footnote + :not(.footnote)
margin-top: $base-line-height
// Re-add vertical space after citation and footnotes if it is the last child of a parent
.table-responsive.citation:last-child, .table-responsivefootnote:last-child
margin-bottom: $line-height-base
.wy-table-responsive.citation:last-child, .wy-table-responsive.footnote:last-child
margin-bottom: $base-line-height
table.docutils
@extend .table
@extend .table-bordered
@extend .wy-table
@extend .wy-table-bordered-all
th
border-color: $gray-300
border-color: $table-border-color
html.writer-html5 &
border: 1px solid $gray-300
border: 1px solid $table-border-color
html.writer-html5 &
th > p, td > p
line-height: 1rem
margin-bottom: 0rem
font-size: .9rem
&:not(.field-list)
@extend .table-striped
@extend .wy-table-striped
// Remove bottom margin for the last element (and it's last child)
td .last, td .last > *:last-child
margin-bottom: 0
// This table is what gets spit out for auto-generated API stuff. I style it smaller bits of padding.
table.field-list
@extend .table
@extend .wy-table
border: none
td
border: none
@@ -361,57 +368,57 @@
tt, code
@extend code
color: $black
font-family: $font-family-code
font-family: $code-font-family
padding: 2px 5px
big, em
font-size: 100% !important
line-height: normal
&.literal
border: 1px solid $gray-300
color: $red
color: $text-code-color
white-space: normal
&.xref, a &
font-weight: bold
color: $text-codexref-color
pre, kbd, samp
font-family: $font-family-code
font-family: $code-font-family
// If the literal is inside an a tag, let's color it like a link
a tt, a code
color: $link-color
dl
margin-bottom: $line-height-base
margin-bottom: $base-line-height
dt
font-weight: bold
margin-bottom: $line-height-base / 2
margin-bottom: $base-line-height / 2
// Most of the content within these dls are one liners, so I halve the normal margins.
p, table, ul, ol
margin-bottom: $line-height-base / 2
margin-bottom: $base-line-height / 2
// rST seems to want dds to be treated as the browser would, indented.
dd
margin: 0 0 $line-height-base / 2 $line-height-base
line-height: $line-height-base
dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
margin-bottom: $line-height-base
margin: 0 0 $base-line-height / 2 $base-line-height
line-height: $base-line-height
html.writer-html4 & dl:not(.docutils),
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
margin-bottom: $base-line-height
> dt
display: table
margin: $line-height-base / 4 0
margin: $base-line-height / 4 0
font-size: 90%
line-height: normal
background: lighten($class-color, 45%)
background: lighten($class-color, 50%)
color: $class-color
border-top: solid 3px lighten($class-color, 20%)
padding: $line-height-base / 4
padding: $base-line-height / 4
position: relative
&:before
color: lighten($class-color, 20%)
.headerlink
color: $text-color
font-size: 100% !important
// parameters
// In the html4 writer, parameters is a table. In html5 writer, parameters
// is a nested dl.field-list
dl:not(.field-list) > dt
margin-bottom: $line-height-base / 4
margin-bottom: $base-line-height / 4
border: none
border-left: solid 3px hsl(0,0%,80%)
background: hsl(0,0%,94%)
@@ -419,8 +426,6 @@
.headerlink
color: $headerlink-color
font-size: 100% !important
&:not(.sig-name)
color: darken($method-color, 35%)
> dt:first-child
margin-top: 0
// Since dts get the callout style, we treat this less as callouts.
@@ -447,7 +452,7 @@
display: inline-block
color: $text-viewcode-color
font-size: 80%
padding-left: $line-height-base
padding-left: $base-line-height
.viewcode-back
display: block
float: right
@@ -472,21 +477,18 @@
margin-right: 4px
.guilabel
border: 1px solid lighten($guilabel-color, 25%)
background: lighten($guilabel-color, 45%)
background: lighten($guilabel-color, 50%)
font-size: 80%
font-weight: 700
border-radius: $line-height-base / 6
padding: $line-height-base / 10 $line-height-base / 4
margin: auto $line-height-base / 12
kbd, .kbd
color: inherit
background: $gray-300
border-radius: $base-line-height / 6
padding: $base-line-height / 10 $base-line-height / 4
margin: auto $base-line-height / 12
.versionmodified
font-style: italic
// Mobile specific
@include media-breakpoint-down(sm)
+media($mobile)
.rst-content
.sidebar
width: 100%
+40 -38
View File
@@ -1,67 +1,69 @@
// In here are varibles used for sphinx_rtd_theme, they either add to or overwrite the default ones
// -------------------------Paths-------------------------
// that are set in wyrm_core/wy_variables.sass. You'll find wyrm in bower_components if you're looking
// for a reference.
$fa-font-path: "~font-awesome/fonts"
$static-img: "../img/"
// -------------------------Layout-------------------------
$gutter: 1.618em // the golden ratio
$nav-desktop-position: left
$nav-desktop-width: 300px
$nav-content-width: 800px
$nav-media-query: (($nav-desktop-width) + ($nav-content-width))
// -------------------------Typography-------------------------
$font-family-base: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif
$font-family-headings: "Roboto Slab", ff-tisa-web-pro, Georgia, Arial, sans-serif
$font-family-code: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace
$font-display: block
$font-size-base: 16px
$line-height-base: 24px
// -------------------------Colors-------------------------
// Text
$text-color: hsl(0,0%,25%) !default
$text-dark: lighten($text-color,15%) !default
$text-medium: lighten($text-color,25%) !default
$text-light: lighten($text-color,45%) !default
$text-lighter: lighten($text-color,60%) !default
// Content
$section-background-color: $gray-200
$content-background-color: $white
$footer-color: $text-medium
// Links
$link-color: $blue
$link-color-visited: $purple
$headerlink-color: $text-color
// Math
$mathjax-color: $text-color
$headerlink-color: $text-color
// Code colors
$text-viewcode-color: $green
$text-codexref-color: $text-color
// Definition list colors
$class-color: $blue
$method-color: $gray-500
$method-color: $gray
// GUI label color
$guilabel-color: $blue
// Footer colors
$footer-color: $text-medium
// Menu colors
$menu-vertical-background-color: $section-background-color
// Menu text colors
$menu-color: $gray
$menu-dark: lighten($menu-color,10%) !default
$menu-medium: lighten($menu-color,27.5%) !default
$menu-light: lighten($menu-color,45%) !default
$menu-lighter: lighten($menu-color,60%) !default
// Menu link colors
$menu-link-color: $text-color
$menu-link-dark: $text-dark
$menu-link-medium: $text-medium
$menu-link-light: $text-lighter
$menu-link-active: $white
// Navigation colors
$nav-background-color: #343131
$nav-search-background-color: #2980B9
$nav-background-color: $menu-background-color
$nav-search-background-color: $blue
$nav-search-color: $section-background-color
$nav-menu-background-color: $section-background-color
$nav-caption: $nav-search-background-color
$nav-link-color: $blue
$nav-link-color-visited: $purple
$nav-link-color-hover: lighten($nav-link-color, 6%) !default
$nav-link-color-alt: hsl(33, 100%, 51%)
$nav-caption: lighten($blue, 15%)
// Sidebar colors
$sidebar-background-color: $table-stripe-color
$sidebar-border-color: $table-border-color
$sidebar-title-background-color: $table-border-color
// Sphinx highlight color
$highlight-color: $yellow
$base-font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif
$custom-font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif
$custom-font-family2: Georgia, serif
$code-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace
$font-display: block
+8 -5
View File
@@ -4,10 +4,13 @@
// This generates the RTD sticky badge for non RTD themes. As
// always, only files labeled "theme_*.sass should be edited".
// ------------------------------------------------------------
$border-box-sizing: false !default
@import "node_modules/bootstrap/scss/functions"
@import "node_modules/bootstrap/scss/variables"
@import "node_modules/bootstrap/scss/mixins"
@import wyrm_core/wy_variables
@import theme_variables
@import theme_badge_fa
@import theme_badge
@import ~bourbon/app/assets/stylesheets/bourbon
@import ~bourbon-neat/app/assets/stylesheets/neat
@import wyrm_core/mixin
@import wyrm_core/grid_settings
@import _theme_badge_fa
@import _theme_badge
+28 -4
View File
@@ -6,17 +6,41 @@
// "theme_*.sass". All other files are loaded through bower.
// ------------------------------------------------------------
@import ~bootstrap/scss/bootstrap
// Variable defaults set by Wyrm
@import wyrm_core/wy_variables
// Variable overrides that change coloring and fonts for this theme.
@import theme_variables
// Font Awesome
@import ~font-awesome/scss/font-awesome
// bourbon.io framework
@import ~bourbon/app/assets/stylesheets/bourbon
// Bourbon.io/neat framework, with some default media queries
@import wyrm_core/grid_settings
@import ~bourbon-neat/app/assets/stylesheets/neat
// Some corrections for neat
@import wyrm_core/neat_extra
// Custom reset
@import wyrm_core/reset
// Wyrm mixins
@import wyrm_core/mixin
// Font Awesome with wyrm extras
@import ~font-awesome/scss/font-awesome
@import wyrm_core/font_icon_defaults
// Wyrm core styles used in this theme
@import wyrm_core/alert
@import wyrm_core/button
@import wyrm_core/dropdown
@import wyrm_core/form
@import wyrm_core/generic
@import wyrm_core/table
@import wyrm_core/type
// Theme specific styles. These are likely the files you want to edit.
@import theme_breadcrumbs
@import theme_layout
@import theme_badge
@import theme_rst
+15 -12
View File
@@ -80,15 +80,15 @@ function ThemeNav () {
$(document)
// Shift nav in mobile when clicking the menu.
.on('click', "[data-toggle='wy-nav-top']", function() {
$("[data-toggle='sidebar-collapse']").toggleClass("shift");
$("[data-toggle='wy-nav-shift']").toggleClass("shift");
$("[data-toggle='rst-versions']").toggleClass("shift");
})
// Nav menu link click operations
.on('click', ".sidebar-navigation .current ul li a", function() {
.on('click', ".wy-menu-vertical .current ul li a", function() {
var target = $(this);
// Close menu when you click a link.
$("[data-toggle='sidebar-collapse']").removeClass("shift");
$("[data-toggle='wy-nav-shift']").removeClass("shift");
$("[data-toggle='rst-versions']").toggleClass("shift");
// Handle dynamic display of l3 and l4 nav lists
self.toggleCurrent(target);
@@ -100,17 +100,17 @@ function ThemeNav () {
// Make tables responsive
$("table.docutils:not(.field-list,.footnote,.citation)")
.wrap("<div class='table-responsive'></div>");
.wrap("<div class='wy-table-responsive'></div>");
// Add extra class to responsive tables that contain
// footnotes or citations so that we can target them for styling
$("table.docutils.footnote")
.wrap("<div class='table-responsive footnote'></div>");
.wrap("<div class='wy-table-responsive footnote'></div>");
$("table.docutils.citation")
.wrap("<div class='table-responsive citation'></div>");
.wrap("<div class='wy-table-responsive citation'></div>");
// Add expand links to all parents of nested ul
$('.sidebar-navigation ul').not('.simple').siblings('a').each(function () {
$('.wy-menu-vertical ul').not('.simple').siblings('a').each(function () {
var link = $(this);
expand = $('<span class="toctree-expand"></span>');
expand.on('click', function (ev) {
@@ -127,7 +127,7 @@ function ThemeNav () {
var anchor = encodeURI(window.location.hash) || '#';
try {
var vmenu = $('.sidebar-navigation');
var vmenu = $('.wy-menu-vertical');
var link = vmenu.find('[href="' + anchor + '"]');
if (link.length === 0) {
// this link was not found in the sidebar.
@@ -144,12 +144,15 @@ function ThemeNav () {
// If we found a matching link then reset current and re-apply
// otherwise retain the existing match
if (link.length > 0) {
$('.sidebar-navigation .current').removeClass('current');
$('.wy-menu-vertical .current').removeClass('current');
link.addClass('current');
link.closest('li.toctree-l1').addClass('current');
link.closest('li.toctree-l1').parent().addClass('current');
for (let i = 1; i <= 10; i++) {
link.closest('li.toctree-l' + i).addClass('current');
}
link.closest('li.toctree-l1').addClass('current');
link.closest('li.toctree-l2').addClass('current');
link.closest('li.toctree-l3').addClass('current');
link.closest('li.toctree-l4').addClass('current');
link.closest('li.toctree-l5').addClass('current');
link[0].scrollIntoView();
}
}
+29 -9
View File
@@ -30,9 +30,12 @@ def test_basic():
assert search in content
elif isinstance(app.builder, SingleFileHTMLBuilder):
search = (
'<ul>\n'
'<div class="local-toc"><ul>\n'
'<li class="toctree-l1">'
'<a class="reference internal" href="index.html#document-foo">foo</a>'
'<ul>\n'
'<li class="toctree-l2">'
'<a class="reference internal" href="index.html#document-bar">bar</a>'
'</li>\n'
'</ul>'
)
@@ -60,14 +63,31 @@ def test_empty():
for (app, status, warning) in build_all('test-empty'):
assert app.env.get_doctree('index').traverse(addnodes.toctree)
content = open(os.path.join(app.outdir, 'index.html')).read()
global_toc = '<div class="toctree-wrapper compound">\n</div>'
local_toc = (
'<div class="local-toc"><ul>\n'
'<li><a class="reference internal" href="#">test-empty</a></li>'
'</ul>\n</div>'
)
assert global_toc in content
assert local_toc not in content
if sphinx.version_info < (1, 4):
if isinstance(app.builder, SingleFileHTMLBuilder):
assert '<div class="toctree-wrapper compound">\n</div>' in content
assert '<div class="local-toc">' in content
else:
global_toc = (
'<div class="toctree-wrapper compound">\n'
'<ul class="simple">\n</ul>\n'
'</div>'
)
local_toc = (
'<div class="local-toc"><ul class="simple">'
'</ul>\n</div>'
)
assert global_toc in content
assert local_toc not in content
else:
global_toc = '<div class="toctree-wrapper compound">\n</div>'
local_toc = (
'<div class="local-toc"><ul>\n'
'<li><a class="reference internal" href="#">test-empty</a></li>'
'</ul>\n</div>'
)
assert global_toc in content
assert local_toc not in content
def test_missing_toctree():
+8 -2
View File
@@ -37,10 +37,10 @@ module.exports = {
loader: "sass-loader?indentedSyntax",
options: {
includePaths: [
"node_modules/bootstrap/scss",
"node_modules/bourbon/app/assets/stylesheets",
"node_modules/bourbon-neat/app/assets/stylesheets",
"node_modules/font-awesome/scss"
"node_modules/font-awesome/scss",
"node_modules/wyrm/sass"
]
}
}
@@ -66,5 +66,11 @@ module.exports = {
filename: "css/[name].css?[hash]",
chunkFilename: "css/[name].css?[hash]"
}),
new CopyPlugin([
{
from: 'node_modules/html5shiv/dist/*.min.js',
flatten: true,
to: path.resolve(__dirname,'sphinx_rtd_theme/static/js') },
]),
]
};