]> git.lizzy.rs Git - rust.git/blob - src/librustdoc/html/templates/page.html
Rollup merge of #104182 - gabhijit:ipv6-in6addr-any-doc-fix, r=m-ou-se
[rust.git] / src / librustdoc / html / templates / page.html
1 <!DOCTYPE html> {#- -#}
2 <html lang="en"> {#- -#}
3 <head> {#- -#}
4     <meta charset="utf-8"> {#- -#}
5     <meta name="viewport" content="width=device-width, initial-scale=1.0"> {#- -#}
6     <meta name="generator" content="rustdoc"> {#- -#}
7     <meta name="description" content="{{page.description}}"> {#- -#}
8     <meta name="keywords" content="{{page.keywords}}"> {#- -#}
9     <title>{{page.title}}</title> {#- -#}
10     <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_regular}}"> {#- -#}
11     <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_regular}}"> {#- -#}
12     <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_medium}}"> {#- -#}
13     <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_regular}}"> {#- -#}
14     <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_bold}}"> {#- -#}
15     <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_semibold}}"> {#- -#}
16     <link rel="stylesheet" {# -#}
17           href="{{static_root_path|safe}}{{files.normalize_css}}"> {#- -#}
18     <link rel="stylesheet" {# -#}
19           href="{{static_root_path|safe}}{{files.rustdoc_css}}" {# -#}
20           id="mainThemeStyle"> {#- -#}
21     <link rel="stylesheet" id="themeStyle" href="{{static_root_path|safe}}{{files.theme_light_css}}"> {#- -#}
22     <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_dark_css}}"> {#- -#}
23     <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_ayu_css}}"> {#- -#}
24     {%- for theme in themes -%}
25         <link rel="stylesheet" disabled href="{{page.root_path|safe}}{{theme}}{{page.resource_suffix}}.css"> {#- -#}
26     {%- endfor -%}
27     <script id="default-settings" {# -#}
28       {% for (k, v) in layout.default_settings %}
29         data-{{k}}="{{v}}"
30       {%- endfor -%}
31     ></script> {#- -#}
32     <script src="{{static_root_path|safe}}{{files.storage_js}}"></script> {#- -#}
33     {%- if page.css_class.contains("crate") -%}
34     <script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {#- -#}
35     {%- else if page.css_class == "source" -%}
36     <script defer src="{{static_root_path|safe}}{{files.source_script_js}}"></script> {#- -#}
37     <script defer src="{{page.root_path|safe}}source-files{{page.resource_suffix}}.js"></script> {#- -#}
38     {%- else if !page.css_class.contains("mod") -%}
39     <script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {#- -#}
40     {%- endif -%}
41     <script defer src="{{static_root_path|safe}}{{files.main_js}}"></script> {#- -#}
42     {%- if layout.scrape_examples_extension -%}
43     <script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {#- -#}
44     {%- endif -%}
45     <noscript> {#- -#}
46         <link rel="stylesheet" {# -#}
47            href="{{static_root_path|safe}}{{files.noscript_css}}"> {#- -#}
48     </noscript> {#- -#}
49     {%- if layout.css_file_extension.is_some() -%}
50         <link rel="stylesheet" {# -#}
51             href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {#- -#}
52     {%- endif -%}
53     {%- if !layout.favicon.is_empty() -%}
54         <link rel="icon" href="{{layout.favicon}}"> {#- -#}
55     {%- else -%}
56         <link rel="alternate icon" type="image/png" {# -#}
57             href="{{static_root_path|safe}}{{files.rust_favicon_png_16}}"> {#- -#}
58         <link rel="alternate icon" type="image/png" {# -#}
59             href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {#- -#}
60         <link rel="icon" type="image/svg+xml" {# -#}
61             href="{{static_root_path|safe}}{{files.rust_favicon_svg}}"> {#- -#}
62     {%- endif -%}
63     {{- layout.external_html.in_header|safe -}}
64 </head> {#- -#}
65 <body class="rustdoc {{page.css_class}}"> {#- -#}
66     <!--[if lte IE 11]> {#- -#}
67     <div class="warning"> {#- -#}
68         This old browser is unsupported and will most likely display funky things. {#- -#}
69     </div> {#- -#}
70     <![endif]--> {#- -#}
71     {{- layout.external_html.before_content|safe -}}
72     {%- if page.css_class != "source" -%}
73     <nav class="mobile-topbar"> {#- -#}
74         <button class="sidebar-menu-toggle">&#9776;</button> {#- -#}
75         <a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
76             <div class="logo-container"> {#- -#}
77             {%- if !layout.logo.is_empty() -%}
78                 <img src="{{layout.logo}}" alt="logo"> {#- -#}
79             {%- else -%}
80                 <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
81             {%- endif -%}
82             </div> {#- -#}
83         </a> {#- -#}
84         <h2></h2> {#- -#}
85     </nav> {#- -#}
86     {%- endif -%}
87     <nav class="sidebar"> {#- -#}
88         {%- if page.css_class != "source" -%}
89         <a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
90             <div class="logo-container"> {#- -#}
91                 {%- if !layout.logo.is_empty()  %}
92                     <img src="{{layout.logo}}" alt="logo"> {#- -#}
93                 {%- else -%}
94                     <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
95                 {%- endif -%}
96             </div> {#- -#}
97         </a> {#- -#}
98         {%- endif -%}
99         {{- sidebar|safe -}}
100     </nav> {#- -#}
101     <main> {#- -#}
102         {%- if page.css_class != "source" -%}<div class="width-limiter">{%- endif -%}
103             <nav class="sub"> {#- -#}
104                 {%- if page.css_class == "source" -%}
105                 <a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
106                     {%- if !layout.logo.is_empty()  %}
107                         <img src="{{layout.logo}}" alt="logo"> {#- -#}
108                     {%- else -%}
109                         <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#}
110                     {%- endif -%}
111                 </a> {#- -#}
112                 {%- endif -%}
113                 <form class="search-form"> {#- -#}
114                     <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#}
115                     <input {# -#}
116                         class="search-input" {# -#}
117                         name="search" {# -#}
118                         aria-label="Run search in the documentation" {# -#}
119                         autocomplete="off" {# -#}
120                         spellcheck="false" {# -#}
121                         placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#}
122                         type="search"> {#- -#}
123                     <div id="help-button" title="help" tabindex="-1"> {#- -#}
124                         <a href="{{page.root_path|safe}}help.html">?</a> {#- -#}
125                     </div> {#- -#}
126                     <div id="settings-menu" tabindex="-1"> {#- -#}
127                         <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#}
128                             <img width="22" height="22" alt="Change settings" {# -#}
129                             src="{{static_root_path|safe}}{{files.wheel_svg}}"> {#- -#}
130                         </a> {#- -#}
131                     </div> {#- -#}
132                 </form> {#- -#}
133             </nav> {#- -#}
134             <section id="main-content" class="content">{{- content|safe -}}</section> {#- -#}
135         {%- if page.css_class != "source" -%}</div>{%- endif -%}
136     </main> {#- -#}
137     {{- layout.external_html.after_content|safe -}}
138     <div id="rustdoc-vars" {# -#}
139          data-root-path="{{page.root_path|safe}}" {# -#}
140          data-static-root-path="{{static_root_path|safe}}" {# -#}
141          data-current-crate="{{layout.krate}}" {# -#}
142          data-themes="{{themes|join(",") }}" {# -#}
143          data-resource-suffix="{{page.resource_suffix}}" {# -#}
144          data-rustdoc-version="{{rustdoc_version}}" {# -#}
145          data-search-js="{{files.search_js}}" {# -#}
146          data-settings-js="{{files.settings_js}}" {# -#}
147          data-settings-css="{{files.settings_css}}" {# -#}
148     > {#- -#}
149     </div> {#- -#}
150 </body> {#- -#}
151 </html> {#- -#}