diff options
Diffstat (limited to '')
-rw-r--r-- | src/librustdoc/html/templates/page.html | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index 7caffeae3..c32386916 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -73,6 +73,7 @@ </div> {#- -#} <![endif]--> {#- -#} {{- layout.external_html.before_content|safe -}} + {%- if page.css_class != "source" -%} <nav class="mobile-topbar"> {#- -#} <button class="sidebar-menu-toggle">☰</button> {#- -#} <a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#} @@ -84,9 +85,11 @@ {%- endif -%} </div> {#- -#} </a> {#- -#} - <h2 class="location"></h2> {#- -#} + <h2></h2> {#- -#} </nav> {#- -#} + {%- endif -%} <nav class="sidebar"> {#- -#} + {%- if page.css_class != "source" -%} <a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#} <div class="logo-container"> {#- -#} {%- if !layout.logo.is_empty() %} @@ -96,11 +99,13 @@ {%- endif -%} </div> {#- -#} </a> {#- -#} + {%- endif -%} {{- sidebar|safe -}} </nav> {#- -#} <main> {#- -#} <div class="width-limiter"> {#- -#} - <div class="sub-container"> {#- -#} + <nav class="sub"> {#- -#} + {%- if page.css_class == "source" -%} <a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#} {%- if !layout.logo.is_empty() %} <img src="{{layout.logo}}" alt="logo"> {#- -#} @@ -108,30 +113,27 @@ <img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#} {%- endif -%} </a> {#- -#} - <nav class="sub"> {#- -#} - <form class="search-form"> {#- -#} - <div class="search-container"> {#- -#} - <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#} - <input {# -#} - class="search-input" {# -#} - name="search" {# -#} - autocomplete="off" {# -#} - spellcheck="false" {# -#} - placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#} - type="search"> {#- -#} - <div id="help-button" title="help" tabindex="-1"> {#- -#} - <button type="button">?</button> {#- -#} - </div> {#- -#} - <div id="settings-menu" tabindex="-1"> {#- -#} - <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#} - <img width="22" height="22" alt="Change settings" {# -#} - src="{{static_root_path|safe}}wheel{{page.resource_suffix}}.svg"> {#- -#} - </a> {#- -#} - </div> {#- -#} - </div> {#- -#} - </form> {#- -#} - </nav> {#- -#} - </div> {#- -#} + {%- endif -%} + <form class="search-form"> {#- -#} + <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#} + <input {# -#} + class="search-input" {# -#} + name="search" {# -#} + autocomplete="off" {# -#} + spellcheck="false" {# -#} + placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#} + type="search"> {#- -#} + <div id="help-button" title="help" tabindex="-1"> {#- -#} + <a href="{{page.root_path|safe}}help.html">?</a> {#- -#} + </div> {#- -#} + <div id="settings-menu" tabindex="-1"> {#- -#} + <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#} + <img width="22" height="22" alt="Change settings" {# -#} + src="{{static_root_path|safe}}wheel{{page.resource_suffix}}.svg"> {#- -#} + </a> {#- -#} + </div> {#- -#} + </form> {#- -#} + </nav> {#- -#} <section id="main-content" class="content">{{- content|safe -}}</section> {#- -#} </div> {#- -#} </main> {#- -#} |