Update layout

This commit is contained in:
ef3d0c3e 2024-07-29 18:06:28 +02:00
parent 30dff576e7
commit a777e0ca8f
2 changed files with 6 additions and 5 deletions

View file

@ -120,7 +120,7 @@ impl Compiler {
)
.as_str();
}
result += "</head><body>";
result += r#"</head><body><div id="layout">"#;
// TODO: TOC
// TODO: Author, Date, Title, Div
@ -134,7 +134,7 @@ impl Compiler {
let mut result = String::new();
match self.target() {
Target::HTML => {
result += "</body></html>";
result += "</div></body></html>";
}
Target::LATEX => todo!(""),
}
@ -148,7 +148,7 @@ impl Compiler {
let header = self.header(document);
// Body
let mut body = String::new();
let mut body = r#"<div id="content">"#.to_string();
for i in 0..borrow.len() {
let elem = &borrow[i];
@ -157,6 +157,7 @@ impl Compiler {
Err(err) => println!("Unable to compile element: {err}\n{}", elem.to_string()),
}
}
body.push_str("</div>");
// Footer
let footer = self.footer(document);

View file

@ -23,7 +23,7 @@ impl NavEntry {
let mut result = String::new();
match target {
Target::HTML => {
result += r#"<ul id="navbar">"#;
result += r#"<div id="navbar"><ul>"#;
fn process(
target: Target,
@ -69,7 +69,7 @@ impl NavEntry {
process(target, &categories, true, &mut result, self, 0);
result += r#"</ul>"#;
result += r#"</ul></div>"#;
}
_ => todo!(""),
}