From 85c36bcb2614bab4216dca9a2ad76f6ea89688f5 Mon Sep 17 00:00:00 2001 From: Araozu Date: Tue, 11 Apr 2023 11:58:21 -0500 Subject: [PATCH] [Web] Highlight current anchor in sidebar --- doc-generator/src/sidebar/mod.rs | 2 +- doc-generator/static/template.html | 32 ++++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/doc-generator/src/sidebar/mod.rs b/doc-generator/src/sidebar/mod.rs index d0699e2..3f2b447 100644 --- a/doc-generator/src/sidebar/mod.rs +++ b/doc-generator/src/sidebar/mod.rs @@ -54,7 +54,7 @@ impl Topic { let html_fragment_link = utils::to_html_fragment(&self.text); format!( - "
  • {}{}
  • ", + "
  • {}{}
  • ", html_fragment_link, self.text, extra ) } diff --git a/doc-generator/static/template.html b/doc-generator/static/template.html index 221b671..7e79f67 100644 --- a/doc-generator/static/template.html +++ b/doc-generator/static/template.html @@ -41,9 +41,9 @@ {{pages}} -
    +
    +
    {{markdown}}
    @@ -57,5 +57,33 @@ document.head.appendChild(linkEl); +