README.md 1207 octets

Reference templates

The Askama templates shipped under crates/rustwarden-fediverse-ui/templates/ are exposed at the source level via the template_examples module. Every constant is a &'static str produced by include_str!, so a project re-implementing its own rendering layer can copy the source verbatim and adapt it to a different engine (Tera, Maud, Leptos…).

How to consume

use rustwarden_fediverse_ui::template_examples;

fn main() {
    println!("{}", template_examples::ADMIN_SETTINGS);
}

Structure

  • Public templates (login flow): login_form.html, login_waiting.html, error_unauthorized.html, consent_screen.html, invite_landing.html.
  • User-profile template: connected_apps.html.
  • Admin templates under admin/: settings.html, trust_list.html, queue.html, sessions_remote.html, nodeinfo.html, team_invites.html.

All templates rely on i18n keys served by rustwarden-core's I18nService and on the shared base.html/components/navbar.html exposed by rustwarden-ui — re-using them inside another project requires either keeping the same base layout or adapting the {% extends %} directive.