Add help button
This commit is contained in:
parent
8e738539be
commit
a34bc7961a
@ -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 > .important-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;
|
||||||
|
@ -489,7 +489,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;
|
||||||
}
|
}
|
||||||
@ -499,7 +499,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,13 +383,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…
x
Reference in New Issue
Block a user