summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2015-07-20librustdoc: blur page when help dialogue is presentAndreas Tolfsen-10/+24
Blurs the document's background when the help dialogue is present, making the contents of the dialogue stand out more.
2015-07-17DRYTamir Duberstein-2/+2
2015-07-16Merge branch 'fix-26673' of https://github.com/nhowell/rust into rollup_centralSteve Klabnik-0/+6
2015-07-16Rollup merge of #26977 - brson:stddoc, r=GankroManish Goregaokar-0/+5
Yet another attempt to make the prose on the std crate page clearer and more informative. This does a lot of things: tightens up the opening, adds useful links (including a link to the search bar), offers guidance on how to use the docs, and expands the prelude docs as a useful newbie entrypoint. r? @steveklabnik cc @aturon
2015-07-13Address feedbackBrian Anderson-0/+5
2015-07-12Set zero padding for pre tagsIvan Ukhov-0/+3
2015-07-12Rollup merge of #26967 - tsurai:master, r=steveklabnikManish Goregaokar-1/+1
The very first code fragment off every struct and trait documentation page generates wrong playground code. This pull request adjusts ```playpen.js``` to only create a link for real examples. Documentation: ```rust pub struct String { // some fields omitted } ``` Playground: ```rust Struct std::String [−] [src] ``` r? @steveklabnik
2015-07-12Rollup merge of #26881 - andreastt:international_keyboard, r=alexcrichtonManish Goregaokar-44/+48
Avoids some code duplication and relies less on deprecated properties on `KeyboardEvent`. The code is still looking quite bad, but that’s primarily because interop in this area is a disaster zone.
2015-07-11Auto merge of #26882 - andreastt:style_improvements, r=alexcrichtonbors-2/+1
Sharpens the help dialogues edges by removing border-padding, which matches better with the rest of the document. Also increases somewhat the rounded edges of the key symbols to make it clear they are symbols. Also introduces closing apostrophes and ellipsis for search field placeholder.
2015-07-11doc: remove playground links for structs and traitsCristian Kubis-1/+1
2015-07-10doc: set playground to nightly for unstable codeCristian Kubis-1/+8
2015-07-08librustdoc: generalise handling of keyboard shortcutsAndreas Tolfsen-44/+48
2015-07-08librustdoc: sharpen help dialogue edgesAndreas Tolfsen-2/+1
Sharpens the help dialogues edges by removing border-padding, which matches better with the rest of the document. Also increases somewhat the rounded edges of the key symbols to make it clear they are symbols. Also introduces closing apostrophes and ellipsis for search field placeholder.
2015-07-01rustdoc: Update jQuery from 2.1.0 to 2.1.4Nick Howell-4/+4
2015-07-01rustdoc: Reset the title when pressing the back buttonNick Howell-0/+6
Fixes #26673
2015-07-01In js from the docs, change keyboard eventlistener to be compatible with ↵Mathieu David-6/+33
non-english keyboard layouts. Fixes #26016 Fixes #16572
2015-06-22Auto merge of #26037 - nhowell:plain_js_playpen, r=steveklabnikbors-14/+34
Since the "Book" already avoids jQuery in its inline script tags and playpen.js is tiny, I figured I would convert it to plain old JS as well. Side note: This is a separate issue, but another thing I noticed in my testing is that the "⇱" character doesn't display correctly in Chrome on Windows 7. (Firefox and IE work fine; other browsers not tested) r? @steveklabnik Edit: Github didn't like the "script" tag above Edit 2: Actually, now IE seems to render "⇱" fine for me. Odd.
2015-06-18rustdoc: Update document title when displaying search resultsJohannes Oertel-0/+3
Fixes #26360.
2015-06-12Convert playpen.js to plain JS.Nick Howell-14/+34
It is still compatible with IE9+. This removes the jQuery dependency from the "Book" entirely.
2015-05-31rustdoc: Tweak css of function where clausesUlrik Sverdrup-3/+3
Method where clauses are put indented on a new line, do the same tweak to free functions, which makes it cleaner and easier to read.
2015-05-22Rustdoc Search: Add Hint to Primitive Type ResultPascal Hertleif-0/+2
Closes #25167
2015-05-22Rustdoc Search: Increase Relevance of PrimitivesPascal Hertleif-0/+7
2015-05-22Rustdoc: Clean Up Some JSPascal Hertleif-60/+57
There are more possible optimizations left (cached length in loops) as well as some possible bugs (shadowed variables) to fix. This is mostly syntactic.
2015-05-19rustdoc: Fix left margin for type aliasesUlrik Sverdrup-1/+1
Fixes #24655 Margin for associated types was applied to type aliases (in return value) by mistake.
2015-05-11Auto merge of #25225 - bluss:doc-search-assoc-items, r=alexcrichtonbors-1/+2
Rustdoc fixes for associated items This is related to isssue #22442 and solves it partly. This solves the search index links of associated types and constants, so that they link to the trait page. Also add an Associated Constants section if constants are present.
2015-05-09rustdoc: Link associated items in search index to traitUlrik Sverdrup-1/+2
This is related to isssue #22442 and solves it partly. This solves the links of associated types and constants, so that they link to the trait page.
2015-05-07Remove trailing whitespace on blank lineRory O’Kane-1/+1
This style inconsistency was noted at https://travis-ci.org/rust-lang/rust/builds/61583070#L371
2015-05-07Refactor doc toggle button label changingRory O’Kane-14/+28
To separate concerns, instead of checking the state of `#toggle-all-docs` by looking at its label text, I add or remove a class `will-expand` depending on whether the button’s next click will expand everything. (The `if` statement’s two branches were swapped as part of this change.) I moved the desired text values to a function `labelForToggleButton`, so changing the values will be easier. I also note in a comment the other file where the text is duplicated. To allow the labels of both types of toggle buttons to be uniformly set, I added a `span.inner` to the global button too. I split the template in `render.rs` into multiple lines to make room for the `span`, and that adds whitespace around the `[` and `]` text elements. That seems to be okay, though – the page still looks the same. I updated the CSS styling for `.collapse-toggle > .inner` to add a little extra space around the symbol, to make minus signs easier to identify. (`#toggle-all-docs > .inner` does not need the same style, since its text size is bigger, so it naturally puts more space around the symbol.)
2015-04-30Fix doc [−] button bug by escaping differentlyRory O’Kane-8/+8
The cause of the problem is described here: https://github.com/rust-lang/rust/pull/24797#issuecomment-97049765 . I tested this new `main.js` by changing the `main.js` content of a rendered docs page to this new content. The [−] button worked again.
2015-04-27Rollup merge of #24804 - liigo:new-trait-color, r=steveklabnikSteve Klabnik-1/+1
Fixes #24441 Preview: ![new-trait-color](https://cloud.githubusercontent.com/assets/346530/7331922/d6cbcf72-eb58-11e4-8a1d-4ca5e3683ed2.png)
2015-04-27Change literal minus ‘−’ to HTML entity ‘−’Rory O’Kane-8/+8
So that if people accidentally delete the character, they won’t re-type it as a hyphen, which would cause bugs. I changed ‘+’ too, even though it won’t be re-typed incorrectly, so that it is easier to see when plus is used as a symbol for the button, and when it is used as an operator in code. It also makes it clearer that the use of an entity for minus is on purpose, so people won’t be tempted to replace the entity incorrectly with a hyphen character.
2015-04-24In [-] doc buttons, change hyphen ‘-’ to minus ‘−’Rory O’Kane-5/+5
The minus sign ‘−’ is the same width as the plus sign ‘+’, so the button’s transition between the two symbols will look more smooth.
2015-04-25rustdoc: change color of trait typesLiigo Zhuang-1/+1
Fixes #24441
2015-04-24Rollup merge of #24717 - liigo:add-back-toggle-links, r=alexcrichtonManish Goregaokar-3/+7
r? @alexcrichton (since you added `.stability` warning messages)
2015-04-23rustdoc: add back [-]/[+] toggle links for unstable-methodsLiigo Zhuang-3/+7
2015-04-23rustdoc: toggle collapse/expand all docs using the same linkLiigo Zhuang-12/+17
2015-04-16rustdoc: Inline methods inhereted through DerefAlex Crichton-2/+6
Whenever a type implements Deref, rustdoc will now add a section to the "methods available" sections for "Methods from Deref<Target=Foo>", listing all the inherent methods of the type `Foo`. Closes #19190
2015-04-16rustdoc: Fix cross-crate macro source linksAlex Crichton-0/+3
The source filename for cross crate macros isn't quite right so the normal generated links are invalid. Closes #21311
2015-04-16rustdoc: Overhaul stability displaysAlex Crichton-29/+30
This commit is an overhaul to how rustdoc deals with stability of the standard library. The handling has all been revisited with respect to Rust's current approach to stability in terms of implementation as well as the state of the standard library today. The high level changes made were: * Stable items now have no marker by default * Color-based small stability markers have been removed * Module listings now fade out unstable/deprecated items slightly * Trait methods have a separate background color based on stability and also list the reason that they are unstable. * `impl` blocks with stability no longer render at all. This may be re-added once the compiler recognizes stability on `impl` blocks. * `impl` blocks no longer have stability of the methods implemente indicated * The stability summary has been removed Closes #15468 Closes #21674 Closes #24201
2015-04-13rustdoc: Prevent '/' from showing the help dialogBarosl Lee-3/+5
Only '?' should do that. Fixes #24289.
2015-04-05Auto merge of #24055 - estsauver:24044, r=alexcrichtonbors-0/+2
If a result is highlighted, when the search changes that state should no longer be highlighted. Fixes #24044 cc @steveklabnik
2015-04-04Make changing doc search unhighlight current resultEarl St Sauver-0/+2
If a result is highlighted, when the search changes that state should no longer be highlighted. Fixes #24044 cc @steveklabnik
2015-04-01Fix sidebar bugCarlos Galarza-4/+6
Validate if the description is available in the rawSearchIndex
2015-03-29Fix extremely small stability bars on docs pageWesley Wiser-0/+4
Fixes #23397
2015-03-15Strip trailing whitespaceTamir Duberstein-4/+4
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-1/+0
2015-03-14Auto merge of #23289 - mihneadb:rustdoc-search-by-type, r=alexcrichtonbors-2/+35
This adds search by type (for functions/methods) support to Rustdoc. Target issue is at https://github.com/rust-lang/rfcs/issues/658. I've described my approach here: https://github.com/rust-lang/rfcs/issues/658#issuecomment-76484200. I'll copy the text in here as well: --- Hi, it took me longer than I wished, but I have implemented this in a not-too-complex way that I think can be extended to support more complex features (like the ones mentioned [here](https://github.com/rust-lang/rust/issues/12866#issuecomment-66945317)). The idea is to generate a JSON representation of the types of methods/functions in the existing index, and then make the JS understand when it should look by type (and not by name). I tried to come up with a JSON representation that can be extended to support generics, bounds, ref/mut annotations and so on. Here are a few samples: Function: ```rust fn to_uppercase(c: char) -> char ``` ```json { "inputs": [ {"name": "char"} ], "output": { "name": "char", } } ``` Method (implemented or defined in trait): ```rust // in struct Vec // self is considered an argument as well fn capacity(&self) -> usize ``` ```json { "inputs": [ {"name": "vec"} ], "output": { "name": "usize" } } ``` This simple format can be extended by adding more fields, like `generic: bool`, a `bounds` mapping and so on. I have a working implementation in https://github.com/rust-lang/rust/compare/master...mihneadb:rustdoc-search-by-type. You can check out a live demo [here](http://data.mihneadb.net/doc/std/index.html?search=charext%20-%3E%20char). ![screenshot from 2015-02-28 00 54 00](https://cloud.githubusercontent.com/assets/643127/6422722/7e5374ee-bee4-11e4-99a6-9aac3c9d5068.png) The feature list is not that long: - search by types (you *can* use generics as well, as long as you use the exact name - e.g. [`vec,t -> `](http://data.mihneadb.net/doc/std/index.html?search=vec%2C%20t%20-%3E)) - order of arguments does not matter - `self` is took into account as well (e.g. search for `vec -> usize`) - does not use "complex" annotations (e.g. you don't search for `&char -> char` but for `char -> char`) My goal is to get a working, minimal "base" merged so that others can build upon it. How should I proceed? Do I open a PR (badly in need of code review since this is my first non "hello world"-ish rust code)? ---
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