Remove link generation on image, favicon and logo in settings
This commit is contained in:
parent
f2ad3c3f6c
commit
1f7892f16a
@ -1643,23 +1643,25 @@ impl Context {
|
||||
&self.shared.themes),
|
||||
&final_file);
|
||||
|
||||
// If the file already exists, no need to generate it again...
|
||||
if !settings_file.is_file() {
|
||||
let settings = Settings::new("./", &self.shared.resource_suffix);
|
||||
page.title = "Rustdoc settings";
|
||||
page.description = "Settings of Rustdoc";
|
||||
page.root_path = "./";
|
||||
// Generating settings page.
|
||||
let settings = Settings::new("./", &self.shared.resource_suffix);
|
||||
page.title = "Rustdoc settings";
|
||||
page.description = "Settings of Rustdoc";
|
||||
page.root_path = "./";
|
||||
|
||||
let mut w = BufWriter::new(try_err!(File::create(&settings_file), &settings_file));
|
||||
let mut themes = self.shared.themes.clone();
|
||||
let sidebar = "<p class='location'>Settings</p><div class='sidebar-elems'>".to_owned();
|
||||
themes.push(PathBuf::from("settings.css"));
|
||||
try_err!(layout::render(&mut w, &self.shared.layout,
|
||||
&page, &sidebar, &settings,
|
||||
self.shared.css_file_extension.is_some(),
|
||||
&themes),
|
||||
&settings_file);
|
||||
}
|
||||
let mut w = BufWriter::new(try_err!(File::create(&settings_file), &settings_file));
|
||||
let mut themes = self.shared.themes.clone();
|
||||
let sidebar = "<p class='location'>Settings</p><div class='sidebar-elems'></div>";
|
||||
themes.push(PathBuf::from("settings.css"));
|
||||
let mut layout = self.shared.layout.clone();
|
||||
layout.krate = String::new();
|
||||
layout.logo = String::new();
|
||||
layout.favicon = String::new();
|
||||
try_err!(layout::render(&mut w, &layout,
|
||||
&page, &sidebar, &settings,
|
||||
self.shared.css_file_extension.is_some(),
|
||||
&themes),
|
||||
&settings_file);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -19,13 +19,6 @@
|
||||
return getCurrentValue('rustdoc-' + settingName);
|
||||
}
|
||||
|
||||
function replaceLogoHref() {
|
||||
var elem = document.getElementsByClassName("sidebar-menu");
|
||||
if (elem && elem.length > 0) {
|
||||
elem[0].nextElementSibling.setAttribute('href', 'javascript:void');
|
||||
}
|
||||
}
|
||||
|
||||
function setEvents() {
|
||||
var elems = document.getElementsByClassName("slider");
|
||||
if (!elems || elems.length === 0) {
|
||||
@ -44,7 +37,5 @@
|
||||
}
|
||||
}
|
||||
|
||||
// To remove possibility to come back to "something" by clicking on the logo.
|
||||
replaceLogoHref();
|
||||
setEvents();
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user