Skip to content

Commit ba4c07c

Browse files
GH Actions RunnerGH Actions Runner
GH Actions Runner
authored and
GH Actions Runner
committed
publish: Merge pull request #34 from rust-lang/ci-fix
generated from commit bd69f0f
1 parent 1ca040f commit ba4c07c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+829
-1886
lines changed

404.html

Lines changed: 6 additions & 43 deletions
Large diffs are not rendered by default.

about-this-guide.html

Lines changed: 9 additions & 44 deletions
Large diffs are not rendered by default.

book.js

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,12 @@ function playground_text(playground) {
108108

109109
let text = playground_text(code_block);
110110
let classes = code_block.querySelector('code').classList;
111-
let has_2018 = classes.contains("edition2018");
112-
let edition = has_2018 ? "2018" : "2015";
113-
111+
let edition = "2015";
112+
if(classes.contains("edition2018")) {
113+
edition = "2018";
114+
} else if(classes.contains("edition2021")) {
115+
edition = "2021";
116+
}
114117
var params = {
115118
version: "stable",
116119
optimize: "0",
@@ -133,7 +136,15 @@ function playground_text(playground) {
133136
body: JSON.stringify(params)
134137
})
135138
.then(response => response.json())
136-
.then(response => result_block.innerText = response.result)
139+
.then(response => {
140+
if (response.result.trim() === '') {
141+
result_block.innerText = "No output";
142+
result_block.classList.add("result-no-output");
143+
} else {
144+
result_block.innerText = response.result;
145+
result_block.classList.remove("result-no-output");
146+
}
147+
})
137148
.catch(error => result_block.innerText = "Playground Communication: " + error.message);
138149
}
139150

@@ -151,12 +162,13 @@ function playground_text(playground) {
151162
if (window.ace) {
152163
// language-rust class needs to be removed for editable
153164
// blocks or highlightjs will capture events
154-
Array
155-
.from(document.querySelectorAll('code.editable'))
165+
code_nodes
166+
.filter(function (node) {return node.classList.contains("editable"); })
156167
.forEach(function (block) { block.classList.remove('language-rust'); });
157168

158169
Array
159-
.from(document.querySelectorAll('code:not(.editable)'))
170+
code_nodes
171+
.filter(function (node) {return !node.classList.contains("editable"); })
160172
.forEach(function (block) { hljs.highlightBlock(block); });
161173
} else {
162174
code_nodes.forEach(function (block) { hljs.highlightBlock(block); });
@@ -359,7 +371,14 @@ function playground_text(playground) {
359371
});
360372

361373
themePopup.addEventListener('click', function (e) {
362-
var theme = e.target.id || e.target.parentElement.id;
374+
var theme;
375+
if (e.target.className === "theme") {
376+
theme = e.target.id;
377+
} else if (e.target.parentElement.className === "theme") {
378+
theme = e.target.parentElement.id;
379+
} else {
380+
return;
381+
}
363382
set_theme(theme);
364383
});
365384

code-considerations/breaking-changes/behavior.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/breaking-changes/fundamental.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/breaking-changes/new-trait-impls.html

Lines changed: 11 additions & 48 deletions
Large diffs are not rendered by default.

code-considerations/breaking-changes/prelude.html

Lines changed: 10 additions & 47 deletions
Large diffs are not rendered by default.

code-considerations/breaking-changes/summary.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/design/must-use.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/design/public-apis.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/design/summary.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/performance/inline.html

Lines changed: 10 additions & 47 deletions
Large diffs are not rendered by default.

code-considerations/performance/summary.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/safety-and-soundness/generics-and-unsafe.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/safety-and-soundness/may-dangle.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/safety-and-soundness/mem-and-exclusive-refs.html

Lines changed: 11 additions & 48 deletions
Large diffs are not rendered by default.

code-considerations/safety-and-soundness/summary.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/summary.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/using-unstable-lang/const-generics.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/using-unstable-lang/specialization.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

code-considerations/using-unstable-lang/summary.html

Lines changed: 9 additions & 46 deletions
Large diffs are not rendered by default.

css/chrome.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ a > .hljs {
9393
.menu-title {
9494
display: inline-block;
9595
font-weight: 200;
96-
font-size: 2rem;
96+
font-size: 2.4rem;
9797
line-height: var(--menu-bar-height);
9898
text-align: center;
9999
margin: 0;

css/general.css

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ html {
1212
color: var(--fg);
1313
background-color: var(--bg);
1414
text-size-adjust: none;
15+
-webkit-text-size-adjust: none;
1516
}
1617

1718
body {
@@ -45,20 +46,23 @@ h4, h5 { margin-top: 2em; }
4546
margin-top: 1em;
4647
}
4748

48-
h1 a.header:target::before,
49-
h2 a.header:target::before,
50-
h3 a.header:target::before,
51-
h4 a.header:target::before {
49+
h1:target::before,
50+
h2:target::before,
51+
h3:target::before,
52+
h4:target::before,
53+
h5:target::before,
54+
h6:target::before {
5255
display: inline-block;
5356
content: "»";
5457
margin-left: -30px;
5558
width: 30px;
5659
}
5760

58-
h1 a.header:target,
59-
h2 a.header:target,
60-
h3 a.header:target,
61-
h4 a.header:target {
61+
/* This is broken on Safari as of version 14, but is fixed
62+
in Safari Technology Preview 117 which I think will be Safari 14.2.
63+
https://bugs.webkit.org/show_bug.cgi?id=218076
64+
*/
65+
:target {
6266
scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
6367
}
6468

@@ -89,7 +93,7 @@ h4 a.header:target {
8993
.content ul { line-height: 1.45em; }
9094
.content a { text-decoration: none; }
9195
.content a:hover { text-decoration: underline; }
92-
.content img { max-width: 100%; }
96+
.content img, .content video { max-width: 100%; }
9397
.content .header:link,
9498
.content .header:visited {
9599
color: var(--fg);
@@ -172,3 +176,7 @@ blockquote {
172176
margin: 5px 0px;
173177
font-weight: bold;
174178
}
179+
180+
.result-no-output {
181+
font-style: italic;
182+
}

css/variables.css

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
--links: #2b79a2;
6969

70-
--inline-code-color: #c5c8c6;;
70+
--inline-code-color: #c5c8c6;
7171

7272
--theme-popup-bg: #141617;
7373
--theme-popup-border: #43484d;
@@ -92,22 +92,22 @@
9292

9393
.light {
9494
--bg: hsl(0, 0%, 100%);
95-
--fg: #333333;
95+
--fg: hsl(0, 0%, 0%);
9696

9797
--sidebar-bg: #fafafa;
98-
--sidebar-fg: #364149;
98+
--sidebar-fg: hsl(0, 0%, 0%);
9999
--sidebar-non-existant: #aaaaaa;
100-
--sidebar-active: #008cff;
100+
--sidebar-active: #1f1fff;
101101
--sidebar-spacer: #f4f4f4;
102102

103-
--scrollbar: #cccccc;
103+
--scrollbar: #8F8F8F;
104104

105-
--icons: #cccccc;
106-
--icons-hover: #333333;
105+
--icons: #747474;
106+
--icons-hover: #000000;
107107

108-
--links: #4183c4;
108+
--links: #20609f;
109109

110-
--inline-code-color: #6e6b5e;
110+
--inline-code-color: #301900;
111111

112112
--theme-popup-bg: #fafafa;
113113
--theme-popup-border: #cccccc;
@@ -147,7 +147,7 @@
147147

148148
--links: #2b79a2;
149149

150-
--inline-code-color: #c5c8c6;;
150+
--inline-code-color: #c5c8c6;
151151

152152
--theme-popup-bg: #161923;
153153
--theme-popup-border: #737480;
@@ -228,7 +228,7 @@
228228

229229
--links: #2b79a2;
230230

231-
--inline-code-color: #c5c8c6;;
231+
--inline-code-color: #c5c8c6;
232232

233233
--theme-popup-bg: #141617;
234234
--theme-popup-border: #43484d;

0 commit comments

Comments
 (0)