diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/not_found.md | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/markdown.rs | 5 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/static/js/main.js | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/sidebar.html | 4 |
5 files changed, 10 insertions, 9 deletions
diff --git a/src/doc/not_found.md b/src/doc/not_found.md index f0794fc0be3..9552759d2b8 100644 --- a/src/doc/not_found.md +++ b/src/doc/not_found.md @@ -2,7 +2,7 @@ <!-- Completely hide the TOC and the section numbers --> <style type="text/css"> -#TOC { display: none; } +#rustdoc-toc { display: none; } .header-section-number { display: none; } li {list-style-type: none; } #search-input { diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 4b82f232765..5da492f7c6f 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -1452,7 +1452,7 @@ impl MarkdownWithToc<'_> { } pub(crate) fn into_string(self) -> String { let (toc, s) = self.into_parts(); - format!("<nav id=\"TOC\">{toc}</nav>{s}", toc = toc.print()) + format!("<nav id=\"rustdoc\">{toc}</nav>{s}", toc = toc.print()) } } @@ -2028,7 +2028,8 @@ fn init_id_map() -> FxHashMap<Cow<'static, str>, usize> { map.insert("default-settings".into(), 1); map.insert("sidebar-vars".into(), 1); map.insert("copy-path".into(), 1); - map.insert("TOC".into(), 1); + map.insert("rustdoc-toc".into(), 1); + map.insert("rustdoc-modnav".into(), 1); // This is the list of IDs used by rustdoc sections (but still generated by // rustdoc). map.insert("fields".into(), 1); diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index c2bb5fa8f2a..32077e0b7f9 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -589,11 +589,11 @@ ul.block, .block li, .block ul { background-clip: border-box; } -.hide-toc #TOC, .hide-toc .in-crate { +.hide-toc #rustdoc-toc, .hide-toc .in-crate { display: none; } -.hide-modnav #ModNav { +.hide-modnav #rustdoc-modnav { display: none; } diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 4135341b22e..5a0796e2353 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -499,7 +499,7 @@ function preLoadCss(cssUrl) { if (!window.SIDEBAR_ITEMS) { return; } - const sidebar = document.getElementById("ModNav"); + const sidebar = document.getElementById("rustdoc-modnav"); /** * Append to the sidebar a "block" of links - a heading along with a list (`<ul>`) of items. @@ -885,7 +885,7 @@ function preLoadCss(cssUrl) { if (!window.ALL_CRATES) { return; } - const sidebarElems = document.getElementById("ModNav"); + const sidebarElems = document.getElementById("rustdoc-modnav"); if (!sidebarElems) { return; } diff --git a/src/librustdoc/html/templates/sidebar.html b/src/librustdoc/html/templates/sidebar.html index 31823848ec3..fccf65cbefc 100644 --- a/src/librustdoc/html/templates/sidebar.html +++ b/src/librustdoc/html/templates/sidebar.html @@ -6,7 +6,7 @@ {% endif %} {% if self.should_render_blocks() %} - <section id="TOC"> + <section id="rustdoc-toc"> {% if !title.is_empty() %} <h2 class="location"> {# #} <a href="#">{{title_prefix}}{{title|wrapped|safe}}</a> {# #} @@ -53,7 +53,7 @@ {% endfor %} </section> {% endif %} - <div id="ModNav"> + <div id="rustdoc-modnav"> {% if !path.is_empty() %} <h2{% if parent_is_crate +%} class="in-crate"{% endif %}> {# #} <a href="{% if is_mod %}../{% endif %}index.html">In {{+ path|wrapped|safe}}</a> {# #} |
