Update layout
This commit is contained in:
parent
30dff576e7
commit
a777e0ca8f
2 changed files with 6 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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!(""),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue