Commit graph

46 commits

Author SHA1 Message Date
Loïc BRANSTETT
bc6b199588 Use the updated Rust logo and change it's format to SVG 2022-01-13 14:44:30 +01:00
Shinwoo Park
9e00501c1c rustdoc: use ttf based font for cjk glyphs 2021-10-26 10:58:13 +09:00
Matthias Krüger
dcf9242795
Rollup merge of #85833 - willcrichton:example-analyzer, r=jyn514
Scrape code examples from examples/ directory for Rustdoc

Adds support for the functionality described in https://github.com/rust-lang/rfcs/pull/3123

Matching changes to Cargo are here: https://github.com/rust-lang/cargo/pull/9525

Live demo here: https://willcrichton.net/example-analyzer/warp/trait.Filter.html#method.and
2021-10-23 14:58:39 +02:00
Shinwoo Park
d2564ce5a9 rustdoc: update noto sans kr 2021-10-12 04:47:34 +09:00
Jacob Hoffman-Andrews
586a9cea75 Move template initialization into its own file. 2021-10-08 23:28:42 -07:00
Jacob Hoffman-Andrews
7a938005e1 Add template for print_item
Add print_item.html and the code in print_item.rs to use it.
2021-10-08 23:02:12 -07:00
Will Crichton
25323ec306 Move JS into a standalone file 2021-10-06 19:45:26 -07:00
Guillaume Gomez
6fe09722ea Simplify usage of CSS background-image 2021-08-03 20:03:07 +02:00
Michael Howell
c58246efe4 Rustdoc accessibility: use an icon for the [-]/[+] controls
This way, we can show the plus and minus buttons on screens, while voice
control will read off actual words "Collapse" and "Expand" instead of reading
"open brace minus close brace" and "open brace plus close brace".

Part of #87059
2021-08-03 14:35:38 +02:00
Guillaume Gomez
e5c24ba400 Clean up rustdoc static files 2021-07-07 17:52:18 +02:00
Yuki Okushi
fd96d55426
Rollup merge of #86402 - tspiteri:source-woff2, r=jsha
rustdoc: add optional woff2 versions of Source Serif and Source Code

This provides woff2 versions of Source Serif and Source Code similar to how #82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
2021-06-22 20:01:01 +09:00
Jacob Hoffman-Andrews
cd0f93193c Use Tera templates for rustdoc.
Replaces a format!() call in layout::render with a template
expansion. Introduces a `templates` field in SharedContext so parts
of rustdoc can share pre-rendered templates.

This currently builds in a copy of the single template available, like
with static files. However, future work can make this live-loadable with
a perma-unstable flag, to make rustdoc developers' work easier.
2021-06-20 23:07:28 -07:00
Trevor Spiteri
1738c7864c rustdoc: add optional woff2 versions of Source Serif and Source Code 2021-06-17 17:36:42 +02:00
Guillaume Gomez
e081cd48f4 Remove unneeded file to load sidebar items at crate level 2021-05-31 10:30:36 +02:00
Yuki Okushi
0264f4fe4a
Rollup merge of #84048 - konan8205:master, r=jsha
Avoid CJK legacy fonts in Windows

As metioned in #84035, the default serif CJK font in Windows is meh-looking.
To avoid this, we should use sans-serif font or provide CJK glyph supported font in `rustdoc.css`.
2021-05-26 13:30:54 +09:00
Justus K
aaf0ff83fb
Call initSidebarItems in root module of crate 2021-05-15 19:26:36 +02:00
Shinwoo Park
fe44fde3ef chore: format code 2021-05-15 15:46:44 +09:00
Shinwoo Park
b5e09dc7a3 rustdoc: update static files 2021-05-15 14:54:49 +09:00
Guillaume Gomez
7450f70ae2 Use an SVG image for clipboard instead of unicode character 2021-05-10 16:26:16 +02:00
Jacob Hoffman-Andrews
6f1f3eb516 Update comment on search.js static file. 2021-04-14 12:17:24 -07:00
Jacob Hoffman-Andrews
276ee6f542 Move search JS into search-index.js
Export a few variables and functions into the global scope because they
are needed both by main.js and search-index.js.
2021-04-12 22:52:16 -07:00
Trevor Spiteri
29fed9aa4e Update Source Serif to release 4.004
Now the family name is Source Serif 4 (upstream issue 77) instead of
Source Serif Pro.
2021-04-05 10:48:08 +02:00
Trevor Spiteri
87d17bb9e8 Update Source Code Pro and include italics 2021-03-07 09:13:27 +01:00
Jacob Hoffman-Andrews
ad7ed13eab Embed woff2 files in rustdoc binary. 2021-02-26 00:38:05 -08:00
Joshua Nelson
d6c16e4253 Make all rustdoc functions and structs crate-private
This gives warnings about dead code.
2020-11-15 11:21:12 -05:00
Jarek Samic
085679c841 Use theme-adaptive SVG favicon from other Rust sites 2020-09-23 21:31:27 -04:00
Jarek Samic
8c45cf8e60 Add Ayu theme to rustdoc 2020-07-12 14:48:13 -04:00
Matthias Krüger
0d7faaf6bd rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes) 2020-03-07 21:48:17 +01:00
Guillaume Gomez
d0b67ddc0f Revert "Update Source Code Pro and include italics"
This reverts commit ea9519bf16.
2019-11-21 11:18:23 +01:00
Mazdak Farrokhzad
423137b779
Rollup merge of #65665 - tspiteri:italic-and-update-SourceCodePro, r=GuillaumeGomez
Update Source Code Pro and include italics

Fixes #65502.

A few notes:
  * As stated in #65502, this does increase the download size.
  * Since this PR changes the font set, I think docs.rs would have to be updated if this PR is merged.
  * The fonts have a double extension (.ttf.woff); this is to keep the names consistent with the upstream font release which does that to distinguish these from the .otf.woff files ([Source Code Pro otf renders poorly on older Windows system apps](https://github.com/adobe-fonts/source-code-pro/issues/25#issuecomment-9019600)).
2019-11-20 12:58:26 +01:00
Guillaume Gomez
8f9014d98f Rename rustdoc options --themes and --check-themes to --theme and --check-theme 2019-11-18 16:43:48 +01:00
Guillaume Gomez
7cbf31aa04 rename check-theme option into check-themes 2019-11-18 16:43:48 +01:00
Guillaume Gomez
8f44c604d2 Rename theme-checker option to check-theme 2019-11-18 16:43:48 +01:00
Trevor Spiteri
ea9519bf16 Update Source Code Pro and include italics 2019-10-21 16:25:03 +02:00
Manish Goregaokar
7aab005341 Revert "Update Source Code Pro fonts to version 2.030"
This reverts commit 6bafc58ced.
2019-04-29 14:15:28 -07:00
Manish Goregaokar
6bafc58ced Update Source Code Pro fonts to version 2.030
Pulled in from https://github.com/adobe-fonts/source-code-pro/
2019-04-20 20:50:33 -07:00
Manish Goregaokar
e14819ac03 Update Source Serif Pro fonts to version 2.010
Pulled in from https://github.com/adobe-fonts/source-serif-pro/

See https://bugzilla.mozilla.org/show_bug.cgi?id=1545317
2019-04-20 20:50:33 -07: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
Trevor Spiteri
d2ac094c99 Update static files code for updated Source Serif Pro font 2019-01-07 14:27:50 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07: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
afe41078ad Add arrow to the crate select box 2018-11-29 01:29:49 +01:00
Guillaume Gomez
e87f8cc49b Source sidebar improvements 2018-11-24 09:49:57 +01:00
QuietMisdreavus
2f8ce732e1 move all static-file include!s into a single module 2018-11-10 16:05:29 -06:00