Rollup merge of #75366 - GuillaumeGomez:help-button, r=jyn514
Add help button Part of #75197. Here is a screenshot of the result:  r? @jyn514
This commit is contained in:
commit
51ed33d8c2
6 changed files with 27 additions and 11 deletions
|
@ -95,6 +95,7 @@ pub fn render<T: Print, S: Print>(
|
||||||
placeholder=\"Click or press ‘S’ to search, ‘?’ for more options…\" \
|
placeholder=\"Click or press ‘S’ to search, ‘?’ for more options…\" \
|
||||||
type=\"search\">\
|
type=\"search\">\
|
||||||
</div>\
|
</div>\
|
||||||
|
<span class=\"help-button\">?</span>
|
||||||
<a id=\"settings-menu\" href=\"{root_path}settings.html\">\
|
<a id=\"settings-menu\" href=\"{root_path}settings.html\">\
|
||||||
<img src=\"{static_root_path}wheel{suffix}.svg\" \
|
<img src=\"{static_root_path}wheel{suffix}.svg\" \
|
||||||
width=\"18\" \
|
width=\"18\" \
|
||||||
|
|
|
@ -473,7 +473,9 @@ function defocusSearchBar() {
|
||||||
}());
|
}());
|
||||||
|
|
||||||
document.addEventListener("click", function(ev) {
|
document.addEventListener("click", function(ev) {
|
||||||
if (hasClass(ev.target, "collapse-toggle")) {
|
if (hasClass(ev.target, "help-button")) {
|
||||||
|
displayHelp(true, ev);
|
||||||
|
} else if (hasClass(ev.target, "collapse-toggle")) {
|
||||||
collapseDocs(ev.target, "toggle");
|
collapseDocs(ev.target, "toggle");
|
||||||
} else if (hasClass(ev.target.parentNode, "collapse-toggle")) {
|
} else if (hasClass(ev.target.parentNode, "collapse-toggle")) {
|
||||||
collapseDocs(ev.target.parentNode, "toggle");
|
collapseDocs(ev.target.parentNode, "toggle");
|
||||||
|
|
|
@ -674,7 +674,7 @@ a {
|
||||||
}
|
}
|
||||||
.search-container > div {
|
.search-container > div {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
width: calc(100% - 34px);
|
width: calc(100% - 63px);
|
||||||
}
|
}
|
||||||
#crate-search {
|
#crate-search {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
@ -1250,14 +1250,24 @@ h4 > .notable-traits {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#settings-menu {
|
#settings-menu, .help-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
|
||||||
top: 10px;
|
top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#settings-menu {
|
||||||
|
right: 0;
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theme-picker, #settings-menu {
|
.help-button {
|
||||||
|
right: 30px;
|
||||||
|
font-family: "Fira Sans",sans-serif;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#theme-picker, #settings-menu, .help-button {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
width: 27px;
|
width: 27px;
|
||||||
height: 29px;
|
height: 29px;
|
||||||
|
|
|
@ -492,7 +492,7 @@ kbd {
|
||||||
box-shadow-color: #c6cbd1;
|
box-shadow-color: #c6cbd1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theme-picker, #settings-menu {
|
#theme-picker, #settings-menu, .help-button {
|
||||||
border-color: #5c6773;
|
border-color: #5c6773;
|
||||||
background-color: #0f1419;
|
background-color: #0f1419;
|
||||||
}
|
}
|
||||||
|
@ -502,7 +502,8 @@ kbd {
|
||||||
}
|
}
|
||||||
|
|
||||||
#theme-picker:hover, #theme-picker:focus,
|
#theme-picker:hover, #theme-picker:focus,
|
||||||
#settings-menu:hover, #settings-menu:focus {
|
#settings-menu:hover, #settings-menu:focus,
|
||||||
|
.help-button:hover, .help-button:focus {
|
||||||
border-color: #e0e0e0;
|
border-color: #e0e0e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -386,13 +386,14 @@ kbd {
|
||||||
box-shadow-color: #c6cbd1;
|
box-shadow-color: #c6cbd1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theme-picker, #settings-menu {
|
#theme-picker, #settings-menu, .help-button {
|
||||||
border-color: #e0e0e0;
|
border-color: #e0e0e0;
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theme-picker:hover, #theme-picker:focus,
|
#theme-picker:hover, #theme-picker:focus,
|
||||||
#settings-menu:hover, #settings-menu:focus {
|
#settings-menu:hover, #settings-menu:focus,
|
||||||
|
.help-button:hover, .help-button:focus {
|
||||||
border-color: #ffb900;
|
border-color: #ffb900;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -377,13 +377,14 @@ kbd {
|
||||||
box-shadow-color: #c6cbd1;
|
box-shadow-color: #c6cbd1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theme-picker, #settings-menu {
|
#theme-picker, #settings-menu, .help-button {
|
||||||
border-color: #e0e0e0;
|
border-color: #e0e0e0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#theme-picker:hover, #theme-picker:focus,
|
#theme-picker:hover, #theme-picker:focus,
|
||||||
#settings-menu:hover, #settings-menu:focus {
|
#settings-menu:hover, #settings-menu:focus,
|
||||||
|
.help-button:hover, .help-button:focus {
|
||||||
border-color: #717171;
|
border-color: #717171;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue