about summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2020-10-22Rollup merge of #78084 - GuillaumeGomez:improve-mobile-display, r=jyn514,Nemo157Yuki Okushi-0/+35
Greatly improve display for small mobile devices screens Fixes #78014. The biggest change being the "search bar". Instead of having everything on one line, I decided to move the search input on its own: ![Screenshot from 2020-10-18 21-54-26](https://user-images.githubusercontent.com/3050060/96378530-c863a800-118c-11eb-8e82-a43fce312b5b.png) Another change is that now, we "break words" in the listing so that they don't grow too big: ![Screenshot from 2020-10-18 21-57-17](https://user-images.githubusercontent.com/3050060/96378555-ffd25480-118c-11eb-8a71-8f116c7edd93.png) r? @jyn514
2020-10-19Add link to rustdoc book in rustdoc help popupGuillaume Gomez-5/+33
2020-10-18Greatly improve display for small mobile devices screensGuillaume Gomez-0/+35
2020-10-18Rollup merge of #78050 - GuillaumeGomez:small-css-cleanup, r=jyn514Yuki Okushi-5/+1
Small CSS cleanup r? @jyn514
2020-10-17Small CSS cleanupGuillaume Gomez-5/+1
2020-10-17Rollup merge of #78013 - GuillaumeGomez:fix-sidebar-scroll-mobile-devices, ↵Yuki Okushi-4/+0
r=jyn514 Fix sidebar scroll on mobile devices Fixes #77942. The issue was coming from the appearance/disappearance of the "wrapper" on the mobile devices web browsers, which triggers the "resize" event, calling the `hideSidebar` function is the JS code. r? @jyn514
2020-10-16Fix sidebar scroll on mobile devicesGuillaume Gomez-4/+0
2020-10-16Auto merge of #77809 - nasso:master, r=jyn514,guillaumegomezbors-25/+155
Add settings to rustdoc to use the system theme This PR adds new settings to `rustdoc` to use the operating system color scheme. ![click](https://user-images.githubusercontent.com/11479594/95668052-bf604e80-0b6e-11eb-8a17-473aaae510c9.gif) `rustdoc` actually had [basic support for this](https://github.com/rust-lang/rust/blob/b1af43bc63bc7417938df056f7f25d456cc11b0e/src/librustdoc/html/static/storage.js#L121), but the setting wasn't visible and couldn't be set back once the theme was explicitly set by the user. It also didn't update if the operating system theme preference changed while viewing a page. I'm using [this method](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Testing_media_queries#Receiving_query_notifications) to query and listen to changes to the `(prefers-color-scheme: dark)` media query. I kept the old method (based on `getComputedStyle`) as a fallback in case the user-agent doesn't support `window.matchMedia` (so like... [pretty much nobody](https://caniuse.com/?search=matchMedia)). Since there's now more than one official ""dark"" theme in `rustdoc` (and also to support custom/third-party themes), the preferred dark and light themes can be configured in the settings page (the defaults are just "dark" and "light"). This is also my very first "proper" PR to Rust! Please let me know if I did anything wrong :).
2020-10-15Set preferred-dark-theme to the last dark themenasso-0/+10
If the user doesn't have a preferred dark theme but is already using a dark theme, set the preferred dark theme to be that theme
2020-10-15Rollup merge of #77979 - GuillaumeGomez:hide-help-button, r=jyn514Guillaume Gomez-0/+8
Hide help button on mobile Addresses #77899. This PR is just a quick fix for now: we're still debating about whether or not we want to display this help popup and if so, how. I'll open an issue once this PR is merged to discuss about it. Before: ![Screenshot from 2020-10-15 17-56-39](https://user-images.githubusercontent.com/3050060/96155127-df499680-0f0f-11eb-8a13-77c537141f21.png) After: ![Screenshot from 2020-10-15 17-55-06](https://user-images.githubusercontent.com/3050060/96154957-ac070780-0f0f-11eb-9d90-7d8f79a6bf37.png) r? @jyn514
2020-10-15Hide help button on mobile devicesGuillaume Gomez-0/+8
2020-10-13Coding style fixesnasso-21/+18
2020-10-13Add a setting to use the system themenasso-21/+144
2020-10-13Rollup merge of #77699 - GuillaumeGomez:word-wrap, r=XAMPPRockyYuki Okushi-7/+3
Add word wrap for short descriptions Fixes #77652 ![Screenshot from 2020-10-08 13-26-18](https://user-images.githubusercontent.com/3050060/95452770-11845280-096a-11eb-80da-723da85261fa.png) cc @WaffleLapkin r? @jyn514
2020-10-12Add word-wrap rule for short descriptionsGuillaume Gomez-0/+3
2020-10-08Remove unused class ruleGuillaume Gomez-7/+0
2020-10-07Fix tooltip text displayGuillaume Gomez-0/+4
2020-10-03Only use Fira Sans for the first `td` in item listsCamelid-1/+1
Fixes an issue where links in the one-line version of an item's docs would be in Fira Sans, while the rest would be in a serifed font.
2020-09-23Use theme-adaptive SVG favicon from other Rust sitesJarek Samic-0/+24
2020-09-09Auto merge of #76453 - camelid:fix-css-crate-list, r=GuillaumeGomez,ollie27bors-3/+4
rustdoc: Fix font CSS for crate lists I had put it in the wrong file in #76126. This should fix it now. Thank you to `@ollie27` for pointing this out! --- `@rustbot` modify labels: T-rustdoc C-bug
2020-09-07rustdoc: Fix font CSS for crate listsCamelid-3/+4
I had put it in the wrong file in #76126. This should fix it now. Thank you to @ollie27 for pointing this out!
2020-09-05Improve ayu doc source line number contrastIvan Tham-2/+3
Improve contrast of foreground line number.
2020-09-01Use "Fira Sans" for crate list fontCamelid-0/+3
Fira Sans is what's used for module lists and other item lists. Previously, the default body font, "Source Serif Pro", was used for crate lists, which didn't visually match other item lists.
2020-08-31Rollup merge of #76052 - ↵Aleksey Kladov-4/+8
aszenz:GH-66816_removes_disable_attribute_before_return, r=GuillaumeGomez GH-66816: Remove disable attr before return Passing --disable-per-crate-search removes the create search inputs so moved code around so that the search input is enabled first before the function returns. Fixes #66816
2020-08-30Auto merge of #75901 - ↵bors-1/+1
GuillaumeGomez:ayu-theme-button-hover-background-color, r=pickfire Improve theme button hover background color Fixes #75880. ![Screenshot from 2020-08-25 13-44-01](https://user-images.githubusercontent.com/3050060/91170922-e60b1880-e6d9-11ea-9eb1-61a44cdc28d9.png) ![Screenshot from 2020-08-25 13-43-43](https://user-images.githubusercontent.com/3050060/91170924-e73c4580-e6d9-11ea-969e-616bf4130975.png) r? @pickfire
2020-08-30Rollup merge of #76022 - GuillaumeGomez:cleanup-rustdoc-front, r=jyn514Dylan DPC-8/+9
Clean up rustdoc front-end source code r? @jyn514
2020-08-30Rollup merge of #75881 - pickfire:patch-5, r=GuillaumeGomezDylan DPC-1/+1
Expand rustdoc theme chooser x padding ![image](https://user-images.githubusercontent.com/4687791/91057476-d0eea500-e659-11ea-8c9a-e44db937da89.png) ![image](https://user-images.githubusercontent.com/4687791/91057530-e368de80-e659-11ea-9298-fbb00006d91f.png) But I still think there is room for improvement considering mdbook. ![image](https://user-images.githubusercontent.com/4687791/91057583-f7acdb80-e659-11ea-9dc5-317caed92bc5.png) CC @GuillaumeGomez @jyn514
2020-08-29Use an id instead of a functionGuillaume Gomez-6/+3
2020-08-29GH-66816: Process before enabling searchasrar-2/+5
2020-08-29GH-66816: Removes disable before returnasrar-3/+4
Passing --disable-per-crate-search removes the create search inputs so moved code around so that the search input is enabled first before the function returns
2020-08-28Clean up rustdoc front-end source codeGuillaume Gomez-8/+12
2020-08-27Auto merge of #75976 - GuillaumeGomez:help-popup, r=jyn514bors-4/+5
Improve help popup Fixes #75623. The second commit is just a slight improvement: the help popup won't be created until someone presses "?" or ESC. Not a big improvement in itself but considering the low amount of code required, I think it was worth the shot. r? @jyn514
2020-08-27Delay help popup creation to when it's neededGuillaume Gomez-2/+3
2020-08-27Improve helper wordingGuillaume Gomez-2/+2
2020-08-27Rollup merge of #75870 - GuillaumeGomez:unify-border-color-theme-ayu, r=pickfireDylan DPC-1/+1
Unify theme choices border color in ayu theme There was a slight color difference in the theme choice menu borders: ![Screenshot from 2020-08-24 10-37-05](https://user-images.githubusercontent.com/3050060/91022913-22654880-e5f6-11ea-8165-302b2d4e701e.png) ![Screenshot from 2020-08-24 10-37-58](https://user-images.githubusercontent.com/3050060/91022918-242f0c00-e5f6-11ea-989a-e26a28196d09.png) r? @Cldfire
2020-08-27Rollup merge of #75837 - GuillaumeGomez:fix-font-color-help-button, r=CldfireDylan DPC-0/+2
Fix font color for help button in ayu and dark themes A nice before/after: ![Screenshot from 2020-08-23 14-47-07](https://user-images.githubusercontent.com/3050060/90979230-0dd07400-e554-11ea-85f7-046dfca65e8e.png) ![Screenshot from 2020-08-23 14-47-03](https://user-images.githubusercontent.com/3050060/90979233-145eeb80-e554-11ea-8e63-1864c3f2699b.png) For the ayu theme, the change is very "light", the font color was already close to white, so I unified the color with the pictures of the other buttons: ![Screenshot from 2020-08-23 15-20-45](https://user-images.githubusercontent.com/3050060/90979281-5e47d180-e554-11ea-9993-8595057481ab.png) ![Screenshot from 2020-08-23 15-20-50](https://user-images.githubusercontent.com/3050060/90979279-5daf3b00-e554-11ea-8d39-beb57091aba7.png)
2020-08-25Improve theme button hover background colorGuillaume Gomez-1/+1
2020-08-24Expand rustdoc theme chooser x paddingIvan Tham-1/+1
2020-08-24Add explanations on the results search element checkGuillaume Gomez-0/+3
2020-08-24Unify theme choices border color in ayu themeGuillaume Gomez-1/+1
2020-08-23Fix font color for help button in ayu and dark themesGuillaume Gomez-0/+2
2020-08-23Prevent automatic page change when using historyGuillaume Gomez-4/+11
2020-08-11Fully handle "?" shortcutGuillaume Gomez-3/+1
2020-08-11Rollup merge of #75366 - GuillaumeGomez:help-button, r=jyn514Dylan DPC-11/+26
Add help button Part of #75197. Here is a screenshot of the result: ![Screenshot from 2020-08-10 16-53-20](https://user-images.githubusercontent.com/3050060/89796547-14112a00-db2a-11ea-9f25-57b30ab68f9b.png) r? @jyn514
2020-08-11Rollup merge of #75249 - GuillaumeGomez:rust-logo-border, r=ManishearthDylan DPC-6/+12
Only add a border for the rust logo ![Screenshot from 2020-08-07 11-22-51](https://user-images.githubusercontent.com/3050060/89631113-9dadc700-d8a0-11ea-8063-ad40207decaa.png) ![Screenshot from 2020-08-07 11-19-47](https://user-images.githubusercontent.com/3050060/89631114-9e465d80-d8a0-11ea-96ba-1d6926c8e7a9.png) ![Screenshot from 2020-08-07 11-19-41](https://user-images.githubusercontent.com/3050060/89631117-9edef400-d8a0-11ea-9c66-0df3d8c1ac2d.png) I didn't add a border for the light theme though, as I felt it as unnecessary. r? @Manishearth
2020-08-10Add help buttonGuillaume Gomez-11/+26
2020-08-09Rename "Important traits" to "Notable traits"Camelid-19/+19
* Rename it in the UI * Rename the CSS classes
2020-08-07Only add a border for the rust logoGuillaume Gomez-6/+12
2020-07-28ayu theme: Change doccomment color to `#a1ac88`Lzu Tao-3/+2
Co-authored-by: Cldfire <cldfire@3grid.net>
2020-07-26Don't italicize comments in ayu themeJarek Samic-1/+0