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¶
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 allowself
as a field name.- 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/>
.
- H3_SUMMARY_CLASS: str¶
‘space_join(…)’
Default css class for
<H3/>
inside<Summary/>
.
- 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>
- 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>
- SUMMARY_CLASS: str¶
‘flex items-center items-center font-medium cursor-pointer’
Default css class for
<Summary/>
.