This package provides a theme called “Cloud”, used to generate this documentation. Aside from being just another Sphinx theme, it has a few special features:
It provides a couple of simple styling directives for adding variety to long Python library documentation:
It also provides a number of styling options controlling small details such as external links, document sizing, etc. See below.
It also uses an adaptive layout to work well on all screen sizes from mobile phones to widescreen desktops.
Note
There are a number of options for changing the various colors and fonts used by this theme, which are still undocumented. A complete list can be found in the theme’s configuration file (/cloud_sptheme/themes/cloud/theme.conf).
To use the cloud theme, open your documentation’s Sphinx conf.py file, make the following changes:
# import Cloud
import cloud_sptheme as csp
# ... some contents omitted ...
# set the html theme
html_theme = "cloud"
# NOTE: there is also a red-colored version named "redcloud"
# ... some contents omitted ...
# set the theme path to point to cloud's theme data
html_theme_path = [csp.get_theme_dir()]
# [optional] set some of the options listed above...
html_theme_options = { "roottarget": "index" }
See also
See the next page (Cloud Feature Test) for examples of these options in action.
Adding .. rst-class:: emphasize-children to a 2nd-level section header will cause the headers of all of it’s child sections to be emphasized with a solid background. This is mainly useful for very long sections, where there needs to be a visual divide between 3rd-level sections.
By adding .. rst-class:: html-toggle before any section header, it can be made toggleable:
.. rst-class:: html-toggle
Toggleable Section
------------------
This section is collapsed by default.
While toggleable sections start out collapsed by default, you can use .. rst-class:: html-toggle expanded to override this.
See also
The table_styling extension for additional table styling abilities, e.g. per-column text alignment.