Skip to content

executablebooks/sphinx-design

Repository files navigation

sphinx-design

Github-CI Coverage Status PyPI

A sphinx extension for designing beautiful, view size responsive web components.

Created with inspiration from Bootstrap (v5), Material Design and Material-UI design frameworks.

Usage

Simply pip install sphinx-design and add the extension to your conf.py:

extensions = ["sphinx_design"]

Supported browsers

sphinx-design targets Baseline Widely Available web features (interoperable across Chrome, Edge, Firefox and Safari for at least 30 months — the evergreen browsers of roughly the last 2½ years). Internet Explorer is not supported. See the getting started guide for details.

Theme support

View the documentation in multiple themes:

Comparison to sphinx-panels

This package is an iteration on sphinx-panels and intends to replace it. See Migrating from sphinx-panels for more information.

Development

It is recommended to use tox to run the tests and document builds. Run tox -va to see all the available tox environments.

To run linting, formatting and CSS generation, use pre-commit. pre-commit run --all-files css regenerates the compiled stylesheet (sphinx_design/static/sphinx-design.min.css) from style/design.toml and the hand-authored style/*.css; you can also run it directly with python tools/generate_css.py.

TODO

  • note design goal; to be flexible, but limit the amount of directive nesting required. This factors in to
    • card header/footer syntax? (don't really want to have to use separate directives for these, hence ^^^/+++ syntax)
    • auto-wrap grid-item and tab-item, if not already inside grid or tab-set?

grids items cannot contain headers; is this in anyway possible with docutils structure?

naming of directives/roles: standard prefix?

why are cards setup with "word-wrap: break-word;"?

handle latex

horizontal card (grid row inside card, picture on left)

subtitle for card (see https://material.io/components/cards#anatomy)

About

A sphinx extension for designing beautiful, screen-size responsive web components.

Topics

Resources

License

Code of conduct

Contributing

Stars

227 stars

Watchers

12 watching

Forks

Contributors