Skip to content

Commit f783554

Browse files
Fix footer display following last rustdoc changes
1 parent 3954e56 commit f783554

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ fn compile_sass() -> Result<(), Box<dyn Error>> {
7878
// Compile rustdoc.scss -> rustdoc.css
7979
compile_sass_file("rustdoc", "rustdoc", &[])?;
8080
compile_sass_file("rustdoc-2021-12-05", "rustdoc-2021-12-05", &[])?;
81+
compile_sass_file("rustdoc-2022-01-19", "rustdoc-2022-01-19", &[])?;
8182

8283
// Compile vendored.scss -> vendored.css
8384
compile_sass_file(

src/web/statics.rs

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const STYLE_CSS: &str = include_str!(concat!(env!("OUT_DIR"), "/style.css"));
1616
const RUSTDOC_CSS: &str = include_str!(concat!(env!("OUT_DIR"), "/rustdoc.css"));
1717
const RUSTDOC_2021_12_05_CSS: &str =
1818
include_str!(concat!(env!("OUT_DIR"), "/rustdoc-2021-12-05.css"));
19+
const RUSTDOC_2022_01_19_CSS: &str =
20+
include_str!(concat!(env!("OUT_DIR"), "/rustdoc-2022-01-19.css"));
1921
const STATIC_SEARCH_PATHS: &[&str] = &["static", "vendor"];
2022

2123
pub(crate) fn static_handler(req: &mut Request) -> IronResult<Response> {
@@ -31,6 +33,10 @@ pub(crate) fn static_handler(req: &mut Request) -> IronResult<Response> {
3133
RUSTDOC_2021_12_05_CSS,
3234
ContentType("text/css".parse().unwrap()),
3335
),
36+
"rustdoc-2022-01-19.css" => serve_resource(
37+
RUSTDOC_2022_01_19_CSS,
38+
ContentType("text/css".parse().unwrap()),
39+
),
3440
file => serve_file(file)?,
3541
})
3642
}

templates/style/rustdoc-2022-01-19.scss

+2-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
.sidebar-menu {
1818
top: $top-navbar-height;
19+
margin-bottom: $footer-height;
1920
}
2021
}
2122

@@ -28,12 +29,7 @@ div.container-rustdoc {
2829
> .docs-rs-footer {
2930
bottom: 0;
3031
right: 0;
31-
}
32-
}
33-
34-
div.container-rustdoc:not(.source) {
35-
> .docs-rs-footer {
36-
left: 200px;
32+
left: 0;
3733
}
3834
}
3935

0 commit comments

Comments
 (0)