Module framework

Module framework 

Source
Expand description

Framework template system with XDG-compliant storage

This module provides runtime-loadable templates for framework-generated HTML (forms, flash messages, validation errors, error pages, etc.).

Templates are resolved in order:

  1. User customizations in $XDG_CONFIG_HOME/acton-htmx/templates/framework/
  2. Cached defaults in $XDG_CACHE_HOME/acton-htmx/templates/framework/
  3. Embedded fallbacks compiled into the binary

§Example

use acton_htmx::template::framework::FrameworkTemplates;

let templates = FrameworkTemplates::new()?;

// Render a form input
let html = templates.render("forms/input.html", minijinja::context! {
    input_type => "text",
    name => "email",
    id => "email",
})?;

Structs§

FrameworkTemplates
Thread-safe framework template environment with hot reload support

Enums§

FrameworkTemplateError
Errors that can occur when loading or rendering framework templates

Constants§

TEMPLATE_NAMES
Names of all framework templates