Skip to main content

ferrohealth_ui/
lib.rs

1// SPDX-FileCopyrightText: Cadasto B.V.
2// SPDX-License-Identifier: BUSL-1.1
3
4//! FerroUI: the shared UI components of the FerroHEALTH consoles.
5//!
6//! The library renders HTML on the server. Every component is a Rust
7//! struct over an Askama template compiled into the crate, and returns
8//! [`html::Html`], markup a console's own template writes with `{{ part }}`
9//! or hands to the next component as its child. [`view`] holds the
10//! components; [`table`] is the one paging and sorting model every listing
11//! shares, [`calendar`] the days a date field counts in, [`highlight`] the
12//! tokenizers of YAML, JSON, XML and AQL, [`icon`] the vendored Lucide
13//! outlines, [`tone`] and [`theme`] the status tones and the theme choice,
14//! [`i18n`] the locale and the catalogs of every word the components draw,
15//! [`style`] the stylesheet and the brand themes as text, [`script`] the
16//! plain script modules as text, and [`serve`] the router a console mounts
17//! to serve them.
18//!
19//! Every page works with no script: what a module adds is behaviour on
20//! top of complete server-rendered HTML, with a link or a form behind every
21//! action. No component writes a `style` attribute, a `<style>` element or
22//! an inline script, so a console keeps `style-src 'self'` and `script-src
23//! 'self'`; no component touches browser storage beyond what the tree keeps
24//! of its open items for the session. No specification governs the
25//! components: our own design (FerroUI #510).
26#![doc(test(attr(deny(warnings))))]
27
28pub mod calendar;
29pub mod highlight;
30pub mod html;
31pub mod i18n;
32pub mod icon;
33pub mod query;
34pub mod script;
35pub mod serve;
36pub mod style;
37pub mod table;
38pub mod theme;
39pub mod tone;
40pub mod view;