Skip to content

Commit 8f8661c

Browse files
committed
---
yaml --- r: 235588 b: refs/heads/stable c: 6b64826 h: refs/heads/master v: v3
1 parent 5245636 commit 8f8661c

File tree

6 files changed

+63
-81
lines changed

6 files changed

+63
-81
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 32a12c8dd080034d0242958716de37beb2a67ab5
32+
refs/heads/stable: 6b64826469e7c8f31979389d97d565ec981a5c65
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustdoc/html/layout.rs

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -84,37 +84,44 @@ r##"<!DOCTYPE html>
8484
<section class="footer"></section>
8585
8686
<div id="help" class="hidden">
87-
<div class="shortcuts">
88-
<h1>Keyboard Shortcuts</h1>
89-
<dl>
90-
<dt>?</dt>
91-
<dd>Show this help dialog</dd>
92-
<dt>S</dt>
93-
<dd>Focus the search field</dd>
94-
<dt>&larrb;</dt>
95-
<dd>Move up in search results</dd>
96-
<dt>&rarrb;</dt>
97-
<dd>Move down in search results</dd>
98-
<dt>&#9166;</dt>
99-
<dd>Go to active search result</dd>
100-
</dl>
101-
</div>
102-
<div class="infos">
103-
<h1>Search Tricks</h1>
104-
<p>
105-
Prefix searches with a type followed by a colon (e.g.
106-
<code>fn:</code>) to restrict the search to a given type.
107-
</p>
108-
<p>
109-
Accepted types are: <code>fn</code>, <code>mod</code>,
110-
<code>struct</code>, <code>enum</code>,
111-
<code>trait</code>, <code>typedef</code> (or
112-
<code>tdef</code>).
113-
</p>
114-
<p>
115-
Search functions by type signature (e.g.
116-
<code>vec -> usize</code>)
117-
</p>
87+
<div>
88+
<div class="shortcuts">
89+
<h1>Keyboard Shortcuts</h1>
90+
91+
<dl>
92+
<dt>?</dt>
93+
<dd>Show this help dialog</dd>
94+
<dt>S</dt>
95+
<dd>Focus the search field</dd>
96+
<dt>&larrb;</dt>
97+
<dd>Move up in search results</dd>
98+
<dt>&rarrb;</dt>
99+
<dd>Move down in search results</dd>
100+
<dt>&#9166;</dt>
101+
<dd>Go to active search result</dd>
102+
</dl>
103+
</div>
104+
105+
<div class="infos">
106+
<h1>Search Tricks</h1>
107+
108+
<p>
109+
Prefix searches with a type followed by a colon (e.g.
110+
<code>fn:</code>) to restrict the search to a given type.
111+
</p>
112+
113+
<p>
114+
Accepted types are: <code>fn</code>, <code>mod</code>,
115+
<code>struct</code>, <code>enum</code>,
116+
<code>trait</code>, <code>typedef</code> (or
117+
<code>tdef</code>).
118+
</p>
119+
120+
<p>
121+
Search functions by type signature (e.g.
122+
<code>vec -> usize</code>)
123+
</p>
124+
</div>
118125
</div>
119126
</div>
120127

branches/stable/src/librustdoc/html/static/main.css

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ nav.sub {
165165

166166
/* Everything else */
167167

168-
.js-only, .hidden { display: none; }
168+
.js-only, .hidden { display: none !important; }
169169

170170
.sidebar {
171171
padding: 10px;
@@ -448,19 +448,30 @@ a {
448448

449449
tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; }
450450

451+
body.blur > :not(#help) {
452+
filter: blur(8px);
453+
-webkit-filter: blur(8px);
454+
opacity: .7;
455+
}
456+
451457
#help {
458+
width: 100%;
459+
height: 100vh;
460+
position: fixed;
461+
top: 0;
462+
left: 0;
463+
display: flex;
464+
justify-content: center;
465+
align-items: center;
466+
}
467+
#help > div {
468+
flex: 0 0 auto;
452469
background: #e9e9e9;
453470
box-shadow: 0 0 6px rgba(0,0,0,.2);
454-
position: absolute;
455-
top: 300px;
456-
left: 50%;
457-
margin-top: -125px;
458-
margin-left: -275px;
459471
width: 550px;
460472
height: 300px;
461473
border: 1px solid #bfbfbf;
462474
}
463-
464475
#help dt {
465476
float: left;
466477
border-radius: 4px;
@@ -475,7 +486,7 @@ tr.result span.primitive::after { content: ' (primitive type)'; font-style: ital
475486
#help dd { margin: 5px 33px; }
476487
#help .infos { padding-left: 0; }
477488
#help h1 { margin-top: 0; }
478-
#help div {
489+
#help > div div {
479490
width: 50%;
480491
float: left;
481492
padding: 20px;

branches/stable/src/librustdoc/html/static/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
if (!$("#help").hasClass("hidden")) {
106106
ev.preventDefault();
107107
$("#help").addClass("hidden");
108+
$("body").removeClass("blur");
108109
} else if (!$("#search").hasClass("hidden")) {
109110
ev.preventDefault();
110111
$("#search").addClass("hidden");
@@ -115,13 +116,14 @@
115116
case "s":
116117
case "S":
117118
ev.preventDefault();
118-
focusSearchBar()
119+
focusSearchBar();
119120
break;
120121

121122
case "?":
122123
if (ev.shiftKey && $("#help").hasClass("hidden")) {
123124
ev.preventDefault();
124125
$("#help").removeClass("hidden");
126+
$("body").addClass("blur");
125127
}
126128
break;
127129
}
@@ -130,8 +132,9 @@
130132
$(document).on("keypress", handleShortcut);
131133
$(document).on("keydown", handleShortcut);
132134
$(document).on("click", function(ev) {
133-
if (!$(ev.target).closest("#help").length) {
135+
if (!$(e.target).closest("#help > div").length) {
134136
$("#help").addClass("hidden");
137+
$("body").removeClass("blur");
135138
}
136139
});
137140

branches/stable/src/test/compile-fail/issue-20825.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.

branches/stable/src/test/run-pass/issue-20825.rs

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)