File tree 6 files changed +39
-13
lines changed
6 files changed +39
-13
lines changed Original file line number Diff line number Diff line change @@ -268,10 +268,18 @@ pub(super) fn write_shared(
268
268
// Maybe we can change the representation to move this out of main.js?
269
269
write_minify (
270
270
"main.js" ,
271
- static_files:: MAIN_JS . replace (
272
- "/* INSERT THEMES HERE */" ,
273
- & format ! ( " = {}" , serde_json:: to_string( & themes) . unwrap( ) ) ,
274
- ) ,
271
+ static_files:: MAIN_JS
272
+ . replace (
273
+ "/* INSERT THEMES HERE */" ,
274
+ & format ! ( " = {}" , serde_json:: to_string( & themes) . unwrap( ) ) ,
275
+ )
276
+ . replace (
277
+ "/* INSERT RUSTDOC_VERSION HERE */" ,
278
+ & format ! (
279
+ "rustdoc {}" ,
280
+ rustc_interface:: util:: version_str( ) . unwrap_or( "unknown version" )
281
+ ) ,
282
+ ) ,
275
283
cx,
276
284
options,
277
285
) ?;
Original file line number Diff line number Diff line change @@ -928,15 +928,24 @@ body.blur > :not(#help) {
928
928
display : block;
929
929
margin-right : 0.5rem ;
930
930
}
931
- # help > div > span {
931
+ # help span . top , # help span . bottom {
932
932
text-align : center;
933
933
display : block;
934
- margin : 10px 0 ;
935
934
font-size : 18px ;
936
- border-bottom : 1px solid # ccc ;
935
+
936
+ }
937
+ # help span .top {
938
+ text-align : center;
939
+ display : block;
940
+ margin : 10px 0 ;
941
+ border-bottom : 1px solid;
937
942
padding-bottom : 4px ;
938
943
margin-bottom : 6px ;
939
944
}
945
+ # help span .bottom {
946
+ clear : both;
947
+ border-top : 1px solid;
948
+ }
940
949
# help dd { margin : 5px 35px ; }
941
950
# help .infos { padding-left : 0 ; }
942
951
# help h1 , # help h2 { margin-top : 0 ; }
Original file line number Diff line number Diff line change @@ -286,8 +286,8 @@ details.undocumented > summary::before {
286
286
border-radius : 4px ;
287
287
}
288
288
289
- # help > div > span {
290
- border-bottom- color : # 5c6773 ;
289
+ # help span . bottom , # help span . top {
290
+ border-color : # 5c6773 ;
291
291
}
292
292
293
293
.since {
Original file line number Diff line number Diff line change @@ -242,8 +242,8 @@ details.undocumented > summary::before {
242
242
border-color : # bfbfbf ;
243
243
}
244
244
245
- # help > div > span {
246
- border-bottom- color : # bfbfbf ;
245
+ # help span . bottom , # help span . top {
246
+ border-color : # bfbfbf ;
247
247
}
248
248
249
249
# help dt {
Original file line number Diff line number Diff line change @@ -232,8 +232,8 @@ details.undocumented > summary::before {
232
232
border-color : # bfbfbf ;
233
233
}
234
234
235
- # help > div > span {
236
- border-bottom- color : # bfbfbf ;
235
+ # help span . bottom , # help span . top {
236
+ border-color : # bfbfbf ;
237
237
}
238
238
239
239
.since {
Original file line number Diff line number Diff line change @@ -911,6 +911,7 @@ function hideThemeButtonState() {
911
911
} ) ;
912
912
913
913
var book_info = document . createElement ( "span" ) ;
914
+ book_info . className = "top" ;
914
915
book_info . innerHTML = "You can find more information in \
915
916
<a href=\"https://doc.rust-lang.org/rustdoc/\">the rustdoc book</a>." ;
916
917
@@ -961,6 +962,14 @@ function hideThemeButtonState() {
961
962
container . appendChild ( div_shortcuts ) ;
962
963
container . appendChild ( div_infos ) ;
963
964
965
+ var rustdoc_version = document . createElement ( "span" ) ;
966
+ rustdoc_version . className = "bottom" ;
967
+ var rustdoc_version_code = document . createElement ( "code" ) ;
968
+ rustdoc_version_code . innerText = "/* INSERT RUSTDOC_VERSION HERE */" ;
969
+ rustdoc_version . appendChild ( rustdoc_version_code ) ;
970
+
971
+ container . appendChild ( rustdoc_version ) ;
972
+
964
973
popup . appendChild ( container ) ;
965
974
insertAfter ( popup , searchState . outputElement ( ) ) ;
966
975
// So that it's only built once and then it'll do nothing when called!
You can’t perform that action at this time.
0 commit comments