diff --git a/doc-generator/src/generator/heading.rs b/doc-generator/src/generator/heading.rs
index 81c62f1..aacda2f 100644
--- a/doc-generator/src/generator/heading.rs
+++ b/doc-generator/src/generator/heading.rs
@@ -18,7 +18,7 @@ impl Printable for Heading {
let html_fragment_text = utils::to_html_fragment(&self.get_text());
format!(
- "
{}
", text) + } + + fn get_text(&self) -> String { + panic!("Paragraph cannot return its raw text") + } +} \ No newline at end of file diff --git a/doc-generator/static/styles/global.css b/doc-generator/static/styles/global.css index 1ebb250..a416abf 100644 --- a/doc-generator/static/styles/global.css +++ b/doc-generator/static/styles/global.css @@ -185,10 +185,6 @@ code, pre { margin-bottom: 1.5rem; } -.marked h2:target { - text-decoration: underline; - text-decoration-color: var(--c5); -} .marked h3 { font-size: 1.75rem; @@ -197,9 +193,11 @@ code, pre { margin-bottom: 1.25rem; text-decoration: underline; + /* position: sticky; top: 0; background-color: var(--bg-color); + */ } .marked h4 { @@ -302,3 +300,14 @@ code, pre { transform: scale(1); } } + +/* Used by headers generated at src/generator/heading.rs */ +.heading-linked :hover::after{ + color: var(--c1); + content: "#"; + display: inline-block; + font-size: 0.7em; + line-height: 1; + margin-left: 4px; + text-decoration: none; +} diff --git a/doc-generator/static/template.html b/doc-generator/static/template.html index f724acd..9469006 100644 --- a/doc-generator/static/template.html +++ b/doc-generator/static/template.html @@ -16,7 +16,7 @@ -