diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index 5c957e4a379a457c00d5082cf9b4a232cabd8cb1..00b46b1ba918b79d9f1c9d21be11c3f8b8916820 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -74,30 +74,26 @@ {{- layout.external_html.before_content | safe -}} {#- -#} ☰ {#- -#} - {#- -#} - {#- -#} - {#- -#} - {#- -#} + {#- -#} + {#- -#} + {%- if layout.logo -%} + {#- -#} + {%- else -%} + {#- -#} + {%- endif -%} + {#- -#} {{- sidebar | safe -}} {#- -#} {#- -#} {#- -#} {#- -#} - {#- -#} - {#- -#} + {#- -#} + {%- if layout.logo -%} + + {%- else -%} + + {%- endif -%} {#- -#} {#- -#} {#- -#} diff --git a/src/test/rustdoc/logo-class-default.rs b/src/test/rustdoc/logo-class-default.rs new file mode 100644 index 0000000000000000000000000000000000000000..a7016d227b158027ca872a8760d9c17dd3102676 --- /dev/null +++ b/src/test/rustdoc/logo-class-default.rs @@ -0,0 +1,4 @@ +// Note: this test is paired with logo-class.rs. +// @has logo_class_default/struct.SomeStruct.html '//*[@class="logo-container"]/img[@class="rust-logo"]' '' +// @has logo_class_default/struct.SomeStruct.html '//*[@class="sub-logo-container"]/img[@class="rust-logo"]' '' +pub struct SomeStruct; diff --git a/src/test/rustdoc/logo-class.rs b/src/test/rustdoc/logo-class.rs new file mode 100644 index 0000000000000000000000000000000000000000..f071f356a6d38a60f3d57ae6058832f4415f4117 --- /dev/null +++ b/src/test/rustdoc/logo-class.rs @@ -0,0 +1,10 @@ +#![doc(html_logo_url = + "https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png")] +// Note: this test is paired with logo-class-default.rs. + +// @has logo_class/struct.SomeStruct.html '//*[@class="logo-container"]/img[@src="https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png"]' '' +// @!has logo_class/struct.SomeStruct.html '//*[@class="logo-container"]/img[@class="rust-logo"]' '' +// +// @has logo_class/struct.SomeStruct.html '//*[@class="sub-logo-container"]/img[@src="https://raw.githubusercontent.com/sagebind/isahc/master/media/isahc.svg.png"]' '' +// @!has logo_class/struct.SomeStruct.html '//*[@class="sub-logo-container"]/img[@class="rust-logo"]' '' +pub struct SomeStruct;