]>
git.proxmox.com Git - rustc.git/blob - src/librustdoc/html/static_files.rs
1 //! Static files bundled with documentation output.
3 //! All the static files are included here for centralized access in case anything other than the
4 //! HTML rendering code (say, the theme checker) needs to access one of these files.
6 //! Note about types: CSS and JavaScript files are included as `&'static str` to allow for the
7 //! minifier to run on them. All other files are included as `&'static [u8]` so they can be
8 //! directly written to a `Write` handle.
10 /// The file contents of the main `rustdoc.css` file, responsible for the core layout of the page.
11 crate static RUSTDOC_CSS
: &str = include_str
!("static/rustdoc.css");
13 /// The file contents of `settings.css`, responsible for the items on the settings page.
14 crate static SETTINGS_CSS
: &str = include_str
!("static/settings.css");
16 /// The file contents of the `noscript.css` file, used in case JS isn't supported or is disabled.
17 crate static NOSCRIPT_CSS
: &str = include_str
!("static/noscript.css");
19 /// The file contents of `normalize.css`, included to even out standard elements between browser
21 crate static NORMALIZE_CSS
: &str = include_str
!("static/normalize.css");
23 /// The file contents of `main.js`, which contains the core JavaScript used on documentation pages,
24 /// including search behavior and docblock folding, among others.
25 crate static MAIN_JS
: &str = include_str
!("static/main.js");
27 /// The file contents of `settings.js`, which contains the JavaScript used to handle the settings
29 crate static SETTINGS_JS
: &str = include_str
!("static/settings.js");
31 /// The file contents of `storage.js`, which contains functionality related to browser Local
32 /// Storage, used to store documentation settings.
33 crate static STORAGE_JS
: &str = include_str
!("static/storage.js");
35 /// The file contents of `brush.svg`, the icon used for the theme-switch button.
36 crate static BRUSH_SVG
: &[u8] = include_bytes
!("static/brush.svg");
38 /// The file contents of `wheel.svg`, the icon used for the settings button.
39 crate static WHEEL_SVG
: &[u8] = include_bytes
!("static/wheel.svg");
41 /// The file contents of `down-arrow.svg`, the icon used for the crate choice combobox.
42 crate static DOWN_ARROW_SVG
: &[u8] = include_bytes
!("static/down-arrow.svg");
44 /// The contents of `COPYRIGHT.txt`, the license listing for files distributed with documentation
46 crate static COPYRIGHT
: &[u8] = include_bytes
!("static/COPYRIGHT.txt");
48 /// The contents of `LICENSE-APACHE.txt`, the text of the Apache License, version 2.0.
49 crate static LICENSE_APACHE
: &[u8] = include_bytes
!("static/LICENSE-APACHE.txt");
51 /// The contents of `LICENSE-MIT.txt`, the text of the MIT License.
52 crate static LICENSE_MIT
: &[u8] = include_bytes
!("static/LICENSE-MIT.txt");
54 /// The contents of `rust-logo.png`, the default icon of the documentation.
55 crate static RUST_LOGO
: &[u8] = include_bytes
!("static/rust-logo.png");
56 /// The default documentation favicons (SVG and PNG fallbacks)
57 crate static RUST_FAVICON_SVG
: &[u8] = include_bytes
!("static/favicon.svg");
58 crate static RUST_FAVICON_PNG_16
: &[u8] = include_bytes
!("static/favicon-16x16.png");
59 crate static RUST_FAVICON_PNG_32
: &[u8] = include_bytes
!("static/favicon-32x32.png");
61 /// The built-in themes given to every documentation site.
63 /// The "light" theme, selected by default when no setting is available. Used as the basis for
64 /// the `--check-theme` functionality.
65 crate static LIGHT
: &str = include_str
!("static/themes/light.css");
68 crate static DARK
: &str = include_str
!("static/themes/dark.css");
71 crate static AYU
: &str = include_str
!("static/themes/ayu.css");
74 /// Files related to the Fira Sans font.
76 /// The file `FiraSans-Regular.woff`, the Regular variant of the Fira Sans font.
77 crate static REGULAR
: &[u8] = include_bytes
!("static/FiraSans-Regular.woff");
79 /// The file `FiraSans-Regular.woff2`, the Regular variant of the Fira Sans font in woff2.
80 crate static REGULAR2
: &[u8] = include_bytes
!("static/FiraSans-Regular.woff2");
82 /// The file `FiraSans-Medium.woff`, the Medium variant of the Fira Sans font.
83 crate static MEDIUM
: &[u8] = include_bytes
!("static/FiraSans-Medium.woff");
85 /// The file `FiraSans-Medium.woff2`, the Medium variant of the Fira Sans font in woff2.
86 crate static MEDIUM2
: &[u8] = include_bytes
!("static/FiraSans-Medium.woff2");
88 /// The file `FiraSans-LICENSE.txt`, the license text for the Fira Sans font.
89 crate static LICENSE
: &[u8] = include_bytes
!("static/FiraSans-LICENSE.txt");
92 /// Files related to the Source Serif Pro font.
93 crate mod source_serif_pro
{
94 /// The file `SourceSerifPro-Regular.ttf.woff`, the Regular variant of the Source Serif Pro
96 crate static REGULAR
: &[u8] = include_bytes
!("static/SourceSerifPro-Regular.ttf.woff");
98 /// The file `SourceSerifPro-Bold.ttf.woff`, the Bold variant of the Source Serif Pro font.
99 crate static BOLD
: &[u8] = include_bytes
!("static/SourceSerifPro-Bold.ttf.woff");
101 /// The file `SourceSerifPro-It.ttf.woff`, the Italic variant of the Source Serif Pro font.
102 crate static ITALIC
: &[u8] = include_bytes
!("static/SourceSerifPro-It.ttf.woff");
104 /// The file `SourceSerifPro-LICENSE.txt`, the license text for the Source Serif Pro font.
105 crate static LICENSE
: &[u8] = include_bytes
!("static/SourceSerifPro-LICENSE.md");
108 /// Files related to the Source Code Pro font.
109 crate mod source_code_pro
{
110 /// The file `SourceCodePro-Regular.woff`, the Regular variant of the Source Code Pro font.
111 crate static REGULAR
: &[u8] = include_bytes
!("static/SourceCodePro-Regular.woff");
113 /// The file `SourceCodePro-Semibold.woff`, the Semibold variant of the Source Code Pro font.
114 crate static SEMIBOLD
: &[u8] = include_bytes
!("static/SourceCodePro-Semibold.woff");
116 /// The file `SourceCodePro-LICENSE.txt`, the license text of the Source Code Pro font.
117 crate static LICENSE
: &[u8] = include_bytes
!("static/SourceCodePro-LICENSE.txt");
120 /// Files related to the sidebar in rustdoc sources.
122 /// File script to handle sidebar.
123 crate static SOURCE_SCRIPT
: &str = include_str
!("static/source-script.js");