Link sidebar "location" heading to top of page
This makes it easy, when you are scrolled far down in a page, to jump back to the top.
This commit is contained in:
parent
256721ee51
commit
7781636fc7
2 changed files with 8 additions and 1 deletions
|
@ -1737,7 +1737,7 @@ fn print_sidebar(cx: &Context<'_>, it: &clean::Item, buffer: &mut Buffer) {
|
|||
{
|
||||
write!(
|
||||
buffer,
|
||||
"<h2 class=\"location\">{}{}</h2>",
|
||||
"<h2 class=\"location\"><a href=\"#\">{}{}</a></h2>",
|
||||
match *it.kind {
|
||||
clean::StructItem(..) => "Struct ",
|
||||
clean::TraitItem(..) => "Trait ",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue