css tweaks, cooking up an image banner
This commit is contained in:
parent
6d887da5cd
commit
d3b2e7489d
5 changed files with 74 additions and 16 deletions
|
@ -24,7 +24,7 @@ use crate::{
|
|||
tree::branches_to_html,
|
||||
},
|
||||
state::Source,
|
||||
tree::SemaRoots,
|
||||
tree::{attributes::RootAttributes, SemaRoots},
|
||||
};
|
||||
|
||||
use crate::state::{FileId, Treehouse};
|
||||
|
|
|
@ -56,9 +56,9 @@ pub fn branch_to_html(
|
|||
BranchKind::Expanded => "<details open>",
|
||||
BranchKind::Collapsed => "<details>",
|
||||
});
|
||||
s.push_str("<summary>");
|
||||
s.push_str("<summary class=\"branch-container\">");
|
||||
} else {
|
||||
s.push_str("<div>");
|
||||
s.push_str("<div class=\"branch-container\">");
|
||||
}
|
||||
|
||||
s.push_str("<th-bp></th-bp>");
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
use serde::Deserialize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Top-level `%%` root attributes.
|
||||
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize)]
|
||||
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub struct RootAttributes {
|
||||
/// Title of the generated .html page.
|
||||
///
|
||||
/// The page's tree path is used if empty.
|
||||
#[serde(default)]
|
||||
pub title: String,
|
||||
|
||||
/// Summary of the generated .html page.
|
||||
#[serde(default)]
|
||||
pub description: Option<String>,
|
||||
|
||||
/// ID of picture attached to the page, to be used as a thumbnail.
|
||||
#[serde(default)]
|
||||
pub thumbnail: Option<String>,
|
||||
}
|
||||
|
||||
/// Branch attributes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue