1
Fork 0
Commit graph

130 commits

Author SHA1 Message Date
Guillaume Gomez
c9a48d1d73 Fix strings indent 2020-08-31 13:16:50 +02:00
Dylan DPC
51ed33d8c2
Rollup merge of #75366 - GuillaumeGomez:help-button, r=jyn514
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-11 01:56:43 +02:00
Guillaume Gomez
a34bc7961a Add help button 2020-08-10 16:52:19 +02:00
Guillaume Gomez
48a6c2125b Only add a border for the rust logo 2020-08-07 11:19:07 +02:00
Jarek Samic
0e89f50f6e Clean up handling of style files in rustdoc
Disable all themes other than `light.css` to prevent rule conflicts
2020-07-12 14:37:22 -04:00
Guillaume Gomez
f581cf7544 Merge aliases and search-index 2020-05-07 20:08:08 +02:00
Mark Rousskov
a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Mazdak Farrokhzad
00cbc75c74
Rollup merge of #66298 - Ppjet6:disable-search-field, r=GuillaumeGomez
rustdoc: fixes #64305: disable search field instead of hidding it

The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all.

@GuillaumeGomez

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-11-20 18:32:06 +01:00
Maxime “pep” Buquet
5cbd406a14 rustdoc: fixes #64305: disable search field instead of hidding it
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-11-20 11:32:58 +01:00
Guillaume Gomez
530d866aef Apply review comments 2019-11-18 16:43:48 +01:00
Guillaume Gomez
91ef9600db reduce size of generated HTML files by moving the popup helper code to the JS 2019-10-27 11:42:38 +01:00
Guillaume Gomez
1f25fd74a0 Add more information on search 2019-10-26 12:59:54 +02:00
Mark Rousskov
e0e0c3787c Replace SlashChecker with ensure_trailing_slash 2019-09-13 19:44:44 -04:00
Mark Rousskov
3f0e77f19c layout::render takes Print instead of fmt::Display 2019-09-07 19:31:58 -04:00
Mark Rousskov
f4a15ae3b2 Implement Print for FnOnce(&mut Buffer)
This means that callers can pass in a closure like
`|buf| some_function(..., &mut buf)` and pass in arbitrary arguments to
that function without complicating the trait definition. We also keep
the impl for str and String, since it's useful to be able to just pass
in "" or format!("{}"...) results in some cases.

This changes Print's definition to take self, instead of &self, because
otherwise FnOnce cannot be called directly. We could instead take FnMut
or even Fn, but that seems like it'd merely complicate matters -- most
of the time, the FnOnce does not constrain us at all anyway. If it does,
a custom Print impl for &'_ SomeStruct is not all that painful.
2019-09-07 19:31:58 -04:00
Mark Rousskov
f8bccb1658 Move sidebar to Buffer-printing 2019-09-07 19:31:58 -04:00
Mark Rousskov
04dc72eeef Remove unnecessary Buffer in layout::render 2019-09-07 19:31:58 -04:00
Mark Rousskov
57243b74b1 Move constant parameters to render to Layout struct 2019-09-07 19:31:58 -04:00
Mark Rousskov
9e52ba94fa Create buffers in top-level rendering
This avoids needlessly creating and threading the buffers through when
we only use them once.
2019-09-07 19:31:58 -04:00
Mark Rousskov
eebd0265c3 Migrate top-level rendering to Buffer 2019-09-07 19:31:58 -04:00
Guillaume Gomez
9db0fd7fd6 Fix image position and display 2019-04-29 13:27:02 +02:00
Jakob Ståhl
184e3a3f92 Wrap logo in container to prevent layout reflow 2019-04-29 10:38:58 +02:00
Jakob Ståhl
f998182fb4 Revert "Explicitly set height on rust logo <img> element in docs"
This reverts commit d79a01b72f4722611cb21b719e6243aad3e7ec3c.
2019-04-29 10:38:58 +02:00
Jakob Ståhl
5a3625d426 Explicitly set height on rust logo <img> element in docs
The layout of the left side menu in docs reflows when navigating between pages because of missing height on the <img> element of rust logo.

Setting height='100' tells the browser to reserve that vertical space, leading to a less janky experience.
2019-04-29 10:38:58 +02:00
Guillaume Gomez
4f28431e39 Apply resource-suffix to search-index and source-files scripts as well 2019-04-12 19:30:37 +02:00
Hirokazu Hata
1932d7a52d Transition librustdoc to 2018 edition 2019-02-23 16:40:07 +09:00
Guillaume Gomez
5cf20ca3c5 Fix image link in the settings menu 2019-02-01 11:27:59 +01:00
Guillaume Gomez
b5d167f58a Add default favicon for documentation 2019-01-20 21:47:43 +01:00
Guillaume Gomez
2200fd3c7c Add default rust logo for documentation 2019-01-20 18:53:56 +01:00
bors
43d26b1f35 Auto merge of #57006 - GuillaumeGomez:no-crate-filter, r=QuietMisdreavus
Add no-crate filter option on rustdoc

@onur asked me about it so here it is!

r? @QuietMisdreavus
2018-12-29 01:22:04 +00:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Guillaume Gomez
dbcf68951c Add no-crate filter option on rustdoc 2018-12-24 18:19:36 +01:00
QuietMisdreavus
8dc8d7ac51 split extra_scripts to handle root_path shenanigans 2018-12-20 10:57:03 -06:00
QuietMisdreavus
0b0a00cc05 new --static-root-path flag for controlling static file locations 2018-12-20 10:18:45 -06:00
bors
7f04a646c6 Auto merge of #56005 - GuillaumeGomez:speedup-doc-render, r=QuietMisdreavus
Greatly improve rustdoc rendering speed issues

Fixes #55900.

So a few improvements here:

* we're switching to `DOMTokenList` API when available providing a replacement if it isn't (should only happen on safari and IE I think...)
* hide doc sections by default to allow the whole HTML generation to happen in the background to avoid triggering DOM redraw all the times (which killed the performances)

r? @QuietMisdreavus
2018-12-15 06:42:27 +00:00
Alexander Regueiro
ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
Guillaume Gomez
e17518f65e Show everything when noscript is on 2018-12-06 23:34:36 +01:00
Pietro Albini
a88feabac4
Rollup merge of #56332 - GuillaumeGomez:specifi-crate-search, r=QuietMisdreavus
[rustdoc] Specific crate search

Reopening of #54706.
Fixes #54616.

<img width="1440" alt="screenshot 2018-11-29 at 01 29 11" src="https://user-images.githubusercontent.com/3050060/49191372-979adf80-f376-11e8-963e-e4feb927c1da.png">

r? @QuietMisdreavus
2018-12-06 07:48:50 +01:00
Guillaume Gomez
82a7b6fde8 Don't generate suffix for source-file.js 2018-12-03 22:37:34 +01:00
Guillaume Gomez
afe41078ad Add arrow to the crate select box 2018-11-29 01:29:49 +01:00
Guillaume Gomez
dd717deccb Add crate filtering 2018-11-28 19:33:33 +01:00
Guillaume Gomez
e87f8cc49b Source sidebar improvements 2018-11-24 09:49:57 +01:00
Guillaume Gomez
93520d2ad1 Add source file sidebar 2018-11-24 09:49:57 +01:00
Alexander Komarov
c55e1e69e3 [librustdoc] Disable spellcheck for search field 2018-10-17 23:58:21 +03:00
Matthias Krüger
ede1f7d2a5 use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into() 2018-08-23 10:14:52 +02:00
Tatsuyuki Ishi
66c4dc9769 Add missing dyn 2018-07-25 10:24:31 +09:00
Guillaume Gomez
74412d2707 fix search load page failure 2018-04-27 17:14:29 +02:00
bors
28193e873c Auto merge of #49954 - GuillaumeGomez:doc-settings, r=ollie27,QuietMisdreavus
Add rustdoc settings menu

Fixes #18167.

r? @QuietMisdreavus
2018-04-22 11:04:41 +00:00
Guillaume Gomez
57bcabc108 Generate alias file 2018-04-21 22:02:53 +02:00
Guillaume Gomez
f2ad3c3f6c Add rustdoc settings menu 2018-04-17 23:35:43 +02:00