rustdoc: remove unnecessary DOM class h1.fqn
It's misleading. The main heading sometimes isn't an fully qualified name at all. It's also redundant. It's always a child of `div.main-heading`, so just use that.
This commit is contained in:
parent
5ca6f7d2c3
commit
39b90a5f6e
17 changed files with 33 additions and 33 deletions
|
|
@ -639,7 +639,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
|
|||
write!(
|
||||
buf,
|
||||
"<div class=\"main-heading\">\
|
||||
<h1 class=\"fqn\">Rustdoc settings</h1>\
|
||||
<h1>Rustdoc settings</h1>\
|
||||
<span class=\"out-of-band\">\
|
||||
<a id=\"back\" href=\"javascript:void(0)\" onclick=\"history.back();\">\
|
||||
Back\
|
||||
|
|
@ -677,7 +677,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
|
|||
write!(
|
||||
buf,
|
||||
"<div class=\"main-heading\">\
|
||||
<h1 class=\"fqn\">Rustdoc help</h1>\
|
||||
<h1>Rustdoc help</h1>\
|
||||
<span class=\"out-of-band\">\
|
||||
<a id=\"back\" href=\"javascript:void(0)\" onclick=\"history.back();\">\
|
||||
Back\
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ impl AllTypes {
|
|||
}
|
||||
}
|
||||
|
||||
f.write_str("<h1 class=\"fqn\">List of all items</h1>");
|
||||
f.write_str("<h1>List of all items</h1>");
|
||||
// Note: print_entries does not escape the title, because we know the current set of titles
|
||||
// doesn't require escaping.
|
||||
print_entries(f, &self.structs, ItemSection::Structs);
|
||||
|
|
@ -394,7 +394,7 @@ fn scrape_examples_help(shared: &SharedContext<'_>) -> String {
|
|||
let mut ids = IdMap::default();
|
||||
format!(
|
||||
"<div class=\"main-heading\">\
|
||||
<h1 class=\"fqn\">About scraped examples</h1>\
|
||||
<h1>About scraped examples</h1>\
|
||||
</div>\
|
||||
<div>{}</div>",
|
||||
Markdown {
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};
|
|||
};
|
||||
|
||||
let content = format!(
|
||||
"<h1 class=\"fqn\">List of all crates</h1><ul class=\"all-items\">{}</ul>",
|
||||
"<h1>List of all crates</h1><ul class=\"all-items\">{}</ul>",
|
||||
krates
|
||||
.iter()
|
||||
.map(|s| {
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ h1, h2, h3, h4 {
|
|||
.docblock > h6:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
h1.fqn {
|
||||
.main-heading h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
flex-grow: 1;
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ function loadCss(cssUrl) {
|
|||
}
|
||||
|
||||
let currentNbImpls = implementors.getElementsByClassName("impl").length;
|
||||
const traitName = document.querySelector("h1.fqn > .trait").textContent;
|
||||
const traitName = document.querySelector(".main-heading h1 > .trait").textContent;
|
||||
const baseIdName = "impl-" + traitName + "-";
|
||||
const libs = Object.getOwnPropertyNames(imp);
|
||||
// We don't want to include impls from this JS file, when the HTML already has them.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<div class="main-heading"> {#- -#}
|
||||
<h1 class="fqn"> {#- -#}
|
||||
<h1> {#- -#}
|
||||
{{-typ-}}
|
||||
{#- The breadcrumbs of the item path, like std::string -#}
|
||||
{%- for component in path_components -%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue