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

octicon in button text shown as raw HTML

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.8.tar.gz (87.9 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.8-py3-none-any.whl (89.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinx_design-0.0.8.tar.gz
  • Upload date:
  • Size: 87.9 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.8.tar.gz
Algorithm Hash digest
SHA256 490c82445ec3187c2618e55364ad4141a89b5609fedebaa362de48a5ba4dcaea
MD5 84e593d90a4f4de0a851c88abf666d09
BLAKE2b-256 1dff673fe04fb741e7516a4eda46ee6371b233652360695bb62fa7212596b9cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sphinx_design-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 89.8 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 74e4f652a22aaf7548faa1cd5b8cfc619f7bc4555a5ec766aaad4d06c9a01b5f
MD5 cc7b75e6afba789666e722416961b988
BLAKE2b-256 711e7a0a844dabaff0db42431477ad363c7073b1630a7d99c4153f72d63f18d5

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