sphinx-panels


Namesphinx-panels JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://github.com/executablebooks/sphinx-panels
SummaryA sphinx extension for creating panels in a grid layout.
upload_time2021-06-03 21:37:06
maintainer
docs_urlNone
authorChris Sewell
requires_python
licenseMIT
keywords sphinx html bootstrap grid card dropdown button badge
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sphinx-panels

[![Doc Status][rtd-badge]][rtd-link]
[![Code style: black][black-badge]][black-link]
[![PyPI][pypi-badge]][pypi-link]

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](https://getbootstrap.com/docs/4.0/layout/grid/), and [cards layout](https://getbootstrap.com/docs/4.0/components/card/).

- 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.


```rst
.. 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](https://getbootstrap.com/docs/4.0/components/buttons/):

```rst
.. 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](https://getbootstrap.com/docs/4.0/components/card/)
with the [HTML details tag](https://www.w3schools.com/tags/tag_details.asp) to create a collapsible
drop-down panel.

```rst
.. 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:

```console
pip install tox
tox -e py37-sphinx3
```

To test building the docs:

```console
tox -e docs-clean html
tox -e docs-rebuild html
```

For live builds of the docs:

```console
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`:

```console
export HTML_THEME=sphinx_book_theme
tox -e docs-live
```

For code style and SCSS -> CSS updating:

```console
pip install pre-commit
pre-commit run --all
```

[rtd-badge]: https://readthedocs.org/projects/sphinx-panels/badge/?version=latest
[rtd-link]: https://sphinx-panels.readthedocs.io/en/latest/?badge=latest
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
[black-link]: https://github.com/ambv/black
[pypi-badge]: https://img.shields.io/pypi/v/sphinx-panels.svg
[pypi-link]: https://pypi.org/project/sphinx-panels



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/executablebooks/sphinx-panels",
    "name": "sphinx-panels",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "sphinx html bootstrap grid card dropdown button badge",
    "author": "Chris Sewell",
    "author_email": "chrisj_sewell@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d7/7b/ddb37819993d7328a743acc838220eb25032b501d5f6beeb6c59924e2e9e/sphinx-panels-0.6.0.tar.gz",
    "platform": "",
    "description": "# sphinx-panels\n\n[![Doc Status][rtd-badge]][rtd-link]\n[![Code style: black][black-badge]][black-link]\n[![PyPI][pypi-badge]][pypi-link]\n\nA sphinx extension for creating document components optimised for HTML+CSS.\n\n- The `panels` directive creates panels of content in a grid layout, utilising both the Bootstrap 4 [grid system](https://getbootstrap.com/docs/4.0/layout/grid/), and [cards layout](https://getbootstrap.com/docs/4.0/components/card/).\n\n- 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.\n\n- The `dropdown` directive creates toggle-able content.\n\n- The `tabbed` directive creates tabbed content.\n\n- `opticon` and `fa` (fontawesome) roles allow for inline icons to be added.\n\n\n```rst\n.. panels::\n\n    Content of the top-left panel\n\n    ---\n\n    Content of the top-right panel\n\n    ---\n\n    Content of the bottom-left panel\n\n    ---\n\n    Content of the bottom-right panel\n```\n\nThe `link-button` directive can be used to create buttons, which link to a URL (default) or reference.\nThey can be styled by [Bootstrap button classes](https://getbootstrap.com/docs/4.0/components/buttons/):\n\n```rst\n.. panels::\n\n    .. link-button:: https://example.com\n        :type: url\n        :tooltip: hallo\n        :classes: btn-success\n\n    ---\n\n    This entire panel is clickable.\n\n    +++\n\n    .. link-button:: panels/usage\n        :type: ref\n        :text: Go To Reference\n        :classes: btn-outline-primary btn-block stretched-link\n```\n\nThe `dropdown` directive combines a [Bootstrap card](https://getbootstrap.com/docs/4.0/components/card/)\nwith the [HTML details tag](https://www.w3schools.com/tags/tag_details.asp) to create a collapsible\ndrop-down panel.\n\n```rst\n.. dropdown:: Click on me to see my content!\n\n    I'm the content which can be anything:\n\n    .. link-button:: https://example.com\n        :text: Like a Button\n        :classes: btn-primary\n```\n\n## Development\n\nTo run the tests:\n\n```console\npip install tox\ntox -e py37-sphinx3\n```\n\nTo test building the docs:\n\n```console\ntox -e docs-clean html\ntox -e docs-rebuild html\n```\n\nFor live builds of the docs:\n\n```console\ntox -e docs-live html\n```\n\nYou 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`:\n\n```console\nexport HTML_THEME=sphinx_book_theme\ntox -e docs-live\n```\n\nFor code style and SCSS -> CSS updating:\n\n```console\npip install pre-commit\npre-commit run --all\n```\n\n[rtd-badge]: https://readthedocs.org/projects/sphinx-panels/badge/?version=latest\n[rtd-link]: https://sphinx-panels.readthedocs.io/en/latest/?badge=latest\n[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg\n[black-link]: https://github.com/ambv/black\n[pypi-badge]: https://img.shields.io/pypi/v/sphinx-panels.svg\n[pypi-link]: https://pypi.org/project/sphinx-panels\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A sphinx extension for creating panels in a grid layout.",
    "version": "0.6.0",
    "split_keywords": [
        "sphinx",
        "html",
        "bootstrap",
        "grid",
        "card",
        "dropdown",
        "button",
        "badge"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a5a7232e77ac35af925fc231ec8b4242f8a26d7242da9b511a5605f1a091d4b",
                "md5": "d2fe14e8daf43d81eeb0bb3a5987d20b",
                "sha256": "bd64afaf85c07f8096d21c8247fc6fd757e339d1be97832c8832d6ae5ed2e61d"
            },
            "downloads": -1,
            "filename": "sphinx_panels-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d2fe14e8daf43d81eeb0bb3a5987d20b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 87719,
            "upload_time": "2021-06-03T21:37:05",
            "upload_time_iso_8601": "2021-06-03T21:37:05.410251Z",
            "url": "https://files.pythonhosted.org/packages/8a/5a/7232e77ac35af925fc231ec8b4242f8a26d7242da9b511a5605f1a091d4b/sphinx_panels-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d77bddb37819993d7328a743acc838220eb25032b501d5f6beeb6c59924e2e9e",
                "md5": "f2e926a14ad27d66d59fc329339d496e",
                "sha256": "d36dcd26358117e11888f7143db4ac2301ebe90873ac00627bf1fe526bf0f058"
            },
            "downloads": -1,
            "filename": "sphinx-panels-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f2e926a14ad27d66d59fc329339d496e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 84961,
            "upload_time": "2021-06-03T21:37:06",
            "upload_time_iso_8601": "2021-06-03T21:37:06.613291Z",
            "url": "https://files.pythonhosted.org/packages/d7/7b/ddb37819993d7328a743acc838220eb25032b501d5f6beeb6c59924e2e9e/sphinx-panels-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-06-03 21:37:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "executablebooks",
    "github_project": "sphinx-panels",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "tox": true,
    "lcname": "sphinx-panels"
}
        
Elapsed time: 0.07100s