diff --git a/src/elements/toc.rs b/src/elements/toc.rs index 4ff7f32..a8a4109 100644 --- a/src/elements/toc.rs +++ b/src/elements/toc.rs @@ -66,6 +66,11 @@ impl Element for Toc { } } + if sections.is_empty() + { + return Ok("".into()) + } + match compiler.target() { Target::HTML => { let match_depth = |current: usize, target: usize| -> String { @@ -92,7 +97,7 @@ impl Element for Toc { result += match_depth(current_depth, section.depth).as_str(); if section.kind & section_kind::NO_NUMBER != 0 { result += format!( - "
  • {}
  • ", + "
  • {}
  • ", Compiler::refname(compiler.target(), section.title.as_str()), Compiler::sanitize(compiler.target(), section.title.as_str()) ) diff --git a/style.css b/style.css index 57acd6f..8acbc66 100644 --- a/style.css +++ b/style.css @@ -205,7 +205,12 @@ li.navbar-entry-current a { margin-top: 1.8em; width: 85%; padding: 0.5em; - background-color: #1f1f1f; + font-size: 1.15em; + + background-color: #242526; + + border-radius: 3px; + box-shadow: 0px 0px 3px 1px #242526 inset; } .toc a { @@ -221,6 +226,7 @@ li.navbar-entry-current a { .toc span { display: flex; justify-content: center; + font-weight: 600; } /* Sections */ @@ -229,6 +235,10 @@ a.section-link { text-decoration: none; } +h1, h2, h3, h4, h5, h6 { + color: #BA54Cc +} + h1:hover a.section-link { display: inline; } @@ -391,4 +401,3 @@ blockquote p::after { .blockquote-author { margin-left: 0.2em; } -