Rollup merge of #55563 - GuillaumeGomez:doc-search-sentence, r=QuietMisdreavus
Improve no result found sentence in doc search Fixes #55531. Look: <img width="1440" alt="screenshot 2018-11-01 at 02 21 56" src="https://user-images.githubusercontent.com/3050060/47827257-f6236c80-dd7c-11e8-9ea9-99c8cb4b2de5.png"> r? @QuietMisdreavus
This commit is contained in:
commit
66ba6b3a66
4 changed files with 19 additions and 3 deletions
|
@ -1300,7 +1300,16 @@ if (!String.prototype.endsWith) {
|
|||
output = '<div class="search-failed"' + extraStyle + '>No results :(<br/>' +
|
||||
'Try on <a href="https://duckduckgo.com/?q=' +
|
||||
encodeURIComponent('rust ' + query.query) +
|
||||
'">DuckDuckGo</a>?</div>';
|
||||
'">DuckDuckGo</a>?<br/><br/>' +
|
||||
'Or try looking in one of these:<ul><li>The <a ' +
|
||||
'href="https://doc.rust-lang.org/reference/index.html">Rust Reference</a> for' +
|
||||
' technical details about the language.</li><li><a ' +
|
||||
'href="https://doc.rust-lang.org/rust-by-example/index.html">Rust By Example' +
|
||||
'</a> for expository code examples.</a></li><li>The <a ' +
|
||||
'href="https://doc.rust-lang.org/book/index.html">Rust Book</a> for ' +
|
||||
'introductions to language features and the language itself.</li><li><a ' +
|
||||
'href="https://docs.rs">Docs.rs</a> for documentation of crates released on ' +
|
||||
'<a href="https://crates.io/">crates.io</a>.</li></ul></div>';
|
||||
}
|
||||
return [output, length];
|
||||
}
|
||||
|
|
|
@ -1132,6 +1132,13 @@ pre.rust {
|
|||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.search-failed > ul {
|
||||
text-align: left;
|
||||
max-width: 570px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#titles {
|
||||
height: 35px;
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
|
|||
color: rgba(255,142,0,1);
|
||||
}
|
||||
|
||||
.search-failed > a {
|
||||
.search-failed a {
|
||||
color: #0089ff;
|
||||
}
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
|
|||
color: rgba(255,142,0,1);
|
||||
}
|
||||
|
||||
.search-failed > a {
|
||||
.search-failed a {
|
||||
color: #0089ff;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue