diff --git a/src/html.rs b/src/html.rs index 1ad0fb0..e2d0f8d 100644 --- a/src/html.rs +++ b/src/html.rs @@ -33,7 +33,6 @@ impl Traverser for Handler { match event { Event::Enter(Container::Headline(headline)) => { let lvl = headline.level(); - let lead = "#".repeat(lvl); let lvl = 1 + min(lvl, 5); let txt = headline.title().map(|t| t.to_string()).collect::(); @@ -47,10 +46,7 @@ impl Traverser for Handler { slugify!(&txt) }; - self.exp.push_str(format!( - r##" "##, - lvl, id, lead - )); + self.exp.push_str(format!("", lvl, id)); if let Some(keyword) = headline.todo_keyword() { self.exp.push_str(match headline.todo_type() { @@ -69,7 +65,7 @@ impl Traverser for Handler { } self.exp.push_str(format!( - r##" permalink to section"##, + r##" "##, id, lvl )); } @@ -309,7 +305,7 @@ AAAA even more res.traverse(&mut exp); assert_eq!( exp.exp.finish(), - r##"

meow permalink to section

fox is fox
<fox> AAAA + r##"

meow

fox is fox
<fox> AAAA

this__has__under_scores yip_{yap yop}

i am a heading link should link to .html @@ -317,8 +313,8 @@ AAAA even more im a directory! webbed sight

the libera.chat logo, but with the mountain replaced with a cat -

TODO wash the fox permalink to section

fox is stimky
<fox> AAAA even more -

DONE finish writing this test permalink to section

"## +

TODO wash the fox

fox is stimky
<fox> AAAA even more +

DONE finish writing this test

"## ); } } diff --git a/src/style.css b/src/style.css index 0304539..e874c5b 100644 --- a/src/style.css +++ b/src/style.css @@ -9,10 +9,6 @@ body { padding: 10px; } -h1, h2, h3, h4, h5, h6 { - font-weight: 400; -} - a { text-decoration: none; color: #3291ff; @@ -128,13 +124,12 @@ li p:nth-of-type(1) { position: absolute; background: #000; color: #fff !important; - padding: 5px; + margin: 0 5px; } -.see-focus:not(:focus) { +:not(:hover) > .see-focus:not(:focus) { width: 1px; height: 1px; - padding: 0; overflow: hidden; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);