Rollup merge of #78103 - GuillaumeGomez:rustdoc-book, r=jyn514
Add link to rustdoc book in rustdoc help popup Part of #75520. It looks like this: ![Screenshot from 2020-10-19 13-46-02](https://user-images.githubusercontent.com/3050060/96446334-934d6900-1211-11eb-8fdc-133fecc8c30d.png) ![Screenshot from 2020-10-19 13-43-46](https://user-images.githubusercontent.com/3050060/96446335-947e9600-1211-11eb-955c-68af5292aecc.png) ![Screenshot from 2020-10-19 13-37-26](https://user-images.githubusercontent.com/3050060/96446337-947e9600-1211-11eb-9a2e-399b99178a65.png) r? @jyn514
This commit is contained in:
commit
cbcf8d4235
@ -2792,6 +2792,10 @@ function defocusSearchBar() {
|
||||
addClass(popup, "hidden");
|
||||
popup.id = "help";
|
||||
|
||||
var book_info = document.createElement("span");
|
||||
book_info.innerHTML = "You can find more information in \
|
||||
<a href=\"https://doc.rust-lang.org/rustdoc/\">the rustdoc book</a>.";
|
||||
|
||||
var container = document.createElement("div");
|
||||
var shortcuts = [
|
||||
["?", "Show this help dialog"],
|
||||
@ -2825,6 +2829,7 @@ function defocusSearchBar() {
|
||||
addClass(div_infos, "infos");
|
||||
div_infos.innerHTML = "<h2>Search Tricks</h2>" + infos;
|
||||
|
||||
container.appendChild(book_info);
|
||||
container.appendChild(div_shortcuts);
|
||||
container.appendChild(div_infos);
|
||||
|
||||
|
@ -796,14 +796,22 @@ body.blur > :not(#help) {
|
||||
clear: left;
|
||||
display: block;
|
||||
}
|
||||
#help > div > span {
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin: 10px 0;
|
||||
font-size: 18px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
#help dd { margin: 5px 35px; }
|
||||
#help .infos { padding-left: 0; }
|
||||
#help h1, #help h2 { margin-top: 0; }
|
||||
#help > div div {
|
||||
width: 50%;
|
||||
float: left;
|
||||
padding: 20px;
|
||||
padding-left: 17px;
|
||||
padding: 0 20px 20px 17px;;
|
||||
}
|
||||
|
||||
.stab {
|
||||
|
@ -219,7 +219,8 @@ a {
|
||||
}
|
||||
|
||||
.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),
|
||||
.docblock-short a:not(.srclink):not(.test-arrow), .stability a {
|
||||
.docblock-short a:not(.srclink):not(.test-arrow), .stability a,
|
||||
#help a {
|
||||
color: #39AFD7;
|
||||
}
|
||||
|
||||
@ -275,6 +276,10 @@ a {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#help > div > span {
|
||||
border-bottom-color: #5c6773;
|
||||
}
|
||||
|
||||
.since {
|
||||
color: grey;
|
||||
}
|
||||
|
@ -177,7 +177,8 @@ a {
|
||||
}
|
||||
|
||||
.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),
|
||||
.docblock-short a:not(.srclink):not(.test-arrow), .stability a {
|
||||
.docblock-short a:not(.srclink):not(.test-arrow), .stability a,
|
||||
#help a {
|
||||
color: #D2991D;
|
||||
}
|
||||
|
||||
@ -231,6 +232,10 @@ a.test-arrow {
|
||||
border-color: #bfbfbf;
|
||||
}
|
||||
|
||||
#help > div > span {
|
||||
border-bottom-color: #bfbfbf;
|
||||
}
|
||||
|
||||
#help dt {
|
||||
border-color: #bfbfbf;
|
||||
background: rgba(0,0,0,0);
|
||||
|
@ -175,7 +175,8 @@ a {
|
||||
}
|
||||
|
||||
.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),
|
||||
.docblock-short a:not(.srclink):not(.test-arrow), .stability a {
|
||||
.docblock-short a:not(.srclink):not(.test-arrow), .stability a,
|
||||
#help a {
|
||||
color: #3873AD;
|
||||
}
|
||||
|
||||
@ -229,6 +230,10 @@ a.test-arrow {
|
||||
border-color: #bfbfbf;
|
||||
}
|
||||
|
||||
#help > div > span {
|
||||
border-bottom-color: #bfbfbf;
|
||||
}
|
||||
|
||||
.since {
|
||||
color: grey;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user