This commit is contained in:
りき萌 2024-02-12 19:56:06 +01:00
parent 81018eeafe
commit f2e9a5f66e
11 changed files with 126 additions and 16 deletions

View file

@ -21,6 +21,11 @@ pub struct RootAttributes {
/// These are relative to the /static/js directory.
#[serde(default)]
pub scripts: Vec<String>,
/// Additional styles to load into to the page.
/// These are relative to the /static/css directory.
#[serde(default)]
pub styles: Vec<String>,
}
/// A picture reference.
@ -51,6 +56,10 @@ pub struct Attributes {
/// Do not persist the branch in localStorage.
#[serde(default)]
pub do_not_persist: bool,
/// Strings of extra CSS class names to include in the generated HTML.
#[serde(default)]
pub classes: Classes,
}
/// Controls for block content presentation.
@ -76,3 +85,10 @@ pub enum Content {
/// children, an `attribute`-type error is raised.
Link(String),
}
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize)]
pub struct Classes {
/// Classes to append to the branch's <ul> element containing its children.
#[serde(default)]
pub branch_children: String,
}