about summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2015-03-14Add support to search functions by type to rustdoc.Mihnea Dobrescu-Balaur-2/+35
2015-03-12Rollup merge of #22769 - :rustdocfix, r=brsonManish Goregaokar-17/+0
Fixes #22325
2015-03-09Rustdoc: Add Headline Style for `tymethod`Pascal Hertleif-2/+2
Fixes #23230
2015-03-06Rollup merge of #23082 - killercup:patch-6, r=alexcrichtonManish Goregaokar-1/+1
This should fix #22615. Previously, the playpen links grabbed the content of all `.rusttest` containers on the same level to build the URL. Now they just select the one before the `pre` they are shown in. I have only tested this by changing the file in my local build of the docs (not by running rustdoc itself).
2015-03-05Fix Playpen Links Containing Multiple ExamplesPascal Hertleif-1/+1
Fixes #22615.
2015-03-05rustdoc: Move sidebar items into shared JavaScript.Kang Seonghoon-21/+65
It had been a source of huge bloat in rustdoc outputs. Of course, we can simply disable compiler docs (as `rustc` generates over 90M of HTML) but this approach fares better even after such decision. Each directory now has `sidebar-items.js`, which immediately calls `initSidebarItems` with a JSON sidebar data. This file is shared throughout every item in the sidebar. The current item is highlighted via a separate JS snippet (`window.sidebarCurrent`). The JS file is designed to be loaded asynchronously, as the sidebar is rendered before the content and slow sidebar loading blocks the entire rendering. For the minimal accessibility without JS, links to the parent items are left in HTML. In the future, it might also be possible to integrate crates data with the same fashion: `sidebar-items.js` at the root path will do that. (Currently rustdoc skips writing JS in that case.) This has a huge impact on the size of rustdoc outputs. Originally it was 326MB uncompressed (37.7MB gzipped, 6.1MB xz compressed); it is 169MB uncompressed (11.9MB gzipped, 5.9MB xz compressed) now. The sidebar JS only takes 10MB uncompressed & 0.3MB gzipped.
2015-02-24fix rustdoc performance problemsJulian Orth-17/+0
Fixes #22325
2015-02-20Fix style fallout from 204e2bd442Simonas Kazlauskas-2/+17
Links in docblock headers also became blue, which was not intended.
2015-02-18Style all docblock links properlySimonas Kazlauskas-2/+2
Fixes #22493
2015-02-15Add styles for docblock tablesSimonas Kazlauskas-0/+21
Fixes #22357
2015-02-09Make fallback font 'serif', rather than 'sans-serif' fontsSean Collins-1/+1
2015-01-24Improve mobile-friendliness of API docsKevin Yap-1/+8
Removes min-width rule from body so that the page does not scroll horizontally on mobile displays; hides out-of-band information.
2015-01-23Auto merge of #20221 - liigo:rustdoc-sidebar-tooltips-v3, r=alexcrichtonbors-1/+12
This pull request add tooltips to most links of sidebar. The tooltips display "summary line" of items' document. Some lengthy/annoying raw markdown code are eliminated, such as links and headers. - `[Rust](http://rust-lang.org)` displays as `Rust` (no URLs) - `# header` displays as `header` (no `#`s) Some inline spans, e.g. ``` `code` ``` and ```*emphasis*```, are kept as they are, for better readable. I've make sure `&` `'` `"` `<` and `>` are properly displayed in tooltips, for example, `&'a Option<T>`. Online preview: http://liigo.com/tmp/tooltips/std/index.html @alexcrichton @steveklabnik since you have reviewed my previous ([v1](https://github.com/rust-lang/rust/pull/13014),[v2](https://github.com/rust-lang/rust/pull/16448)) PRs of this serise, which have been closed for technical reasons. Thank you.
2015-01-21rustdoc: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-5/+2
2015-01-21fix falloutLiigo Zhuang-4/+1
2015-01-21display plain summary line in javascriptLiigo Zhuang-1/+13
2015-01-21rustdoc: add tooltips to sidebarLiigo Zhuang-1/+3
2015-01-17Increase docs search box delayChris Thorn-1/+1
Increases the delay of the search box to 500ms after key up. I tried adding a three character minimum for setting the delay, but didn't find it very useful. Should close #20095
2015-01-13Fix playpen links to not all be the sameEarl St Sauver-3/+1
Fixes #20732, that all links in some modules point to the same code examples was reported. The ID's generated for documents in librustdoc are not all unique, which means the code rendered as text is not being properly selected. This change removes the unique id generation and instead changes the frontend code to grab the correct code sample by it's relative position in the dom.
2015-01-10Fix `playpen.js` errors on `pre`s without IDsPascal Hertleif-0/+1
This adds an early return to skip code blocks without IDs. Fixes #20864.
2015-01-08Fix rustdoc fallout from #20092Barosl Lee-1/+1
Due to the CSS changes done by the previous patch to make the line numbers clickable (#20092), the sidebar became unclickable. This commit reverts the changes and adopts an alternative approach.
2015-01-06Fix JS errorSteven Fackler-1/+1
ECMAScript 6 isn't really supported anywhere Closes #20681
2015-01-05rollup merge of #20092: barosl/rustdoc-line-number-clickableAlex Crichton-6/+47
While talking on IRC, someone wanted to post a link to the Rust source code, but while the lines of the rendered source code do have anchors (`<span id="[line number]">`), there is no convenient way to make links as they are not clickable. This PR makes them clickable. Also, a minor fix of the FAQ is included.
2014-12-28Use CSS whitespace rather than padding to indentDirk Gadsden-2/+4
2014-12-27Indent where clause in rustdocDirk Gadsden-0/+3
* Add <span class=‘where’> around clause * CSS rule to format the span (for #20176)
2014-12-27Make the line numbers of the source code clickableBarosl Lee-6/+47
2014-12-05rollup merge of #19515: lifthrasiir/rustdoc-wrong-dedupCorey Richardson-1/+2
Fixes #17332.
2014-12-05rollup merge of #19503: lifthrasiir/xenophobic-rustdocCorey Richardson-2/+2
This series of commits deals with broken links to the source code. It also refactors some repetitive codes from Rustdoc. The most important commit, 1cb1f00d40f000ac7633b62a603db4fcea835ca6, describes the rationale; this will fix a half of #16289. Other commits are reasonably independent to each other and can be made into indiviudal PRs at the request. ### Notes on the broken source links As of bda97e8557820cc4ec13645dbdf976e5ccaa0ce1 (I've used this to check the PR works as intended), there are 281 (!) such broken links. They can be further classified as follows: * 178 links to incorrect item types. This is the first half of #16289, and this PR fixes all of them. * 89 links to redirect pages. They are not technically "broken" but still doesn't give a source code. I have a fix for this in mind, which would make a redirect page slightly *fat*. * 14 links to incorrect `DefId` in the `gotosrc` parameter. This is #15309, and affects many `liballoc` reexports in `libstd` but *nothing else* (curiously). I'm yet to track this down; might be a metadata bug (not sure). * 0 links to the crate reexported as a different name. This is the second half of #16289, and seems not hard to fix but I'm running out of time. Prevalence of this kind of bugs calls for a full link verifier integrated into the testing process. :S
2014-12-04rustdoc: Do not deduplicate items when their parents differ.Kang Seonghoon-1/+2
Fixes #17332.
2014-12-04rustdoc: Removed Foreign{Function,Static} item types.Kang Seonghoon-2/+2
They are just (unsafe) functions and static items to most users and even compilers! The metadata doesn't distinguish them, so Rustdoc ended up producing broken links (generated `ffi.*.html`, links to `fn.*.html`). It would be best to avoid this pitfall at all.
2014-12-01rustdoc: Check for href when prepending rootPathPaul Collier-2/+2
Fixes #18354.
2014-11-24rustdoc: Render associated types on traits and implsTom Jakubowski-6/+7
2014-11-23Highlight trait methods in rustdoc’s search resultsP1start-0/+2
2014-11-14Hide interactive elements when printing rustdocCorey Ford-0/+6
Hide the search form and expand/collapse buttons, since they aren't useful when printed.
2014-11-01doc: enable OpenType kerning and ligaturesAdrien Tétar-1/+5
2014-11-01Update one corrupt webfontAdrien Tétar-0/+0
As with last time (where I marked .woff files as binary so that git does not perform newline normalization), it's unclear how it got corrupted in the first place.
2014-11-01rustdoc: stop trying to use font-variants we don't haveAdrien Tétar-3/+2
Browser-generated weights or slants is the last thing we want...
2014-10-09rustdoc: Implement constant documentationAlex Crichton-1/+3
At the same time, migrate statics to constants.
2014-09-17rollup merge of #17226 : P1start/rustdoc-colourAlex Crichton-6/+10
2014-09-17rustdoc: Correctly distinguish enums and typesP1start-1/+1
This is done by adding a new field to the `DefTy` variant of `middle::def::Def`, which also clarifies an error message in the process. Closes #16712.
2014-09-17Restore colour to rustdoc, add colour to ffi functions and methodsP1start-5/+9
2014-09-14Display the doc-block toggle on everything again.Huon Wilson-1/+1
This needs a clone otherwise each successive insertion detaches `toggle` from the previous position. Fixes #17125.
2014-09-07auto merge of #17035 : huonw/rust/moar-jquery, r=alexcrichtonbors-13/+14
Sometimes (e.g. on Rust CI) the "expand description" text of the collapse toggle was displayed by default, when a page is first loaded (even though the description is expanded), because some Content-Security-Policy settings disable inline CSS. Setting it the style with the `.css` method allows the output to be used in more places.
2014-09-06Use more jQuery to avoid displaying Expand Description more often.Huon Wilson-13/+14
Sometimes (e.g. on Rust CI) the "expand description" text of the collapse toggle was displayed by default, when a page is first loaded (even though the description is expanded), because some Content-Security-Policy settings disable inline CSS. Setting it the style with the `.css` method allows the output to be used in more places.
2014-09-05rustdoc/html: emphasize the crate part of the full path.NODA, Kai-0/+2
2014-08-31Make doc search results use <a> tags instead of js for navigatingCarol Nichols-38/+36
This has the primary advantage of not interfering with browser default behavior for links like being able to cmd/ctrl+click on a result to open the result in a new tab but leave the current page as-is (previous behavior both opened a new tab and changed the current tab's location to the result's)
2014-08-10auto merge of #16387 : Gankro/rust/doc-search, r=cmrbors-5/+6
Fixes str/struct ambiguity (by removing the synonym) and pushes raw searches to the history instead of processed ones. # [Live Version Here](http://cg.scs.carleton.ca/~abeinges/doc/std/)
2014-08-09rustdoc: use raw search in URLAlexis Beingessner-3/+5
fixes #16385 fixes #16271
2014-08-09removing 'str'='struct' search synonymAlexis Beingessner-2/+1
fixes #16384
2014-08-08auto merge of #16277 : Gankro/rust/responsive-docs, r=cmrbors-21/+72
* move some sidebar contents to a title bar when small * inline description toggle when small * make out-of-band and in-band content share space, rather than float and clash * compress wording of out-of-band content to avoid line-wrap as much as possible ## [Live Version Here](http://cg.scs.carleton.ca/~abeinges/doc/index.html) Pages Of Interest: * [Vec](http://cg.scs.carleton.ca/~abeinges/doc/std/vec/struct.Vec.html) (small path) * [TreeSet](http://cg.scs.carleton.ca/~abeinges/doc/collections/treemap/struct.TreeSet.html) (long path) * [std](http://cg.scs.carleton.ca/~abeinges/doc/std/index.html) (for stability dash) TBD in a future PR is to convert links in the sidebar into a series of nest ul/li's, so that they can easily be moved to a drop-down in the new title bar. I think this is out of scope for this PR, but am willing to implement it now if desired.