Skip to main content

splent_feature_public

The public home page of a SPLENT product, served at / (public.index) inside the theme's public shell.

The home knows nothing about content features. It draws the product's brand copy from the SITE_* settings, and every feature that has something for the home contributes it through a template slot. 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.

The home's sections

In order, from templates/public/index.html:

Section Comes from Shown when
Hero home.hero, else the shell's own from site.*: the name, the tagline, the eyebrow (SITE_HERO_EYEBROW, or the edition, dates and venue of SITE_EVENT with its countdown) and the buttons (SITE_HERO_ACTIONS) Always
Highlights SITE_HIGHLIGHTS, under SITE_HIGHLIGHTS_TITLE Set
Feature sections, and the aside home.section, home.aside A feature contributes
Sponsors SITE_SPONSORS, a logo wall under SITE_SPONSORS_TITLE Set
Gallery SITE_GALLERY, static images under SITE_GALLERY_TITLE, which open in the theme's lightbox Set
Call to action SITE_CTA It has a title

The theme builds the site object these come from, and its README lists the shape of each key. What changes from one edition to the next belongs in a feature with an admin screen, never in configuration. Brand copy that reads the same for every edition (the name, the tagline, the highlights, the hero's buttons, the closing call to action) belongs in SITE_*. So the same template serves a conference site with a countdown, a programme and a sponsor strip, and a lab's landing with highlights, projects and a call to action, by choosing features, SITE_* values and a skin.

Slots

Slot What goes in it
home.hero The whole hero. Only for a feature that owns the headline moment (an edition, a campaign). When nothing renders, the home draws its own hero from SITE_*.
home.section Full-width sections (upcoming events, partners, latest posts), in their registered order.
home.aside A narrower column beside the sections (counters, a call to action). Optional.
layout.sidebar.top Filled by this feature with the "Home" entry of the product sidebar, for one more minor (see Menus).
 no home.aside                    something in home.aside
┌─────────────────────────┐      ┌────────────────┬────────┐
│ home.section            │      │ home.section   │ home.  │
│ home.section            │      │ home.section   │ aside  │
└─────────────────────────┘      └────────────────┴────────┘
                                  under 960px the aside goes
                                  below the sections

The home only splits into two columns when some callback of home.aside returns markup, so a hook can decline on its own (return "") and the sections keep the full width. With an aside and no section, the aside takes the whole width.

A feature fills a slot from its hooks.py, as in this one for home.aside.

from flask import render_template
from splent_framework.hooks.template_hooks import register_template_hook


def home_counters():
    return render_template("hooks/home_counters.html", total=count_items())


register_template_hook("home.aside", home_counters, order=50)

Lower order renders first. Each callback renders a self-contained block (a card, a box). Several of them stack with a gap between them.

The columns are styled by assets/css/home.css (classes home-columns, home-columns__main and home-columns__aside). A skin or a product changes the split with the --home-columns custom property.

.home-columns { --home-columns: minmax(0, 1fr) 20rem; }

Menus

public registers Home in the framework's menu registry.

Key Section Order Icon Opens Shown to
home site 0 home / Everyone

site is the section for visitors and accounts alike, at the top of the sidebar and without a heading, so Home comes before every other entry of the site. A product whose logo already leads to the home page leaves it out by key, like any other entry.

# the product's pyproject.toml
[tool.splent.layout.menu]
hide = ["home"]

For one minor Home is still drawn in layout.sidebar.top as well, for the shells that fill their sidebar from hooks. A shell draws the registry or those slots, never both, or Home shows twice. hide does not reach that slot: a product whose shell still draws it leaves Home out with PUBLIC_SIDEBAR_HOME_LINK (see Configuration).

The home page extends shell('public'), so a product that points the public shell at another layout (SPLENT_SHELL_PUBLIC) moves it too.

Configuration

Declared in [tool.splent.config]. A product overrides them in its own [tool.splent.config].

Key Default What it does
PUBLIC_SIDEBAR_HOME_LINK true Deprecated, and 2.0 removes it. false leaves Home out of layout.sidebar.top and out of the menu registry, and logs a warning at startup. Once the product's shell draws the menu registry, use hide = ["home"] instead; a shell that still draws layout.sidebar.top needs the setting until then.
PUBLIC_HOME_TITLE "" The home page's title, which the shell writes into <title> and, in an app shell, into the heading of the page. Empty keeps the site's name and tagline (SITE_NAME — SITE_TAGLINE, or what the Appearance panel says), the title the home always had. A product whose home leads with something else names it here.
# the product's pyproject.toml
[tool.splent.config]
PUBLIC_HOME_TITLE = "Top datasets with the most feature models"

Use it in a product

splent feature:add splent_feature_public

Develop

splent feature:test splent_feature_public
splent feature:contract splent_feature_public

Metadata

Release files for splent-feature-public 1.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splent-feature-public 1.13.0
File Size Uploaded Provenance Actions
splent_feature_public-1.13.0.tar.gz 24.5 kB Without provenance Details for splent_feature_public-1.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for splent-feature-public 1.13.0
File Interpreter ABI Platform Actions
splent_feature_public-1.13.0-py3-none-any.whl Python 3 none any Details for splent_feature_public-1.13.0-py3-none-any.whl

Total release size: 53.0 kB

Release files / splent_feature_public-1.13.0.tar.gz

Download URL splent_feature_public-1.13.0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eeb090580abf16c62533d5a7eb5f2219371b98ca637b961d3467224aced17ed2
BLAKE2b-256 checksum
How to use checksums
101a536c1554a490b1f4de1574fe38b9898f29a04ab9c762047bc645bb970b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / splent_feature_public-1.13.0-py3-none-any.whl

Download URL splent_feature_public-1.13.0-py3-none-any.whl
Size 28.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98102ca6c26af0a350d094a480aedfc3901039e13eb80313da112dd9a0dc1c66
BLAKE2b-256 checksum
How to use checksums
b16eed2a8c1468eab7b970548051c9feae33e3a8a2fe5b0d9136d41cdec0926d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Security for splent-feature-public 1.13.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page