pydata_sphinx_theme.translator#
A custom Sphinx HTML Translator for Bootstrap layout.
Attributes#
Classes#
Mixin HTML Translator for a Bootstrap-ified Sphinx layout. |
Functions#
|
Add bootstrap HTML functionality if we are using an HTML translator. |
Module Contents#
- class pydata_sphinx_theme.translator.BootstrapHTML5TranslatorMixin(*args, **kwds)[source]#
Mixin HTML Translator for a Bootstrap-ified Sphinx layout.
Only a couple of functions have been overridden to produce valid HTML to be directly styled with Bootstrap, and fulfill acessibility best practices.
- depart_table(node)[source]#
Custom depart_table method to close the scrollable div we add in visit_table.
- pydata_sphinx_theme.translator.setup_translators(app)[source]#
Add bootstrap HTML functionality if we are using an HTML translator.
This re-uses the pre-existing Sphinx translator and adds extra functionality defined in
BootstrapHTML5TranslatorMixin
. This way we can retain the original translator’s behavior and configuration, and _only_ add the extra bootstrap rules. If we don’t detect an HTML-based translator, then we do nothing.- Parameters: