Module dilla_renderer::engine
source · Expand description
Use MiniJinja engine to render @component and inline @template.
Include all Dilla filter functions and abstractions.
Statics
Functions
- Add classes to
Attribute
, a Seq or renderable. - Append a string to the [
minijinja::Value
] String or Seq. - Prepares a string for use as a valid HTML ID.
- Creates an HTML attribute Object as
Attribute
. - Renders a value in an engine-specific format for Minijinja templates. This formatter is used by the init_jinja_environnement() function.
- Generate a random string from a number of type i32.
- Check existing HTML attribute in a Map of attributes treated as
Attribute
. - Check if has class from Seq, which are always treated as
Attribute
. - Initializes a Jinja environment with various filters, functions, globals, and sets a formatter to render Maps in templates. Goal is to instantiate only once the env for the whole payload request.
- Merge Map, which are always treated as
Attribute
. - Prepend a string to a [
minijinja::Value
] String or Seq. - remove 🔒Removes a class or attribute from a [
minijinja::Value
]. - Remove element by name of an
Attribute
. - Remove classes to a Seq, which are always treated as
Attribute
. - Renders a JSON value into a formatted string according to the provided state.
- Add an HTML attribute to a Seq, which are always treated as
Attribute
. - Split a string based on a separator and return an array strings.
- Translate a string.
- Create an int from a String or a float.