Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/librustdoc/html/static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,16 @@
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];
}
Expand Down
13 changes: 10 additions & 3 deletions src/librustdoc/html/static/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,9 @@ a {
padding-right: 10px;
}
.content .search-results td:first-child a:after {
clear: both;
content: "";
display: block;
clear: both;
content: "";
display: block;
}
.content .search-results td:first-child a span {
float: left;
Expand Down Expand Up @@ -1116,6 +1116,13 @@ pre.rust {
margin-top: 20px;
}

.search-failed > ul {
text-align: left;
max-width: 570px;
margin-left: auto;
margin-right: auto;
}

#titles {
height: 35px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down