diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:21 +0000 |
commit | 4e8199b572f2035b7749cba276ece3a26630d23e (patch) | |
tree | f09feeed6a0fe39d027b1908aa63ea6b35e4b631 /src/librustdoc/html/templates | |
parent | Adding upstream version 1.66.0+dfsg1. (diff) | |
download | rustc-4e8199b572f2035b7749cba276ece3a26630d23e.tar.xz rustc-4e8199b572f2035b7749cba276ece3a26630d23e.zip |
Adding upstream version 1.67.1+dfsg1.upstream/1.67.1+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/librustdoc/html/templates')
-rw-r--r-- | src/librustdoc/html/templates/page.html | 57 | ||||
-rw-r--r-- | src/librustdoc/html/templates/print_item.html | 8 |
2 files changed, 33 insertions, 32 deletions
diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index c32386916..aa3bf827d 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -7,48 +7,44 @@ <meta name="description" content="{{page.description}}"> {#- -#} <meta name="keywords" content="{{page.keywords}}"> {#- -#} <title>{{page.title}}</title> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}SourceSerif4-Regular.ttf.woff2"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}FiraSans-Regular.woff2"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}FiraSans-Medium.woff2"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}SourceCodePro-Regular.ttf.woff2"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}SourceSerif4-Bold.ttf.woff2"> {#- -#} - <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}SourceCodePro-Semibold.ttf.woff2"> {#- -#} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_regular}}"> {#- -#} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_regular}}"> {#- -#} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.fira_sans_medium}}"> {#- -#} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_regular}}"> {#- -#} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_serif_4_bold}}"> {#- -#} + <link rel="preload" as="font" type="font/woff2" crossorigin href="{{static_root_path|safe}}{{files.source_code_pro_semibold}}"> {#- -#} <link rel="stylesheet" {# -#} - href="{{static_root_path|safe}}normalize{{page.resource_suffix}}.css"> {#- -#} + href="{{static_root_path|safe}}{{files.normalize_css}}"> {#- -#} <link rel="stylesheet" {# -#} - href="{{static_root_path|safe}}rustdoc{{page.resource_suffix}}.css" {# -#} + href="{{static_root_path|safe}}{{files.rustdoc_css}}" {# -#} id="mainThemeStyle"> {#- -#} + <link rel="stylesheet" id="themeStyle" href="{{static_root_path|safe}}{{files.theme_light_css}}"> {#- -#} + <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_dark_css}}"> {#- -#} + <link rel="stylesheet" disabled href="{{static_root_path|safe}}{{files.theme_ayu_css}}"> {#- -#} {%- for theme in themes -%} - <link rel="stylesheet" {# -#} - href="{{static_root_path|safe}}{{theme}}{{page.resource_suffix}}.css" {# -#} - {%- if theme == "light" -%} - id="themeStyle" - {%- else -%} - disabled - {%- endif -%} - > + <link rel="stylesheet" disabled href="{{page.root_path|safe}}{{theme}}{{page.resource_suffix}}.css"> {#- -#} {%- endfor -%} <script id="default-settings" {# -#} {% for (k, v) in layout.default_settings %} data-{{k}}="{{v}}" {%- endfor -%} ></script> {#- -#} - <script src="{{static_root_path|safe}}storage{{page.resource_suffix}}.js"></script> {#- -#} + <script src="{{static_root_path|safe}}{{files.storage_js}}"></script> {#- -#} {%- if page.css_class.contains("crate") -%} <script defer src="{{page.root_path|safe}}crates{{page.resource_suffix}}.js"></script> {#- -#} {%- else if page.css_class == "source" -%} - <script defer src="{{static_root_path|safe}}source-script{{page.resource_suffix}}.js"></script> {#- -#} + <script defer src="{{static_root_path|safe}}{{files.source_script_js}}"></script> {#- -#} <script defer src="{{page.root_path|safe}}source-files{{page.resource_suffix}}.js"></script> {#- -#} {%- else if !page.css_class.contains("mod") -%} <script defer src="sidebar-items{{page.resource_suffix}}.js"></script> {#- -#} {%- endif -%} - <script defer src="{{static_root_path|safe}}main{{page.resource_suffix}}.js"></script> {#- -#} + <script defer src="{{static_root_path|safe}}{{files.main_js}}"></script> {#- -#} {%- if layout.scrape_examples_extension -%} - <script defer src="{{page.root_path|safe}}scrape-examples{{page.resource_suffix}}.js"></script> {#- -#} + <script defer src="{{static_root_path|safe}}{{files.scrape_examples_js}}"></script> {#- -#} {%- endif -%} <noscript> {#- -#} <link rel="stylesheet" {# -#} - href="{{static_root_path|safe}}noscript{{page.resource_suffix}}.css"> {#- -#} + href="{{static_root_path|safe}}{{files.noscript_css}}"> {#- -#} </noscript> {#- -#} {%- if layout.css_file_extension.is_some() -%} <link rel="stylesheet" {# -#} @@ -58,11 +54,11 @@ <link rel="icon" href="{{layout.favicon}}"> {#- -#} {%- else -%} <link rel="alternate icon" type="image/png" {# -#} - href="{{static_root_path|safe}}favicon-16x16{{page.resource_suffix}}.png"> {#- -#} + href="{{static_root_path|safe}}{{files.rust_favicon_png_16}}"> {#- -#} <link rel="alternate icon" type="image/png" {# -#} - href="{{static_root_path|safe}}favicon-32x32{{page.resource_suffix}}.png"> {#- -#} + href="{{static_root_path|safe}}{{files.rust_favicon_png_32}}"> {#- -#} <link rel="icon" type="image/svg+xml" {# -#} - href="{{static_root_path|safe}}favicon{{page.resource_suffix}}.svg"> {#- -#} + href="{{static_root_path|safe}}{{files.rust_favicon_svg}}"> {#- -#} {%- endif -%} {{- layout.external_html.in_header|safe -}} </head> {#- -#} @@ -81,7 +77,7 @@ {%- if !layout.logo.is_empty() -%} <img src="{{layout.logo}}" alt="logo"> {#- -#} {%- else -%} - <img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#} + <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#} {%- endif -%} </div> {#- -#} </a> {#- -#} @@ -95,7 +91,7 @@ {%- if !layout.logo.is_empty() %} <img src="{{layout.logo}}" alt="logo"> {#- -#} {%- else -%} - <img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#} + <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#} {%- endif -%} </div> {#- -#} </a> {#- -#} @@ -110,7 +106,7 @@ {%- if !layout.logo.is_empty() %} <img src="{{layout.logo}}" alt="logo"> {#- -#} {%- else -%} - <img class="rust-logo" src="{{static_root_path|safe}}rust-logo{{page.resource_suffix}}.svg" alt="logo"> {#- -#} + <img class="rust-logo" src="{{static_root_path|safe}}{{files.rust_logo_svg}}" alt="logo"> {#- -#} {%- endif -%} </a> {#- -#} {%- endif -%} @@ -119,6 +115,7 @@ <input {# -#} class="search-input" {# -#} name="search" {# -#} + aria-label="Run search in the documentation" {# -#} autocomplete="off" {# -#} spellcheck="false" {# -#} placeholder="Click or press ‘S’ to search, ‘?’ for more options…" {# -#} @@ -129,7 +126,7 @@ <div id="settings-menu" tabindex="-1"> {#- -#} <a href="{{page.root_path|safe}}settings.html" title="settings"> {#- -#} <img width="22" height="22" alt="Change settings" {# -#} - src="{{static_root_path|safe}}wheel{{page.resource_suffix}}.svg"> {#- -#} + src="{{static_root_path|safe}}{{files.wheel_svg}}"> {#- -#} </a> {#- -#} </div> {#- -#} </form> {#- -#} @@ -140,10 +137,14 @@ {{- layout.external_html.after_content|safe -}} <div id="rustdoc-vars" {# -#} data-root-path="{{page.root_path|safe}}" {# -#} + data-static-root-path="{{static_root_path|safe}}" {# -#} data-current-crate="{{layout.krate}}" {# -#} data-themes="{{themes|join(",") }}" {# -#} data-resource-suffix="{{page.resource_suffix}}" {# -#} data-rustdoc-version="{{rustdoc_version}}" {# -#} + data-search-js="{{files.search_js}}" {# -#} + data-settings-js="{{files.settings_js}}" {# -#} + data-settings-css="{{files.settings_css}}" {# -#} > {#- -#} </div> {#- -#} </body> {#- -#} diff --git a/src/librustdoc/html/templates/print_item.html b/src/librustdoc/html/templates/print_item.html index b6ce3ea3d..611d124d4 100644 --- a/src/librustdoc/html/templates/print_item.html +++ b/src/librustdoc/html/templates/print_item.html @@ -7,7 +7,7 @@ {%- endfor -%} <a class="{{item_type}}" href="#">{{name}}</a> {#- -#} <button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"> {#- -#} - <img src="{{static_root_path|safe}}clipboard{{page.resource_suffix}}.svg" {# -#} + <img src="{{static_root_path|safe}}{{clipboard_svg}}" {# -#} width="19" height="18" {# -#} alt="Copy item path"> {#- -#} </button> {#- -#} @@ -21,8 +21,8 @@ <a class="srclink" href="{{href|safe}}">source</a> · {# -#} {%- else -%} {%- endmatch -%} - <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> {#- -#} - [<span class="inner">−</span>] {#- -#} - </a> {#- -#} + <button id="toggle-all-docs" title="collapse all docs"> {#- -#} + [<span>−</span>] {#- -#} + </button> {#- -#} </span> {#- -#} </div> {#- -#} |