Add default rust logo for documentation
This commit is contained in:
parent
ceb2512144
commit
2200fd3c7c
@ -177,7 +177,10 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
|
||||
root_path = page.root_path,
|
||||
css_class = page.css_class,
|
||||
logo = if layout.logo.is_empty() {
|
||||
String::new()
|
||||
format!("<a href='{}{}/index.html'>\
|
||||
<img src='{static_root_path}rust-logo{suffix}.png' alt='logo' width='100'></a>",
|
||||
static_root_path=static_root_path,
|
||||
suffix=page.resource_suffix)
|
||||
} else {
|
||||
format!("<a href='{}{}/index.html'>\
|
||||
<img src='{}' alt='logo' width='100'></a>",
|
||||
|
@ -789,6 +789,10 @@ fn write_shared(
|
||||
themes.insert(theme.to_owned());
|
||||
}
|
||||
|
||||
if (*cx.shared).layout.logo.is_empty() {
|
||||
write(cx.dst.join(&format!("rust-logo{}.png", cx.shared.resource_suffix)),
|
||||
static_files::RUST_LOGO)?;
|
||||
}
|
||||
write(cx.dst.join(&format!("brush{}.svg", cx.shared.resource_suffix)),
|
||||
static_files::BRUSH_SVG)?;
|
||||
write(cx.dst.join(&format!("wheel{}.svg", cx.shared.resource_suffix)),
|
||||
|
BIN
src/librustdoc/html/static/rust-logo.png
Normal file
BIN
src/librustdoc/html/static/rust-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
@ -51,6 +51,9 @@ pub static LICENSE_APACHE: &'static [u8] = include_bytes!("static/LICENSE-APACHE
|
||||
/// The contents of `LICENSE-MIT.txt`, the text of the MIT License.
|
||||
pub static LICENSE_MIT: &'static [u8] = include_bytes!("static/LICENSE-MIT.txt");
|
||||
|
||||
/// The contents of `rust-logo.png`, the default icon of the documentation.
|
||||
pub static RUST_LOGO: &'static [u8] = include_bytes!("static/rust-logo.png");
|
||||
|
||||
/// The built-in themes given to every documentation site.
|
||||
pub mod themes {
|
||||
/// The "light" theme, selected by default when no setting is available. Used as the basis for
|
||||
|
Loading…
Reference in New Issue
Block a user