diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2016-12-27 17:02:52 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2016-12-27 17:02:52 -0800 |
| commit | e766c465d2e4c4e3c106bfa8343cbe6f9192d445 (patch) | |
| tree | 821a7cf1e0b04ac9c0cddede6eb760bbf2d0ce62 /src/librustdoc/html/static | |
| parent | 96c52d4fd86aed6320732a511c04bcbfff7d117f (diff) | |
| parent | 314c28b729ae359b99586cc62c486c28e0d44424 (diff) | |
Merge branch 'master' into escape-reason-docs
Diffstat (limited to 'src/librustdoc/html/static')
| -rw-r--r-- | src/librustdoc/html/static/main.js | 21 | ||||
| -rw-r--r-- | src/librustdoc/html/static/rustdoc.css | 16 | ||||
| -rw-r--r-- | src/librustdoc/html/static/styles/main.css | 8 |
3 files changed, 15 insertions, 30 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 6ea25fa1241..c12e1e7d608 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -609,7 +609,7 @@ displayPath + '<span class="' + type + '">' + name + '</span></a></td><td>' + '<a href="' + href + '">' + - '<span class="desc">' + item.desc + + '<span class="desc">' + escape(item.desc) + ' </span></a></td></tr>'; }); } else { @@ -807,14 +807,6 @@ search(); } - function plainSummaryLine(markdown) { - markdown.replace(/\n/g, ' ') - .replace(/'/g, "\'") - .replace(/^#+? (.+?)/, "$1") - .replace(/\[(.*?)\]\(.*?\)/g, "$1") - .replace(/\[(.*?)\]\[.*?\]/g, "$1"); - } - index = buildIndex(rawSearchIndex); startSearch(); @@ -836,13 +828,10 @@ if (crates[i] === window.currentCrate) { klass += ' current'; } - if (rawSearchIndex[crates[i]].items[0]) { - var desc = rawSearchIndex[crates[i]].items[0][3]; - var link = $('<a>', {'href': '../' + crates[i] + '/index.html', - 'title': plainSummaryLine(desc), - 'class': klass}).text(crates[i]); - ul.append($('<li>').append(link)); - } + var link = $('<a>', {'href': '../' + crates[i] + '/index.html', + 'title': rawSearchIndex[crates[i]].doc, + 'class': klass}).text(crates[i]); + ul.append($('<li>').append(link)); } sidebar.append(div); } diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 7ee184c089c..0ca4f7ea36f 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1,5 +1,3 @@ -@import "normalize.css"; - /** * Copyright 2013 The Rust Project Developers. See the COPYRIGHT * file at the top-level directory of this distribution and at @@ -52,13 +50,15 @@ font-family: 'Source Code Pro'; font-style: normal; font-weight: 400; - src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff'); + /* Avoid using locally installed font because bad versions are in circulation: + * see https://github.com/rust-lang/rust/issues/24355 */ + src: url("SourceCodePro-Regular.woff") format('woff'); } @font-face { font-family: 'Source Code Pro'; font-style: normal; font-weight: 600; - src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff'); + src: url("SourceCodePro-Semibold.woff") format('woff'); } * { @@ -523,20 +523,20 @@ body.blur > :not(#help) { padding: 20px; } -em.stab { - display: inline-block; +.stab { + display: table; border-width: 1px; border-style: solid; padding: 3px; margin-bottom: 5px; font-size: 90%; - font-style: normal; } -em.stab p { +.stab p { display: inline; } .module-item .stab { + display: inline; border-width: 0; padding: 0; margin: 0; diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css index 6a9a24f6996..862d6d12b9a 100644 --- a/src/librustdoc/html/static/styles/main.css +++ b/src/librustdoc/html/static/styles/main.css @@ -30,10 +30,6 @@ h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.t background-color: white; } -div.stability > em > code { - background-color: initial; -} - .docblock code, .docblock-short code { background-color: #F5F5F5; } @@ -129,5 +125,5 @@ a.test-arrow { background-color: white; } -em.stab.unstable { background: #FFF5D6; border-color: #FFC600; } -em.stab.deprecated { background: #F3DFFF; border-color: #7F0087; } +.stab.unstable { background: #FFF5D6; border-color: #FFC600; } +.stab.deprecated { background: #F3DFFF; border-color: #7F0087; } |
