Merge branch 'master' into Blendify/fix-717

This commit is contained in:
Aaron Carlisle 2021-04-11 02:50:13 -04:00 committed by GitHub
commit 46883893e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 1357 additions and 1742 deletions

View File

@ -1,9 +1,11 @@
version: 2 version: 2
python: python:
version: 3 version: 3.8
install: install:
- requirements: docs/requirements.txt - requirements: docs/requirements.txt
- method: pip
path: .
sphinx: sphinx:
configuration: docs/conf.py configuration: docs/conf.py

View File

@ -5,6 +5,50 @@ Changelog
master master
====== ======
v1.0.0
======
Incompatible Changes
--------------------
* The minimum supported python version is now 2.7 or 3.4 and greater (#1093)
* The minimum supported Sphinx version is now 1.6 (#1091)
Deprecated
----------
* Support for sphinx's html4 writer is deprecated and will be removed in version 2.0 (#1091)
Other Changes
-------------
* Update npm development dependencies (#1096)
* Don't require npm to build from source (#1039)
* Use regular toctree instead of toc for singlehtml builder (#507)
* Templates: Cleanup Whitespace (#1060)
Fixes
-----
* Javascript: Add support for deep toc levels (#1089)
* Use Proper Sass Syntax (#1069)
* Nav: Fix right padding on level2+ (#1068)
* Fix Nav Buttons Size (#1067)
* Fix: wrap inline literals (#1050)
* Fix aria label (#1056)
* Respect tab order for prev/next buttons (#1051)
* Nav: Don't toggle terminal nodes (#1049)
v0.5.2
======
:Date: April 5, 2021
.. note:: This commit will not be in ``master``, but was branched directly off ``0.5.1`` to minimize issues.
The next full release will contain all PR's previously merged.
* Depend on docutils < 0.17 (#1113)
v0.5.1 v0.5.1
====== ======

View File

@ -10,12 +10,14 @@ sys.path.insert(0, os.path.abspath('..'))
sys.path.append(os.path.abspath('./demo/')) sys.path.append(os.path.abspath('./demo/'))
import sphinx_rtd_theme import sphinx_rtd_theme
from sphinx_rtd_theme import __version__ as theme_version
from sphinx_rtd_theme import __version_full__ as theme_version_full
from sphinx.locale import _ from sphinx.locale import _
project = u'Read the Docs Sphinx Theme' project = u'Read the Docs Sphinx Theme'
slug = re.sub(r'\W+', '-', project.lower()) slug = re.sub(r'\W+', '-', project.lower())
version = '0.5.1' version = theme_version
release = '0.5.1' release = theme_version_full
author = u'Dave Snider, Read the Docs, Inc. & contributors' author = u'Dave Snider, Read the Docs, Inc. & contributors'
copyright = author copyright = author
language = 'en' language = 'en'
@ -41,7 +43,7 @@ pygments_style = 'default'
intersphinx_mapping = { intersphinx_mapping = {
'rtd': ('https://docs.readthedocs.io/en/stable/', None), 'rtd': ('https://docs.readthedocs.io/en/stable/', None),
'sphinx': ('https://www.sphinx-doc.org/en/stable/', None), 'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
} }
html_theme = 'sphinx_rtd_theme' html_theme = 'sphinx_rtd_theme'

View File

@ -37,49 +37,49 @@ documentation navigation.
.. confval:: collapse_navigation .. confval:: collapse_navigation
:type: boolean
:default: ``True``
With this enabled, navigation entries are not expandable -- the ``[+]`` With this enabled, navigation entries are not expandable -- the ``[+]``
icons next to each entry are removed. icons next to each entry are removed.
: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 .. confval:: sticky_navigation
Scroll the navigation with the main page content as you scroll the page.
:type: boolean :type: boolean
:default: ``True`` :default: ``True``
Scroll the navigation with the main page content as you scroll the page.
.. confval:: navigation_depth .. confval:: navigation_depth
:type: integer
:default: ``4``
The maximum depth of the table of contents tree. Set The maximum depth of the table of contents tree. Set
this to ``-1`` to allow unlimited depth. this to ``-1`` to allow unlimited depth.
.. confval:: includehidden :type: integer
:default: ``4``
:type: boolean .. confval:: includehidden
:default: ``True``
Specifies if the navigation includes hidden table(s) of contents -- that is, Specifies if the navigation includes hidden table(s) of contents -- that is,
any :rst:dir:`sphinx:toctree` directive that is marked with the ``:hidden:`` any :rst:dir:`sphinx:toctree` directive that is marked with the ``:hidden:``
option. option.
.. confval:: titles_only
:type: boolean :type: boolean
:default: False :default: ``True``
.. confval:: titles_only
When enabled, page subheadings are not included in the When enabled, page subheadings are not included in the
navigation. navigation.
.. note:: :type: boolean
Setting :confval:`collapse_navigation` to ``False`` and using a high value :default: False
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 .. _table of contents configuration options: http://www.sphinx-doc.org/en/stable/templating.html#toctree
@ -96,28 +96,28 @@ Miscellaneous options
.. confval:: analytics_id .. confval:: analytics_id
:type: string
If specified, Google Analytics' javascript is included in your pages. If specified, Google Analytics' javascript is included in your pages.
Set the value to the ID provided to you by google (like ``UA-XXXXXXX``). Set the value to the ID provided to you by google (like ``UA-XXXXXXX``).
:type: string
.. confval:: analytics_anonymize_ip .. confval:: analytics_anonymize_ip
Anonymize visitor IP addresses in Google Analytics.
:type: boolean :type: boolean
:default: ``False`` :default: ``False``
Anonymize visitor IP addresses in Google Analytics.
.. confval:: canonical_url .. confval:: canonical_url
:type: URL
This will specify a `canonical URL`_ meta link element to tell search This will specify a `canonical URL`_ meta link element to tell search
engines which URL should be ranked as the primary URL for your engines which URL should be ranked as the primary URL for your
documentation. This is important if you have multiple URLs that 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 is available through. The URL points to the root path of the
documentation and requires a trailing slash. documentation and requires a trailing slash.
:type: URL
.. deprecated:: 0.6.0 .. deprecated:: 0.6.0
Use :confval:`sphinx:html_baseurl` instead. Use :confval:`sphinx:html_baseurl` instead.
@ -126,51 +126,52 @@ Miscellaneous options
.. confval:: display_version .. confval:: display_version
If ``True``, the version number is shown at the top of the sidebar.
:type: boolean :type: boolean
:default: ``True`` :default: ``True``
If ``True``, the version number is shown at the top of the sidebar.
.. confval:: logo_only .. confval:: logo_only
:type: boolean
:default: ``False``
Only display the logo image, do not display the project name at the top of Only display the logo image, do not display the project name at the top of
the sidebar the sidebar
.. confval:: prev_next_buttons_location :type: boolean
:default: ``False``
:type: string .. confval:: prev_next_buttons_location
:default: ``bottom``
Location to display :guilabel:`Next` and :guilabel:`Previous` buttons. This Location to display :guilabel:`Next` and :guilabel:`Previous` buttons. This
can be either ``bottom``, ``top``, ``both`` , or ``None``. can be either ``bottom``, ``top``, ``both`` , or ``None``.
:type: string
:default: ``bottom``
.. confval:: style_external_links .. confval:: style_external_links
Add an icon next to external links.
:type: boolean :type: boolean
:default: ``False`` :default: ``False``
Add an icon next to external links.
.. confval:: vcs_pageview_mode .. confval:: vcs_pageview_mode
:type: string
:default: ``blob`` or ``view``
Changes how to view files when using ``display_github``, ``display_gitlab``, Changes how to view files when using ``display_github``, ``display_gitlab``,
etc. When using GitHub or GitLab this can be: ``blob`` (default), ``edit``, etc. When using GitHub or GitLab this can be: ``blob`` (default), ``edit``,
or ``raw``. On Bitbucket, this can be either: ``view`` (default) or or ``raw``. On Bitbucket, this can be either: ``view`` (default) or
``edit``. ``edit``.
:type: string
:default: ``blob`` or ``view``
.. confval:: style_nav_header_background .. 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 :type: string
:default: ``#2980B9`` :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 File-wide metadata
================== ==================
@ -190,7 +191,6 @@ The following options can be used as :ref:`file-wide metadata
Force the :guilabel:`Edit on GitLab` button to use the configured URL. Force the :guilabel:`Edit on GitLab` button to use the configured URL.
Other configuration Other configuration
=================== ===================

View File

@ -101,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. #. Update the changelog (``docs/changelog.rst``) with the version information.
#. Run ``python setup.py update_translations`` to compile new translation files #. Run ``python setup.py update_translations`` to compile new translation files
and update Transifex. and update Transifex.
#. Run ``python setup.py build`` to rebuild all the theme assets and the Python #. Run ``python setup.py build_assets`` to rebuild all the theme assets and the Python
package. package.
#. Commit these changes. #. Commit these changes.
#. Tag the release in git: ``git tag $NEW_VERSION``. #. Tag the release in git: ``git tag $NEW_VERSION``.
#. Push the tag to GitHub: ``git push --tags origin``. #. Push the tag to GitHub: ``git push --tags origin``.
#. Upload the package to PyPI: #. Upload the package to PyPI:
.. code:: console .. code:: console
$ rm -rf dist/ $ rm -rf dist/
$ python setup.py sdist bdist_wheel $ python setup.py sdist bdist_wheel
$ twine upload --sign --identity security@readthedocs.org dist/* $ twine upload --sign --identity security@readthedocs.org dist/*
.. _PEP440: https://www.python.org/dev/peps/pep-0440/ .. _PEP440: https://www.python.org/dev/peps/pep-0440/

View File

@ -23,14 +23,20 @@ In your ``conf.py`` file:
.. note:: .. 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 Adding this theme as an extension is what enables localization of theme
your output, either we lack the localized strings for your locale, or you strings in your translated output. If these strings are not translated in
are using an old version of the theme. 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 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 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 ``docs/_themes/sphinx_rtd_theme`` then add the following two settings to your Sphinx
``conf.py`` file: ``conf.py`` file:
@ -39,3 +45,11 @@ Symlink or subtree the ``sphinx_rtd_theme/sphinx_rtd_theme`` repository into you
html_theme = "sphinx_rtd_theme" html_theme = "sphinx_rtd_theme"
html_theme_path = ["_themes", ] 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.

2726
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{ {
"name": "sphinx_rtd_theme", "name": "sphinx_rtd_theme",
"main": "js/theme.js", "main": "js/theme.js",
"version": "0.5.1", "version": "0.5.2",
"scripts": { "scripts": {
"dev": "webpack-dev-server --open --config webpack.dev.js", "dev": "webpack-dev-server --open --config webpack.dev.js",
"build": "webpack --config webpack.prod.js", "build": "webpack --config webpack.prod.js",
@ -21,26 +21,26 @@
"devDependencies": { "devDependencies": {
"bourbon": "~4.3", "bourbon": "~4.3",
"bourbon-neat": "~1.9", "bourbon-neat": "~1.9",
"copy-webpack-plugin": "^5.1.1", "copy-webpack-plugin": "^5.1.2",
"css-loader": "^3.1.0", "css-loader": "^3.6.0",
"file-loader": "^3.0.1", "file-loader": "^3.0.1",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"html5shiv": "^3.7.3", "html5shiv": "^3.7.3",
"imports-loader": "^0.8.0", "imports-loader": "^0.8.0",
"jquery": "^3.4.1", "jquery": "^3.6.0",
"lato-font": "^3.0.0", "lato-font": "^3.0.0",
"mini-css-extract-plugin": "^0.6.0", "mini-css-extract-plugin": "^0.6.0",
"node-sass": "^4.13.1", "node-sass": "^4.13.1",
"optimize-css-assets-webpack-plugin": "^5.0.3", "optimize-css-assets-webpack-plugin": "^5.0.4",
"roboto-fontface": "^0.10.0", "roboto-fontface": "^0.10.0",
"sass-loader": "^7.3.0", "sass-loader": "^7.3.0",
"style-loader": "^0.23.1", "style-loader": "^0.23.1",
"webpack": "^4.30.0", "webpack": "^4.46.0",
"webpack-cli": "^3.3.1", "webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.3.1", "webpack-dev-server": "^3.11.2",
"webpack-merge": "^4.2.1", "webpack-merge": "^4.2.1",
"webpack-shell-plugin": "^0.5.0", "webpack-shell-plugin": "^0.5.0",
"webpack-watch-files-plugin": "^1.0.3", "webpack-watch-files-plugin": "^1.1.0",
"wyrm": "^1.0.9" "wyrm": "^1.0.9"
} }
} }

View File

@ -1,5 +1,5 @@
[bumpversion] [bumpversion]
current_version = 0.5.1 current_version = 0.5.2
commit = false commit = false
tag = false tag = false
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<dev>\d+))? parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<dev>\d+))?

View File

@ -1,27 +1,29 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""`sphinx_rtd_theme` lives on `Github`_.
.. _github: https://github.com/readthedocs/sphinx_rtd_theme
"""
import distutils.cmd
import os import os
import subprocess import subprocess
import distutils.cmd
import setuptools.command.build_py
from io import open from io import open
from setuptools import setup from setuptools import setup
class WebpackBuildCommand(setuptools.command.build_py.build_py): class WebpackBuildCommand(distutils.cmd.Command):
"""Prefix Python build with Webpack asset build""" description = "Generate static assets"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self): def run(self):
if not 'CI' in os.environ and not 'TOX_ENV_NAME' in os.environ: if not 'CI' in os.environ and not 'TOX_ENV_NAME' in os.environ:
subprocess.run(['npm', 'install'], check=True) subprocess.run(['npm', 'install'], check=True)
subprocess.run(['node_modules/.bin/webpack', '--config', 'webpack.prod.js'], 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): class WebpackDevelopCommand(distutils.cmd.Command):
@ -85,7 +87,7 @@ class TransifexCommand(distutils.cmd.Command):
setup( setup(
name='sphinx_rtd_theme', name='sphinx_rtd_theme',
version='0.5.1', version='0.5.2',
url='https://github.com/readthedocs/sphinx_rtd_theme', url='https://github.com/readthedocs/sphinx_rtd_theme',
license='MIT', license='MIT',
author='Dave Snider, Read the Docs, Inc. & contributors', author='Dave Snider, Read the Docs, Inc. & contributors',
@ -95,7 +97,7 @@ setup(
cmdclass={ cmdclass={
'update_translations': UpdateTranslationsCommand, 'update_translations': UpdateTranslationsCommand,
'transifex': TransifexCommand, 'transifex': TransifexCommand,
'build_py': WebpackBuildCommand, 'build_assets': WebpackBuildCommand,
'watch': WebpackDevelopCommand, 'watch': WebpackDevelopCommand,
}, },
zip_safe=False, zip_safe=False,
@ -115,7 +117,8 @@ setup(
] ]
}, },
install_requires=[ install_requires=[
'sphinx' 'sphinx>=1.6',
'docutils<0.17', # https://github.com/sphinx-doc/sphinx/issues/9001
], ],
tests_require=[ tests_require=[
'pytest', 'pytest',
@ -137,12 +140,17 @@ setup(
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3', '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.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Operating System :: OS Independent', 'Operating System :: OS Independent',
'Topic :: Documentation', 'Topic :: Documentation',
'Topic :: Software Development :: 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',
},
) )

View File

@ -5,18 +5,14 @@ From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
""" """
from os import path from os import path
from sys import version_info as python_version
from sphinx import version_info from sphinx import version_info as sphinx_version
from sphinx.locale import _ 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' __version__ = '0.5.2'
__version_full__ = __version__ __version_full__ = __version__
logger = getLogger(__name__) logger = getLogger(__name__)
@ -38,11 +34,21 @@ def config_initiated(app, config):
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package # See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
def setup(app): def setup(app):
if version_info >= (1, 6, 0): if python_version[0] < 3:
# Register the theme that can be referenced without adding a theme path logger.warning("Python 2 is deprecated with sphinx_rtd_theme, update to Python 3")
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__))) app.require_sphinx('1.6')
if sphinx_version <= (2, 0, 0):
logger.warning("Sphinx 1.x is deprecated with sphinx_rtd_theme, update to Sphinx 2.x or greater")
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")
if version_info >= (1, 8, 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 sphinx_version >= (1, 8, 0):
# Add Sphinx message catalog for newer versions of Sphinx # Add Sphinx message catalog for newer versions of Sphinx
# See http://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_message_catalog # See http://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_message_catalog
rtd_locale_path = path.join(path.abspath(path.dirname(__file__)), 'locale') rtd_locale_path = path.join(path.abspath(path.dirname(__file__)), 'locale')

View File

@ -1,11 +1,3 @@
{#- 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 meta is defined and meta is not none %} {%- if meta is defined and meta is not none %}
{%- set check_meta = True %} {%- set check_meta = True %}
{%- else %} {%- else %}
@ -43,24 +35,24 @@
<!-- User defined GitHub URL --> <!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> <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> <a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{%- endif %} {%- endif %}
{%- elif display_bitbucket %} {%- elif display_bitbucket %}
{%- if check_meta and 'bitbucket_url' in meta %} {%- if check_meta and 'bitbucket_url' in meta %}
<!-- User defined Bitbucket URL --> <!-- User defined Bitbucket URL -->
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> <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> <a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
{%- endif %} {%- endif %}
{%- elif display_gitlab %} {%- elif display_gitlab %}
{%- if check_meta and 'gitlab_url' in meta %} {%- if check_meta and 'gitlab_url' in meta %}
<!-- User defined GitLab URL --> <!-- User defined GitLab URL -->
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> <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> <a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
{%- endif %} {%- endif %}
{%- elif show_source and source_url_prefix %} {%- elif show_source and source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a> <a href="{{ source_url_prefix }}{{ pagename }}{{ page_source_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> <a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
{%- endif %} {%- endif %}

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ ul.fas
text-indent: -0.8em text-indent: -0.8em
li li
.fa .fa
width: .8em width: 0.8em
.fa-large:before, .fa-large:before,
.fa-large:before .fa-large:before
/* 1.5 increased font size for fa-large * 1.25 width /* 1.5 increased font size for fa-large * 1.25 width

View File

@ -15,7 +15,7 @@ html
ul, li ul, li
display: inline-block display: inline-block
li:hover li:hover
background: rgba(255,255,255,.1) background: rgba(255, 255, 255, 0.1)
li li
&.divide-left &.divide-left
border-left: solid 1px hsl(0, 0%, 25%) border-left: solid 1px hsl(0, 0%, 25%)
@ -35,7 +35,7 @@ html
height: $base-font-size * 2 height: $base-font-size * 2
line-height: $base-font-size * 2 line-height: $base-font-size * 2
padding: 0 $gutter padding: 0 $gutter
margin: $base-line-height / 2 0 0 0 margin: ($base-line-height / 2) 0 0 0
display: block display: block
font-weight: bold font-weight: bold
text-transform: uppercase text-transform: uppercase
@ -54,7 +54,7 @@ html
a a
color: $menu-link-medium color: $menu-link-medium
border-right: solid 1px darken($menu-vertical-background-color, 20%) border-right: solid 1px darken($menu-vertical-background-color, 20%)
padding: $gutter / 4 $gutter * 1.5 padding: ($gutter / 4) ($gutter * 1.5)
&:hover &:hover
background: darken($menu-vertical-background-color, 15%) background: darken($menu-vertical-background-color, 15%)
code code
@ -76,7 +76,7 @@ html
// On state for the first level // On state for the first level
li.on a, li.current > a li.on a, li.current > a
color: $menu-link-color color: $menu-link-color
padding: $gutter / 4 $gutter padding: ($gutter / 4) $gutter
font-weight: bold font-weight: bold
position: relative position: relative
background: $menu-vertical-background-color background: $menu-vertical-background-color
@ -107,7 +107,7 @@ html
display: block display: block
%shrink_toctree_element %shrink_toctree_element
font-size: .9em font-size: 0.9em
%toctree_link_color %toctree_link_color
color: $menu-link-color color: $menu-link-color
@ -128,11 +128,11 @@ html
@extend %toctree_link_color @extend %toctree_link_color
&.current &.current
> a > a
padding: $gutter / 4 $gutter * ($toc_level - 1 + .5) padding: ($gutter / 4) ($gutter * ($toc_level - 1 + 0.5))
li.toctree-l#{$toc_level + 1} > a li.toctree-l#{$toc_level + 1} > a
@extend %display_current_toctree_element @extend %display_current_toctree_element
padding: $gutter / 4 $gutter * ($toc_level + .5) padding: ($gutter / 4) ($gutter * ($toc_level + 0.5))
padding-right: $gutter padding-right: $gutter
a:hover span.toctree-expand a:hover span.toctree-expand
@extend %toctree_hover_link_color @extend %toctree_hover_link_color
@ -168,7 +168,7 @@ html
font-weight: normal font-weight: normal
a a
line-height: 18px line-height: 18px
padding: $gutter / 4 $gutter padding: ($gutter / 4) $gutter
display: block display: block
position: relative position: relative
font-size: 90% font-size: 90%
@ -201,7 +201,7 @@ html
border-color: darken($link-color, 5%) border-color: darken($link-color, 5%)
img img
display: block display: block
margin: auto auto $gutter / 2 auto margin: auto auto ($gutter / 2) auto
height: 45px height: 45px
width: 45px width: 45px
background-color: $menu-logo-color background-color: $menu-logo-color
@ -212,11 +212,11 @@ html
font-size: 100% font-size: 100%
font-weight: bold font-weight: bold
display: inline-block display: inline-block
padding: $base-line-height / 6 $base-line-height / 4 padding: ($base-line-height / 6) ($base-line-height / 4)
margin-bottom: $gutter / 2 margin-bottom: $gutter / 2
+font-smooth +font-smooth
&:hover &:hover
background: rgba(255,255,255,.1) background: rgba(255, 255, 255, 0.1)
img.logo img.logo
display: block // display on its own line all the time display: block // display on its own line all the time
margin: 0 auto margin: 0 auto
@ -224,15 +224,15 @@ html
width: auto width: auto
border-radius: 0 border-radius: 0
max-width: 100% // shrink on mobile, if appropriate max-width: 100% // shrink on mobile, if appropriate
background: rgba(0,0,0,0) // make hover background of parent show up properly background: rgba(0, 0, 0, 0) // make hover background of parent show up properly
&.icon &.icon
img.logo img.logo
margin-top: 0.85em // space it away from the title text margin-top: 0.85em // space it away from the title text
> div.version > div.version
margin-top: -1 * ($gutter / 4) margin-top: -1 * $gutter / 4
margin-bottom: $gutter / 2 margin-bottom: $gutter / 2
font-weight: normal font-weight: normal
color: rgba(255,255,255,.3) color: rgba(255, 255, 255, 0.3)
.wy-nav .wy-menu-vertical .wy-nav .wy-menu-vertical
header header
@ -244,7 +244,7 @@ html
color: $white color: $white
[data-menu-wrap] [data-menu-wrap]
+transition(all .2s ease-in) +transition(all 0.2s ease-in)
position: absolute position: absolute
opacity: 1 opacity: 1
width: 100% width: 100%
@ -295,7 +295,7 @@ html
display: none display: none
background: $link-color background: $link-color
color: $white color: $white
padding: $gutter / 4 $gutter / 2 padding: ($gutter / 4) ($gutter / 2)
position: relative position: relative
line-height: 50px line-height: 50px
text-align: center text-align: center
@ -324,7 +324,7 @@ html
min-height: 100% min-height: 100%
.wy-nav-content .wy-nav-content
padding: $gutter $gutter * 2 padding: $gutter ($gutter * 2)
height: 100% height: 100%
max-width: $nav-content-width max-width: $nav-content-width
margin: auto margin: auto
@ -333,7 +333,7 @@ html
position: fixed position: fixed
width: 100% width: 100%
height: 100% height: 100%
background: rgba(0,0,0,.2) background: rgba(0, 0, 0, 0.2)
display: none display: none
z-index: $z-index-modal - 1 z-index: $z-index-modal - 1
&.on &.on
@ -411,7 +411,7 @@ footer
@media screen and (min-width: $nav-media-query) @media screen and (min-width: $nav-media-query)
.wy-nav-content-wrap .wy-nav-content-wrap
background: rgba(0,0,0,.05) background: rgba(0, 0, 0, 0.05)
.wy-nav-content .wy-nav-content
margin: 0 margin: 0
background: $section-background-color background: $section-background-color

View File

@ -56,7 +56,7 @@
pre.literal-block pre.literal-block
white-space: pre white-space: pre
margin: 0 margin: 0
padding: $base-line-height / 2 $base-line-height / 2 padding: ($base-line-height / 2) ($base-line-height / 2)
font-family: $code-font-family font-family: $code-font-family
display: block display: block
overflow: auto overflow: auto
@ -75,21 +75,21 @@
.linenodiv pre .linenodiv pre
border-right: solid 1px lighten($table-border-color, 2%) border-right: solid 1px lighten($table-border-color, 2%)
margin: 0 margin: 0
padding: $base-line-height / 2 $base-line-height / 2 padding: ($base-line-height / 2) ($base-line-height / 2)
font-family: $code-font-family font-family: $code-font-family
user-select: none user-select: none
pointer-events: none pointer-events: none
div[class^='highlight'] pre div[class^='highlight'] pre
white-space: pre white-space: pre
margin: 0 margin: 0
padding: $base-line-height / 2 $base-line-height / 2 padding: ($base-line-height / 2) ($base-line-height / 2)
display: block display: block
overflow: auto overflow: auto
& .hll & .hll
// Line emphasis spans full width // Line emphasis spans full width
display: block display: block
margin: 0 -1 * $base-line-height / 2 margin: 0 (-1 * $base-line-height / 2)
padding: 0 $base-line-height / 2 padding: 0 ($base-line-height / 2)
pre.literal-block, div[class^='highlight'] pre, .linenodiv pre pre.literal-block, div[class^='highlight'] pre, .linenodiv pre
font-family: $code-font-family font-family: $code-font-family
font-size: 12px font-size: 12px
@ -135,10 +135,10 @@
@extend .wy-alert.wy-alert-warning @extend .wy-alert.wy-alert-warning
// Some people put tables in notes. Let's give them very basic support. // Some people put tables in notes. Let's give them very basic support.
.admonition table .admonition table
border-color: rgba(0,0,0,.1) border-color: rgba(0, 0, 0, 0.1)
td, th td, th
background: transparent !important background: transparent !important
border-color: rgba(0,0,0,.1) !important border-color: rgba(0, 0, 0, 0.1) !important
.section ul, .toctree-wrapper ul .section ul, .toctree-wrapper ul
@extend .wy-plain-list-disc @extend .wy-plain-list-disc
.section ol.loweralpha, .section ol.loweralpha > li .section ol.loweralpha, .section ol.loweralpha > li
@ -234,14 +234,14 @@
font-family: $custom-font-family font-family: $custom-font-family
font-weight: bold font-weight: bold
background: $table-border-color background: $table-border-color
padding: $base-line-height / 4 $base-line-height / 2 padding: ($base-line-height / 4) ($base-line-height / 2)
margin: -$base-line-height margin: -$base-line-height
margin-bottom: $base-line-height margin-bottom: $base-line-height
font-size: 100% font-size: 100%
// Sphinx can highlight searched text with ?highlighted=searchterm // Sphinx can highlight searched text with ?highlighted=searchterm
.highlighted .highlighted
background: $highlight-color background: $highlight-color
box-shadow: 0 0 0 $base-line-height / 12 $highlight-color box-shadow: 0 0 0 ($base-line-height / 12) $highlight-color
display: inline display: inline
font-weight: bold font-weight: bold
@ -289,14 +289,14 @@
> dt, > dd > dt, > dd
margin-bottom: 0rem margin-bottom: 0rem
dl.footnote dl.footnote
font-size: .9rem font-size: 0.9rem
> dt > dt
margin: 0rem .5rem .5rem 0rem margin: 0rem 0.5rem 0.5rem 0rem
line-height: 1.2rem line-height: 1.2rem
word-break: break-all word-break: break-all
font-weight: normal font-weight: normal
> span.brackets > span.brackets
margin-right: .5rem margin-right: 0.5rem
&:before &:before
content: "[" content: "["
&:after &:after
@ -304,13 +304,13 @@
> span.fn-backref > span.fn-backref
font-style: italic font-style: italic
> dd > dd
margin: 0rem 0rem .5rem 0rem margin: 0rem 0rem 0.5rem 0rem
line-height: 1.2rem line-height: 1.2rem
p p
font-size: .9rem font-size: 0.9rem
dl.option-list dl.option-list
kbd kbd
font-size: .9rem font-size: 0.9rem
// Both // Both
html.writer-html4 & table.docutils.citation, table.docutils.footnote, html.writer-html4 & table.docutils.citation, table.docutils.footnote,
html.writer-html5 & dl.footnote html.writer-html5 & dl.footnote
@ -340,7 +340,7 @@
th > p, td > p th > p, td > p
line-height: 1rem line-height: 1rem
margin-bottom: 0rem margin-bottom: 0rem
font-size: .9rem font-size: 0.9rem
&:not(.field-list) &:not(.field-list)
@extend .wy-table-striped @extend .wy-table-striped
// Remove bottom margin for the last element (and it's last child) // Remove bottom margin for the last element (and it's last child)
@ -395,14 +395,14 @@
margin-bottom: $base-line-height / 2 margin-bottom: $base-line-height / 2
// rST seems to want dds to be treated as the browser would, indented. // rST seems to want dds to be treated as the browser would, indented.
dd dd
margin: 0 0 $base-line-height / 2 $base-line-height margin: 0 0 ($base-line-height / 2) $base-line-height
line-height: $base-line-height line-height: $base-line-height
html.writer-html4 & dl:not(.docutils), html.writer-html4 & dl:not(.docutils),
html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) html.writer-html5 & dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)
margin-bottom: $base-line-height margin-bottom: $base-line-height
> dt > dt
display: table display: table
margin: $base-line-height / 4 0 margin: ($base-line-height / 4) 0
font-size: 90% font-size: 90%
line-height: normal line-height: normal
background: lighten($class-color, 50%) background: lighten($class-color, 50%)
@ -420,8 +420,8 @@
dl:not(.field-list) > dt dl:not(.field-list) > dt
margin-bottom: $base-line-height / 4 margin-bottom: $base-line-height / 4
border: none border: none
border-left: solid 3px hsl(0,0%,80%) border-left: solid 3px hsl(0, 0%, 80%)
background: hsl(0,0%,94%) background: hsl(0, 0%, 94%)
color: $method-color color: $method-color
.headerlink .headerlink
color: $headerlink-color color: $headerlink-color
@ -480,8 +480,8 @@
font-size: 80% font-size: 80%
font-weight: 700 font-weight: 700
border-radius: $base-line-height / 6 border-radius: $base-line-height / 6
padding: $base-line-height / 10 $base-line-height / 4 padding: ($base-line-height / 10) ($base-line-height / 4)
margin: auto $base-line-height / 12 margin: auto ($base-line-height / 12)
.versionmodified .versionmodified
font-style: italic font-style: italic

View File

@ -6,7 +6,7 @@ $fa-font-path: "~font-awesome/fonts"
$static-img: "../img/" $static-img: "../img/"
$nav-content-width: 800px $nav-content-width: 800px
$nav-media-query: (($nav-desktop-width) + ($nav-content-width)) $nav-media-query: $nav-desktop-width + $nav-content-width
$mathjax-color: $text-color $mathjax-color: $text-color

View File

@ -146,13 +146,10 @@ function ThemeNav () {
if (link.length > 0) { if (link.length > 0) {
$('.wy-menu-vertical .current').removeClass('current'); $('.wy-menu-vertical .current').removeClass('current');
link.addClass('current'); link.addClass('current');
link.closest('li.toctree-l1').addClass('current');
link.closest('li.toctree-l1').parent().addClass('current'); link.closest('li.toctree-l1').parent().addClass('current');
link.closest('li.toctree-l1').addClass('current'); for (let i = 1; i <= 10; i++) {
link.closest('li.toctree-l2').addClass('current'); link.closest('li.toctree-l' + i).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(); link[0].scrollIntoView();
} }
} }