splent_feature_theme
The public shell of a SPLENT product (public_base.html),
the design tokens it is drawn with, a library of composable blocks, and the
Appearance and Menus editors of the admin panel.
The theme never hardcodes a product name, palette or font. The product gives
its identity through configuration, and its palette through THEME_TOKENS or
a skin feature; the admin panel can change both at runtime. What this feature
provides and requires is listed in the [tool.splent.contract] section of
pyproject.toml, which splent feature:contract --write keeps in sync with
the source.
Menu entries
The editors register two entries in the Administration section of the
application shell's menu registry. Neither names roles: each takes the ones
its screen asks for (routes.PANEL_ROLES, administrators), so nobody is
offered a door that answers 403.
| Key | Label | Order | Icon | Opens |
|---|---|---|---|---|
theme_appearance |
Appearance | 40 | sliders |
theme.admin_appearance |
theme_menus |
Menus | 50 | menu |
theme.admin_menus |
A product hides or reorders them by key in [tool.splent.layout.menu].
# the product's pyproject.toml
[tool.splent.layout.menu]
hide = ["theme_menus"]
The layout.authenticated_sidebar hooks that drew the same two entries stay
for one minor, for the shells that still render slots. A shell draws the
registry or the slots, never both.
Configuration
Declared in [tool.splent.config]. A product overrides them in its own
[tool.splent.config]. The Appearance editor wins over all of them where it
has a field for the value.
| Key | Default | What it does |
|---|---|---|
SITE_NAME |
the package name | What the site calls itself in the header, the browser tab and the footer. |
SITE_TAGLINE |
empty | The line under the name. |
SITE_LOGO |
empty | The header logo, a path inside the product's static folder. Empty draws no logo. |
SITE_BRAND_MODE |
both |
How the header brand renders: logo, text or both. |
SITE_LOGO_SIZE |
40 |
The logo height in pixels. |
SITE_BREADCRUMBS |
deep |
Where the automatic breadcrumb trail appears: deep, all or off. |
THEME_TOKENS |
the theme's defaults | The palette and fonts, a JSON object of token name to CSS value. |
THEME_TOKENS takes the names of DEFAULT_TOKENS in tokens.py and goes
over them, so a product writes only what it changes. An empty font_url
loads no web font, and the fonts named in font_body, font_heading and
font_display then come from the reader's system.
# the product's pyproject.toml
[tool.splent.config]
SITE_NAME = "uvlhub"
SITE_LOGO = "media/logos/default.svg"
SITE_BRAND_MODE = "logo"
THEME_TOKENS = '{"primary": "#287FB9", "font_url": "", "font_body": "system-ui, sans-serif"}'
A THEME_TOKENS that is not valid JSON, is not an object, names a token the
theme does not have or gives one a value that is not a string stops the boot
with a message that says which. A skin that sets THEME_TOKENS in its
init_feature replaces the product's whole.
Use it in a product
splent feature:add splent_feature_theme
Develop
splent feature:test splent_feature_theme
splent feature:contract splent_feature_theme
Metadata
Release files for splent-feature-theme 0.15.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| splent_feature_theme-0.15.0.tar.gz | 67.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| splent_feature_theme-0.15.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 145.3 kB
Release files / splent_feature_theme-0.15.0.tar.gz
| Download URL | splent_feature_theme-0.15.0.tar.gz |
|---|---|
| Size | 67.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
704ebc05490889997a7c15fdc4df2cae5164638d351799ff8163254176d5e97c
|
|
BLAKE2b-256 checksum How to use checksums |
77390146a45b85f60bc3abcba7b096164adb1ca0cb8763662375313d1d210176
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.16
|
Release files / splent_feature_theme-0.15.0-py3-none-any.whl
| Download URL | splent_feature_theme-0.15.0-py3-none-any.whl |
|---|---|
| Size | 78.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d2193805f9fd25b4f38730eb4176b091d5f460024f6999d621000f52151f92e
|
|
BLAKE2b-256 checksum How to use checksums |
c6fc4d981ff9822909f17d065c630c9ecc2b3ef5578e0f1eedba48d37ccacd24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.16
|
Security for splent-feature-theme 0.15.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.