fastlife.template_globals

Template Constants injects as global variables in templates.

Constants are configurable using the setting :attrs:jinjax_global_catalog_class, in order to customize templates.

Those constants are heavy used to inject CSS classes in primary html element that are bound to Jinja component.

Module Contents

Classes

Globals

Templates constants.

API

class fastlife.template_globals.Globals(/, **data: typing.Any)

Bases: pydantic.BaseModel

Templates constants.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

A_CLASS: str

‘space_join(…)’

Default css class for <A/>.

BUTTON_CLASS: str

‘space_join(…)’

Default css class for <Button/>.

CHECKBOX_CLASS: str

‘space_join(…)’

Default css class for <Checkbox/>.

DETAILS_CLASS: str

‘border border-neutral-100 p-4 rounded-m’

Default css class for <Details/>.

FORM_CLASS: str

‘space-y-4 md:space-y-6’

Default css class for <Form/>.

H1_CLASS: str

‘space_join(…)’

Default css class for <H1/>.

H2_CLASS: str

‘space_join(…)’

Default css class for <H2/>.

H3_CLASS: str

‘space_join(…)’

Default css class for <H3/>.

H3_SUMMARY_CLASS: str

‘space_join(…)’

Default css class for <H3/> inside <Summary/>.

H4_CLASS: str

‘space_join(…)’

Default css class for <H4/>.

H5_CLASS: str

‘space_join(…)’

Default css class for <H5/>.

H6_CLASS: str

‘space_join(…)’

Default css class for <H6/>.

ICON_BUTTON_CLASS: str

‘space_join(…)’

css class for <Button/>.

usage:

<Button :class="ICON_BUTTON_CLASS">
  <icons.PencilSquare class="w-6 h-6" title="Copy" />
</Button>
INPUT_CLASS: str

‘space_join(…)’

Default css class for <Input/>.

LABEL_CLASS: str

‘space_join(…)’

Default css class for <Label/>.

P_CLASS: str

‘space_join(…)’

Default css class for <P/>.

RADIO_DIV_CLASS: str

‘flex items-center mb-4’

Default css class for <Radio/> <div> container.

RADIO_INPUT_CLASS: str

‘space_join(…)’

Default css class for <Radio/> <input type="radio">.

RADIO_LABEL_CLASS: str

‘ms-2 text-sm font-medium text-neutral-900 dark:text-neutral-300’

Default css class for <Radio/> <label> element.

SECONDARY_BUTTON_CLASS: str

‘space_join(…)’

css class for <Button/>.

usage:

<Button :class="SECONDARY_BUTTON_CLASS">secondary</Button>
SELECT_CLASS: str

‘space_join(…)’

Default css class for <Select/>.

SUMMARY_CLASS: str

‘flex items-center items-center font-medium cursor-pointer’

Default css class for <Summary/>.

TABLE_CLASS: str

‘table-auto w-full text-left border-collapse’

Default css class for <Table/>.

TD_CLASS: str

‘px-4 py-2 font-normal border-b dark:border-neutral-500’

Default css class for <Td/>.

TH_CLASS: str

‘px-4 py-2 font-medium border-b dark:border-neutral-500’

Default css class for <Th/>.