Skip to content

Commit bc6b199

Browse files
committed
Use the updated Rust logo and change it's format to SVG
1 parent 256721e commit bc6b199

File tree

5 files changed

+67
-5
lines changed

5 files changed

+67
-5
lines changed

src/librustdoc/html/render/write_shared.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pub(super) fn write_shared(
240240
}
241241

242242
if (*cx.shared).layout.logo.is_empty() {
243-
write_toolchain("rust-logo.png", static_files::RUST_LOGO)?;
243+
write_toolchain("rust-logo.svg", static_files::RUST_LOGO_SVG)?;
244244
}
245245
if (*cx.shared).layout.favicon.is_empty() {
246246
write_toolchain("favicon.svg", static_files::RUST_FAVICON_SVG)?;
-5.62 KB
Binary file not shown.
Lines changed: 61 additions & 0 deletions
Loading

src/librustdoc/html/static_files.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ crate static LICENSE_APACHE: &[u8] = include_bytes!("static/LICENSE-APACHE.txt")
6767
/// The contents of `LICENSE-MIT.txt`, the text of the MIT License.
6868
crate static LICENSE_MIT: &[u8] = include_bytes!("static/LICENSE-MIT.txt");
6969

70-
/// The contents of `rust-logo.png`, the default icon of the documentation.
71-
crate static RUST_LOGO: &[u8] = include_bytes!("static/images/rust-logo.png");
70+
/// The contents of `rust-logo.svg`, the default icon of the documentation.
71+
crate static RUST_LOGO_SVG: &[u8] = include_bytes!("static/images/rust-logo.svg");
72+
7273
/// The default documentation favicons (SVG and PNG fallbacks)
7374
crate static RUST_FAVICON_SVG: &[u8] = include_bytes!("static/images/favicon.svg");
7475
crate static RUST_FAVICON_PNG_16: &[u8] = include_bytes!("static/images/favicon-16x16.png");

src/librustdoc/templates/page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
{%- if !layout.logo.is_empty() %}
8080
<img src="{{layout.logo}}" alt="logo"> {#- -#}
8181
{%- else -%}
82-
<img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.png" alt="logo"> {#- -#}
82+
<img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#}
8383
{%- endif -%}
8484
</div>
8585
</a> {#- -#}
@@ -92,7 +92,7 @@
9292
{%- if !layout.logo.is_empty() %}
9393
<img src="{{layout.logo}}" alt="logo"> {#- -#}
9494
{%- else -%}
95-
<img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.png" alt="logo"> {#- -#}
95+
<img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#}
9696
{%- endif -%}
9797
</a> {#- -#}
9898
<nav class="sub"> {#- -#}

0 commit comments

Comments
 (0)