Git Product home page Git Product logo

sphinx-panels's Introduction

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

sphinx-panels's People

Contributors

chrisjsewell avatar choldgraf avatar pradyunsg avatar jpmckinney avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.