Compare commits

..

No commits in common. "a777e0ca8f42ecc6fbf72c63e8658b01ccc9daf7" and "8721f97b98124ba8534c4c5be66794586fef4dc6" have entirely different histories.

3 changed files with 8 additions and 75 deletions

View file

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

View file

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

View file

@ -7,7 +7,6 @@ body {
margin: 0 auto; margin: 0 auto;
} }
/* Styles */
em { em {
padding-left: .1em; padding-left: .1em;
padding-right: .1em; padding-right: .1em;
@ -20,7 +19,9 @@ em {
background-color: #191f26; background-color: #191f26;
} }
a.inline-code { /* Styles */
a.inline-code
{
padding-left: .1em; padding-left: .1em;
padding-right: .1em; padding-right: .1em;
@ -28,73 +29,6 @@ a.inline-code {
background-color: #191f26; background-color: #191f26;
} }
/* Navbar */
#navbar {
left: 0;
top: 0;
bottom: 0;
width: max(16vw, 20ch);
overflow-y: auto;
position: absolute;
box-sizing: border-box;
overscroll-behavior-y: contain;
background-color: #161a26;
color: #aaa;
font-size: 0.9em;
font-weight: bold;
}
#navbar a {
color: #ffb454;
text-decoration: none;
font-weight: normal;
}
#navbar li {
display: block;
position: relative;
padding-left: 1em;
margin-left: 0em;
}
#navbar ul {
margin-left: 0em;
padding-left: 0;
}
#navbar summary{
display: block;
cursor: pointer;
}
#navbar summary::marker,
#navbar summary::-webkit-details-marker{
display: none;
}
#navbar summary:focus{
outline: none;
}
#navbar summary:focus-visible{
outline: 1px dotted #000;
}
#navbar summary:before {
content: "+";
color: #ffb454;
float: left;
text-align: center;
width: 1em;
}
#navbar details[open] > summary:before {
content: "";
}
/* Code blocks */ /* Code blocks */
div.code-block-title { div.code-block-title {
background-color: #20202a; background-color: #20202a;