1
Fork 0

Improve no result found sentence in doc search

This commit is contained in:
Guillaume Gomez 2018-11-01 02:20:49 +01:00
parent d586d5d2f5
commit c209ed8435
4 changed files with 22 additions and 6 deletions

View file

@ -1340,7 +1340,16 @@
output = '<div class="search-failed"' + extraStyle + '>No results :(<br/>' + output = '<div class="search-failed"' + extraStyle + '>No results :(<br/>' +
'Try on <a href="https://duckduckgo.com/?q=' + 'Try on <a href="https://duckduckgo.com/?q=' +
encodeURIComponent('rust ' + query.query) + 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]; return [output, length];
} }

View file

@ -658,9 +658,9 @@ a {
padding-right: 10px; padding-right: 10px;
} }
.content .search-results td:first-child a:after { .content .search-results td:first-child a:after {
clear: both; clear: both;
content: ""; content: "";
display: block; display: block;
} }
.content .search-results td:first-child a span { .content .search-results td:first-child a span {
float: left; float: left;
@ -1116,6 +1116,13 @@ pre.rust {
margin-top: 20px; margin-top: 20px;
} }
.search-failed > ul {
text-align: left;
max-width: 570px;
margin-left: auto;
margin-right: auto;
}
#titles { #titles {
height: 35px; height: 35px;
} }

View file

@ -285,7 +285,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
color: rgba(255,142,0,1); color: rgba(255,142,0,1);
} }
.search-failed > a { .search-failed a {
color: #0089ff; color: #0089ff;
} }

View file

@ -279,7 +279,7 @@ pre.ignore:hover, .information:hover + pre.ignore {
color: rgba(255,142,0,1); color: rgba(255,142,0,1);
} }
.search-failed > a { .search-failed a {
color: #0089ff; color: #0089ff;
} }