diff --git a/Pipfile b/Pipfile index 2ef8fad..72f7363 100644 --- a/Pipfile +++ b/Pipfile @@ -7,6 +7,7 @@ verify_ssl = true sphinx = "==1.7.9" flake8 = "*" sphinx-rtd-theme = "==0.4.3" +sphinxcontrib-contentui = "==0.2.2" doc8 = "*" [packages] diff --git a/Pipfile.lock b/Pipfile.lock index ca0b710..276cf08 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "ecfbf828384f555e2c3144e503c8b7181aeabc626b3ebb5aa49780c4031b7b81" + "sha256": "06eb7f636288ae97e11d97857f15ab2ac6d0983d328401ef2173ed93b80d38fa" }, "pipfile-spec": 6, "requires": { @@ -229,6 +229,13 @@ "index": "pypi", "version": "==0.4.3" }, + "sphinxcontrib-contentui": { + "hashes": [ + "sha256:58e6443ac340c51b51f1d6a0b81406486676230c7bae189118e0b6973051eaa2" + ], + "index": "pypi", + "version": "==0.2.2" + }, "sphinxcontrib-websupport": { "hashes": [ "sha256:1501befb0fdf1d1c29a800fdbf4ef5dc5369377300ddbdd16d2cd40e54c6eefc", diff --git a/doc/api/ev3devices.rst b/doc/api/ev3devices.rst index 99716f8..43a9c9d 100644 --- a/doc/api/ev3devices.rst +++ b/doc/api/ev3devices.rst @@ -1,4 +1,4 @@ -:mod:`ev3devices` -- EV3 Motors and Sensors +:mod:`ev3devices` -- EV3 Devices =========================================== .. automodule:: pybricks.ev3devices diff --git a/doc/api/hubs.rst b/doc/api/hubs.rst new file mode 100644 index 0000000..e260fb4 --- /dev/null +++ b/doc/api/hubs.rst @@ -0,0 +1,27 @@ +:mod:`hubs` -- Programmable Hubs +============================================== + +Select your platform hub using the buttons below. + +.. content-tabs:: + + .. tab-container:: ev3brick + :title: EV3 Brick + + | + + .. include:: hubs_ev3brick.inc + + .. tab-container:: movehub + :title: Move Hub + + | + + .. include:: hubs_movehub.inc + + .. tab-container:: cityhub + :title: City Hub + + | + + .. include:: hubs_cityhub.inc diff --git a/doc/api/hubs_cityhub.rst b/doc/api/hubs_cityhub.inc similarity index 91% rename from doc/api/hubs_cityhub.rst rename to doc/api/hubs_cityhub.inc index e2e990b..cf3fc20 100644 --- a/doc/api/hubs_cityhub.rst +++ b/doc/api/hubs_cityhub.inc @@ -1,6 +1,3 @@ -:mod:`hubs` -- LEGO® Powered Up City Hub -============================================== - .. autoclass:: pybricks.hubs.CityHub :no-members: diff --git a/doc/api/hubs_ev3brick.rst b/doc/api/hubs_ev3brick.inc similarity index 97% rename from doc/api/hubs_ev3brick.rst rename to doc/api/hubs_ev3brick.inc index 00d04fd..bd9a6f0 100644 --- a/doc/api/hubs_ev3brick.rst +++ b/doc/api/hubs_ev3brick.inc @@ -1,9 +1,3 @@ -:mod:`hubs` -- LEGO® MINDSTORMS® EV3 -============================================== - -.. automodule:: pybricks.hubs - :no-members: - .. autoclass:: pybricks.hubs.EV3Brick :no-members: diff --git a/doc/api/hubs_movehub.rst b/doc/api/hubs_movehub.inc similarity index 92% rename from doc/api/hubs_movehub.rst rename to doc/api/hubs_movehub.inc index 3cd631c..3d94093 100644 --- a/doc/api/hubs_movehub.rst +++ b/doc/api/hubs_movehub.inc @@ -1,6 +1,3 @@ -:mod:`hubs` -- LEGO® Powered Up Move Hub -============================================== - .. autoclass:: pybricks.hubs.MoveHub :no-members: diff --git a/doc/api/index.rst b/doc/api/index.rst index aec539d..89f5e10 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -17,26 +17,12 @@ Intro .. toctree:: :maxdepth: 1 - :caption: Modules for EV3/NXT + :caption: Pybricks Modules :hidden: - hubs_ev3brick - ev3devices - -.. toctree:: - :maxdepth: 1 - :caption: Modules for Powered Up - :hidden: - - hubs_movehub - hubs_cityhub + hubs pupdevices - -.. toctree:: - :maxdepth: 1 - :caption: General Modules - :hidden: - + ev3devices motors parameters tools diff --git a/doc/common/conf.py b/doc/common/conf.py index dfd8003..6e87d6c 100644 --- a/doc/common/conf.py +++ b/doc/common/conf.py @@ -42,6 +42,7 @@ extensions = [ 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx.ext.mathjax', + 'sphinxcontrib.contentui', ] # Add any paths that contain templates here, relative to this directory. @@ -112,6 +113,7 @@ if ON_RTD: 'https://media.readthedocs.org/css/sphinx_rtd_theme.css', 'https://media.readthedocs.org/css/readthedocs-doc-embed.css', '_static/css/theme_overrides.css', + '_static/contentui.css', ], 'disclaimer': _DISCLAIMER, } @@ -122,6 +124,7 @@ else: html_context = { 'css_files': [ '_static/css/theme_overrides.css', + '_static/contentui.css', ], 'disclaimer': _DISCLAIMER, }