Show everything when noscript is on
This commit is contained in:
parent
a68988719c
commit
e17518f65e
4 changed files with 26 additions and 0 deletions
|
@ -54,6 +54,7 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
|
||||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}light{suffix}.css\" \
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}light{suffix}.css\" \
|
||||||
id=\"themeStyle\">\
|
id=\"themeStyle\">\
|
||||||
<script src=\"{root_path}storage{suffix}.js\"></script>\
|
<script src=\"{root_path}storage{suffix}.js\"></script>\
|
||||||
|
<noscript><link rel=\"stylesheet\" href=\"{root_path}noscript{suffix}.css\"></noscript>\
|
||||||
{css_extension}\
|
{css_extension}\
|
||||||
{favicon}\
|
{favicon}\
|
||||||
{in_header}\
|
{in_header}\
|
||||||
|
|
|
@ -772,6 +772,9 @@ fn write_shared(
|
||||||
write_minify(cx.dst.join(&format!("settings{}.css", cx.shared.resource_suffix)),
|
write_minify(cx.dst.join(&format!("settings{}.css", cx.shared.resource_suffix)),
|
||||||
static_files::SETTINGS_CSS,
|
static_files::SETTINGS_CSS,
|
||||||
options.enable_minification)?;
|
options.enable_minification)?;
|
||||||
|
write_minify(cx.dst.join(&format!("noscript{}.css", cx.shared.resource_suffix)),
|
||||||
|
static_files::NOSCRIPT_CSS,
|
||||||
|
options.enable_minification)?;
|
||||||
|
|
||||||
// To avoid "light.css" to be overwritten, we'll first run over the received themes and only
|
// To avoid "light.css" to be overwritten, we'll first run over the received themes and only
|
||||||
// then we'll run over the "official" styles.
|
// then we'll run over the "official" styles.
|
||||||
|
|
19
src/librustdoc/html/static/noscript.css
Normal file
19
src/librustdoc/html/static/noscript.css
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/**
|
||||||
|
* Copyright 2018 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
* file at the top-level directory of this distribution and at
|
||||||
|
* http://rust-lang.org/COPYRIGHT.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
* <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
* option. This file may not be copied, modified, or distributed
|
||||||
|
* except according to those terms.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#main > h2 + div, #main > h2 + h3, #main > h3 + div {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-content {
|
||||||
|
display: none;
|
||||||
|
}
|
|
@ -23,6 +23,9 @@ pub static RUSTDOC_CSS: &'static str = include_str!("static/rustdoc.css");
|
||||||
/// The file contents of `settings.css`, responsible for the items on the settings page.
|
/// The file contents of `settings.css`, responsible for the items on the settings page.
|
||||||
pub static SETTINGS_CSS: &'static str = include_str!("static/settings.css");
|
pub static SETTINGS_CSS: &'static str = include_str!("static/settings.css");
|
||||||
|
|
||||||
|
/// The file contents of the `noscript.css` file, used in case JS isn't supported or is disabled.
|
||||||
|
pub static NOSCRIPT_CSS: &'static str = include_str!("static/noscript.css");
|
||||||
|
|
||||||
/// The file contents of `normalize.css`, included to even out standard elements between browser
|
/// The file contents of `normalize.css`, included to even out standard elements between browser
|
||||||
/// implementations.
|
/// implementations.
|
||||||
pub static NORMALIZE_CSS: &'static str = include_str!("static/normalize.css");
|
pub static NORMALIZE_CSS: &'static str = include_str!("static/normalize.css");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue