Skip to main content

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

Project description

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

  • Chrome >= 60
  • Firefox >= 60
  • Firefox ESR
  • iOS >= 12
  • Safari >= 12
  • Explorer >= 12

(Mirrors: https://github.com/twbs/bootstrap/blob/v5.0.2/.browserslistrc)

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.

  • Replaces panel directive with top-level grid + children grid-item-card
    • less "bespoke" syntax
    • grid-item can be used when no card is needed
    • card can be used independently of grids
  • tabs changed:
    • top-level tab-set
    • tabbed -> tab-item
    • include :sync: option to synchronize tab selection across sets
  • Minimises direct use of CSS classes (encourage to not use them)
    • More declarative, easy to understand options, easier to validate
    • Easier to work with non-HTML outputs
    • Easier to improve/refactor
  • Updated Bootstrap CSS v4 -> v5
    • top-level grid can define both column numbers and gutter sizes
  • All CSS classes are prefixed with sd- (no clash with other theme/extension CSS)
  • All colors use CSS variables (customisable)

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

Use autoprefixer when compiling SASS (see https://getbootstrap.com/docs/5.0/getting-started/browsers-devices/#supported-browsers)

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

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

paragraph and tab-set in grid-item

rtd PRs not working

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_design-0.0.7.tar.gz (87.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_design-0.0.7-py3-none-any.whl (89.4 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_design-0.0.7.tar.gz.

File metadata

  • Download URL: sphinx_design-0.0.7.tar.gz
  • Upload date:
  • Size: 87.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.11

File hashes

Hashes for sphinx_design-0.0.7.tar.gz
Algorithm Hash digest
SHA256 a3609e382273d6c7f86bdc76daf26f8d14ea20dc77160578399e855a5006652b
MD5 bc26500f9c40747b97b61f200fa0f1b0
BLAKE2b-256 26e092d8be27266db6ac98b6aa521b6b2d4731ff21cbc07f935976606a7a8a56

See more details on using hashes here.

File details

Details for the file sphinx_design-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: sphinx_design-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 89.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.11

File hashes

Hashes for sphinx_design-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9811668b18a5c53c67d269f3cc9b778b70c41fb08ae0de70cdcb2e4c430c25d8
MD5 da9bbac85408b74065128babd4606406
BLAKE2b-256 5f6d25c2597a3a7b7b434637fe8b32e3de37e9520340e91ca60599c9589a0146

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page