Skip to main content

sphinx-panels

Doc Status Code style: black PyPI

A sphinx extension for creating document components optimised for HTML+CSS.

  • The panels directive creates panels of content in a grid layout, utilising both the Bootstrap 4 grid system, and cards layout.

  • The link-button directive creates a click-able button, linking to a URL or reference, and can also be used to make an entire panel click-able.

  • The dropdown directive creates toggle-able content.

  • The tabbed directive creates tabbed content.

  • opticon and fa (fontawesome) roles allow for inline icons to be added.

.. panels::

    Content of the top-left panel

    ---

    Content of the top-right panel

    ---

    Content of the bottom-left panel

    ---

    Content of the bottom-right panel

The link-button directive can be used to create buttons, which link to a URL (default) or reference. They can be styled by Bootstrap button classes:

.. panels::

    .. link-button:: https://example.com
        :type: url
        :tooltip: hallo
        :classes: btn-success

    ---

    This entire panel is clickable.

    +++

    .. link-button:: panels/usage
        :type: ref
        :text: Go To Reference
        :classes: btn-outline-primary btn-block stretched-link

The dropdown directive combines a Bootstrap card with the HTML details tag to create a collapsible drop-down panel.

.. dropdown:: Click on me to see my content!

    I'm the content which can be anything:

    .. link-button:: https://example.com
        :text: Like a Button
        :classes: btn-primary

Development

To run the tests:

pip install tox
tox -e py37-sphinx3

To test building the docs:

tox -e docs-clean html
tox -e docs-rebuild html

For live builds of the docs:

tox -e docs-live html

You can also build the docs in different themes, by setting HTML_THEME to one of alabaster, sphinx_rtd_theme, pydata_sphinx_theme, sphinx_book_theme:

export HTML_THEME=sphinx_book_theme
tox -e docs-live

For code style and SCSS -> CSS updating:

pip install pre-commit
pre-commit run --all

Release files for sphinx-panels 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-panels 0.6.0
File Size Uploaded
sphinx-panels-0.6.0.tar.gz 85.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-panels 0.6.0
File Interpreter ABI Platform
sphinx_panels-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 172.7 kB

Release files / sphinx-panels-0.6.0.tar.gz

Download URL sphinx-panels-0.6.0.tar.gz
Size 85.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d36dcd26358117e11888f7143db4ac2301ebe90873ac00627bf1fe526bf0f058
BLAKE2b-256 checksum
How to use checksums
d77bddb37819993d7328a743acc838220eb25032b501d5f6beeb6c59924e2e9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10

Release files / sphinx_panels-0.6.0-py3-none-any.whl

Download URL sphinx_panels-0.6.0-py3-none-any.whl
Size 87.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd64afaf85c07f8096d21c8247fc6fd757e339d1be97832c8832d6ae5ed2e61d
BLAKE2b-256 checksum
How to use checksums
8a5a7232e77ac35af925fc231ec8b4242f8a26d7242da9b511a5605f1a091d4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.10

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page