summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
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.
2014-08-06make rustdoc more responsiveAlexis Beingessner-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
2014-08-06Rustdoc: Add padding on <code>Simon Sapin-0/+1
… to separate text from the edge of the newly added background.
2014-08-06Rustdoc: Highlight <code> elements (from Markdown `backticks`)Simon Sapin-0/+4
2014-08-02auto merge of #16169 : Gankro/rust/simple-docs, r=cmrbors-3/+90
<strike>Adds a simple/detailed toggle to api doc pages. Detailed mode is the current behaviour, simple mode hides all doccomment details leaving only signatures for quick browsing. </strike> Adds [expand all] and [collapse all] "links" to all api doc pages. All doccomments are collapsed, leaving only signatures for quick browsing. In addition, clicking on a <strike>function name</strike> function's [toggle details] link now toggles the visibility of the associated doccomment. -------- # [Live Build Here](http://cg.scs.carleton.ca/~abeinges/doc/std/vec/struct.Vec.html) This is something that's been bothering me, and I've seen some people mention in IRC before. The docs are *great* if you want a full in-depth look at an API, but *awful* if you want to scan them. This provides the ability to toggle complexity freely. Interacts perfectly well with noscript, since the static page is effectively unchanged. Collapsing is just hiding divs with css. I'm not much of a designer, so design input welcome on the actual UX for toggling. The actual javascript is *a bit* brittle to layout changes, but it always will be without adding lots of extra junk to the actual markup, which didn't seem worth it.
2014-08-02Add hide/show detail toggles to rustdocAlexis Beingessner-3/+90
All doccomments are now collapsable via a nearby [-] button Adds [collapse all] and [expand all] buttons to the top of all api pages Tweaks some layout to accomadate this
2014-08-01Fix API docs css reversing elements that it shouldn'ttinaun-1/+2
remove unneeded `pre.rust a' selector move transform into `.test-arrow` fixes #16138
2014-07-31auto merge of #15385 : jroweboy/rust/master, r=brsonbors-44/+89
This enables the docs search function to be more forgiving for spelling mistakes. The algorithm works as a dynamic programming algorithm to detect the minimum number of changes required to the search parameter string in order to match any string in the search index. If the number of changes is less then a threshold (currently defined as 3), then the search parameter will be included as it is a possible misspelling of the word. Any results returned by the algorithm are sorted by distance and are ranked lower than results that are partial or exact matches (aka the matches returned by the original search algorithm). Additionally, the increment in the for loops in this file were using one of three different ways to increment (`i += 1` `i++` and `++i`) so I just standardized it to `++i`. As an example, consider searching for the word `String` and accidentally typing in `Strnig`. The old system would return no results because it is a misspelling, but the Levenshtein distance between these two inputs is only two, which means that this will return `String` as a result. Additionally, it will return a few other results such as `strong`, and `StdRng` because these are also similar to `Strnig`. Because of the ranking system though, this change should be unobtrusive to anyone that spells the words correctly, as those are still ranked first before any Levenshtein results.
2014-07-29making raw source display betterAlexis Beingessner-0/+8
* Make the code fill up the full width of the page (no massive whitespace on the left) * Move the code down to make it not intersect the logo * Set a min-width and remove the max-width so that the code doesn't scroll internally, but instead scrolls the page, meaning horizontal scroll bars are always available * Set overflow to actually overflow, just to be sure Fixes #15891