]> git.proxmox.com Git - rustc.git/blob - src/librustdoc/html/templates/page.html
New upstream version 1.66.0+dfsg1
[rustc.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}}SourceSerif4-Regular.ttf.woff2"> {#- -#}
11 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}FiraSans-Regular.woff2"> {#- -#}
12 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}FiraSans-Medium.woff2"> {#- -#}
13 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}SourceCodePro-Regular.ttf.woff2"> {#- -#}
14 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}SourceSerif4-Bold.ttf.woff2"> {#- -#}
15 <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}SourceCodePro-Semibold.ttf.woff2"> {#- -#}
16 <link rel="stylesheet" {# -#}
17 href="{{static_root_path|safe}}normalize{{page.resource_suffix}}.css"> {#- -#}
18 <link rel="stylesheet" {# -#}
19 href="{{static_root_path|safe}}rustdoc{{page.resource_suffix}}.css" {# -#}
20 id="mainThemeStyle"> {#- -#}
21 {%- for theme in themes -%}
22 <link rel="stylesheet" {# -#}
23 href="{{static_root_path|safe}}{{theme}}{{page.resource_suffix}}.css" {# -#}
24 {%- if theme == "light" -%}
25 id="themeStyle"
26 {%- else -%}
27 disabled
28 {%- endif -%}
29 >
30 {%- endfor -%}
31 <script id="default-settings" {# -#}
32 {% for (k, v) in layout.default_settings %}
33 data-{{k}}="{{v}}"
34 {%- endfor -%}
35 ></script> {#- -#}
36 <script src="{{static_root_path|safe}}storage{{page.resource_suffix}}.js"></script> {#- -#}
37 {%- if page.css_class.contains("crate") -%}
38 <script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {#- -#}
39 {%- else if page.css_class == "source" -%}
40 <script defer src="{{static_root_path|safe}}source-script{{page.resource_suffix}}.js"></script> {#- -#}
41 <script defer src="{{page.root_path|safe}}source-files{{page.resource_suffix}}.js"></script> {#- -#}
42 {%- else if !page.css_class.contains("mod") -%}
43 <script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {#- -#}
44 {%- endif -%}
45 <script defer src="{{static_root_path|safe}}main{{page.resource_suffix}}.js"></script> {#- -#}
46 {%- if layout.scrape_examples_extension -%}
47 <script defer src="{{page.root_path|safe}}scrape-examples{{page.resource_suffix}}.js"></script> {#- -#}
48 {%- endif -%}
49 <noscript> {#- -#}
50 <link rel="stylesheet" {# -#}
51 href="{{static_root_path|safe}}noscript{{page.resource_suffix}}.css"> {#- -#}
52 </noscript> {#- -#}
53 {%- if layout.css_file_extension.is_some() -%}
54 <link rel="stylesheet" {# -#}
55 href="{{static_root_path|safe}}theme{{page.resource_suffix}}.css"> {#- -#}
56 {%- endif -%}
57 {%- if !layout.favicon.is_empty() -%}
58 <link rel="icon" href="{{layout.favicon}}"> {#- -#}
59 {%- else -%}
60 <link rel="alternate icon" type="image/png" {# -#}
61 href="{{static_root_path|safe}}favicon-16x16{{page.resource_suffix}}.png"> {#- -#}
62 <link rel="alternate icon" type="image/png" {# -#}
63 href="{{static_root_path|safe}}favicon-32x32{{page.resource_suffix}}.png"> {#- -#}
64 <link rel="icon" type="image/svg+xml" {# -#}
65 href="{{static_root_path|safe}}favicon{{page.resource_suffix}}.svg"> {#- -#}
66 {%- endif -%}
67 {{- layout.external_html.in_header|safe -}}
68 </head> {#- -#}
69 <body class="rustdoc {{page.css_class}}"> {#- -#}
70 <!--[if lte IE 11]> {#- -#}
71 <div class="warning"> {#- -#}
72 This old browser is unsupported and will most likely display funky things. {#- -#}
73 </div> {#- -#}
74 <![endif]--> {#- -#}
75 {{- layout.external_html.before_content|safe -}}
76 {%- if page.css_class != "source" -%}
77 <nav class="mobile-topbar"> {#- -#}
78 <button class="sidebar-menu-toggle">&#9776;</button> {#- -#}
79 <a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
80 <div class="logo-container"> {#- -#}
81 {%- if !layout.logo.is_empty() -%}
82 <img src="{{layout.logo}}" alt="logo"> {#- -#}
83 {%- else -%}
84 <img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#}
85 {%- endif -%}
86 </div> {#- -#}
87 </a> {#- -#}
88 <h2></h2> {#- -#}
89 </nav> {#- -#}
90 {%- endif -%}
91 <nav class="sidebar"> {#- -#}
92 {%- if page.css_class != "source" -%}
93 <a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
94 <div class="logo-container"> {#- -#}
95 {%- if !layout.logo.is_empty() %}
96 <img src="{{layout.logo}}" alt="logo"> {#- -#}
97 {%- else -%}
98 <img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#}
99 {%- endif -%}
100 </div> {#- -#}
101 </a> {#- -#}
102 {%- endif -%}
103 {{- sidebar|safe -}}
104 </nav> {#- -#}
105 <main> {#- -#}
106 <div class="width-limiter"> {#- -#}
107 <nav class="sub"> {#- -#}
108 {%- if page.css_class == "source" -%}
109 <a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
110 {%- if !layout.logo.is_empty() %}
111 <img src="{{layout.logo}}" alt="logo"> {#- -#}
112 {%- else -%}
113 <img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#}
114 {%- endif -%}
115 </a> {#- -#}
116 {%- endif -%}
117 <form class="search-form"> {#- -#}
118 <span></span> {#- This empty span is a hacky fix for Safari - See #93184 -#}
119 <input {# -#}
120 class="search-input" {# -#}
121 name="search" {# -#}
122 autocomplete="off" {# -#}
123 spellcheck="false" {# -#}
124 placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#}
125 type="search"> {#- -#}
126 <div id="help-button" title="help" tabindex="-1"> {#- -#}
127 <a href="{{page.root_path|safe}}help.html">?</a> {#- -#}
128 </div> {#- -#}
129 <div id="settings-menu" tabindex="-1"> {#- -#}
130 <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#}
131 <img width="22" height="22" alt="Change settings" {# -#}
132 src="{{static_root_path|safe}}wheel{{page.resource_suffix}}.svg"> {#- -#}
133 </a> {#- -#}
134 </div> {#- -#}
135 </form> {#- -#}
136 </nav> {#- -#}
137 <section id="main-content" class="content">{{- content|safe -}}</section> {#- -#}
138 </div> {#- -#}
139 </main> {#- -#}
140 {{- layout.external_html.after_content|safe -}}
141 <div id="rustdoc-vars" {# -#}
142 data-root-path="{{page.root_path|safe}}" {# -#}
143 data-current-crate="{{layout.krate}}" {# -#}
144 data-themes="{{themes|join(",") }}" {# -#}
145 data-resource-suffix="{{page.resource_suffix}}" {# -#}
146 data-rustdoc-version="{{rustdoc_version}}" {# -#}
147 > {#- -#}
148 </div> {#- -#}
149 </body> {#- -#}
150 </html> {#- -#}