Show everything when noscript is on

This commit is contained in:
Guillaume Gomez 2018-12-02 18:00:50 +01:00
parent a68988719c
commit e17518f65e
4 changed files with 26 additions and 0 deletions

View file

@ -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\" \
id=\"themeStyle\">\
<script src=\"{root_path}storage{suffix}.js\"></script>\
<noscript><link rel=\"stylesheet\" href=\"{root_path}noscript{suffix}.css\"></noscript>\
{css_extension}\
{favicon}\
{in_header}\

View file

@ -772,6 +772,9 @@ fn write_shared(
write_minify(cx.dst.join(&format!("settings{}.css", cx.shared.resource_suffix)),
static_files::SETTINGS_CSS,
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
// then we'll run over the "official" styles.

View 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;
}

View file

@ -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.
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
/// implementations.
pub static NORMALIZE_CSS: &'static str = include_str!("static/normalize.css");