diff --git a/.buildinfo b/.buildinfo index b48ddf93..9663e5eb 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 32f59e161a28f49cbf5596c5b7006b6c +# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 6dbe6efd81c05597f0173a9ec86106c5 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/cli.doctree b/.doctrees/cli.doctree index 9242bc01..8167b038 100644 Binary files a/.doctrees/cli.doctree and b/.doctrees/cli.doctree differ diff --git a/.doctrees/cutting.doctree b/.doctrees/cutting.doctree index 4b9341d6..f5c3d27b 100644 Binary files a/.doctrees/cutting.doctree and b/.doctrees/cutting.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 5ee4f57f..00a3dd65 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/index.doctree b/.doctrees/index.doctree index 7089fef1..b13f7699 100644 Binary files a/.doctrees/index.doctree and b/.doctrees/index.doctree differ diff --git a/.doctrees/math_ref.doctree b/.doctrees/math_ref.doctree index f0145d1a..5c46b7d3 100644 Binary files a/.doctrees/math_ref.doctree and b/.doctrees/math_ref.doctree differ diff --git a/.doctrees/quickstart.doctree b/.doctrees/quickstart.doctree index 29c70dde..b95b2cd6 100644 Binary files a/.doctrees/quickstart.doctree and b/.doctrees/quickstart.doctree differ diff --git a/.doctrees/slicing.doctree b/.doctrees/slicing.doctree index 9baa6b81..5eedfbde 100644 Binary files a/.doctrees/slicing.doctree and b/.doctrees/slicing.doctree differ diff --git a/_static/basic.css b/_static/basic.css index f316efcb..7ebbd6d0 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -1,12 +1,5 @@ /* - * basic.css - * ~~~~~~~~~ - * * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * */ /* -- main layout ----------------------------------------------------------- */ @@ -115,15 +108,11 @@ img { /* -- search page ----------------------------------------------------------- */ ul.search { - margin: 10px 0 0 20px; - padding: 0; + margin-top: 10px; } ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; + padding: 5px 0; } ul.search li a { diff --git a/_static/doctools.js b/_static/doctools.js index 4d67807d..0398ebb9 100644 --- a/_static/doctools.js +++ b/_static/doctools.js @@ -1,12 +1,5 @@ /* - * doctools.js - * ~~~~~~~~~~~ - * * Base JavaScript utilities for all Sphinx HTML documentation. - * - * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * */ "use strict"; diff --git a/_static/language_data.js b/_static/language_data.js index 367b8ed8..c7fe6c6f 100644 --- a/_static/language_data.js +++ b/_static/language_data.js @@ -1,13 +1,6 @@ /* - * language_data.js - * ~~~~~~~~~~~~~~~~ - * * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. - * - * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * */ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; diff --git a/_static/searchtools.js b/_static/searchtools.js index b08d58c9..2c774d17 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js @@ -1,12 +1,5 @@ /* - * searchtools.js - * ~~~~~~~~~~~~~~~~ - * * Sphinx JavaScript utilities for the full-text search. - * - * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * */ "use strict"; @@ -20,7 +13,7 @@ if (typeof Scorer === "undefined") { // and returns the new score. /* score: result => { - const [docname, title, anchor, descr, score, filename] = result + const [docname, title, anchor, descr, score, filename, kind] = result return score }, */ @@ -47,6 +40,14 @@ if (typeof Scorer === "undefined") { }; } +// Global search result kind enum, used by themes to style search results. +class SearchResultKind { + static get index() { return "index"; } + static get object() { return "object"; } + static get text() { return "text"; } + static get title() { return "title"; } +} + const _removeChildren = (element) => { while (element && element.lastChild) element.removeChild(element.lastChild); }; @@ -64,9 +65,13 @@ const _displayItem = (item, searchTerms, highlightTerms) => { const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; const contentRoot = document.documentElement.dataset.content_root; - const [docName, title, anchor, descr, score, _filename] = item; + const [docName, title, anchor, descr, score, _filename, kind] = item; let listItem = document.createElement("li"); + // Add a class representing the item's type: + // can be used by a theme's CSS selector for styling + // See SearchResultKind for the class names. + listItem.classList.add(`kind-${kind}`); let requestUrl; let linkUrl; if (docBuilder === "dirhtml") { @@ -115,8 +120,10 @@ const _finishSearch = (resultCount) => { "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." ); else - Search.status.innerText = _( - "Search finished, found ${resultCount} page(s) matching the search query." + Search.status.innerText = Documentation.ngettext( + "Search finished, found one page matching the search query.", + "Search finished, found ${resultCount} pages matching the search query.", + resultCount, ).replace('${resultCount}', resultCount); }; const _displayNextItem = ( @@ -138,7 +145,7 @@ const _displayNextItem = ( else _finishSearch(resultCount); }; // Helper function used by query() to order search results. -// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Each input is an array of [docname, title, anchor, descr, score, filename, kind]. // Order the results by score (in opposite order of appearance, since the // `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. const _orderResultsByScoreThenName = (a, b) => { @@ -248,6 +255,7 @@ const Search = { searchSummary.classList.add("search-summary"); searchSummary.innerText = ""; const searchList = document.createElement("ul"); + searchList.setAttribute("role", "list"); searchList.classList.add("search"); const out = document.getElementById("search-results"); @@ -318,7 +326,7 @@ const Search = { const indexEntries = Search._index.indexentries; // Collect multiple result groups to be sorted separately and then ordered. - // Each is an array of [docname, title, anchor, descr, score, filename]. + // Each is an array of [docname, title, anchor, descr, score, filename, kind]. const normalResults = []; const nonMainIndexResults = []; @@ -337,6 +345,7 @@ const Search = { null, score + boost, filenames[file], + SearchResultKind.title, ]); } } @@ -354,6 +363,7 @@ const Search = { null, score, filenames[file], + SearchResultKind.index, ]; if (isMain) { normalResults.push(result); @@ -475,6 +485,7 @@ const Search = { descr, score, filenames[match[0]], + SearchResultKind.object, ]); }; Object.keys(objects).forEach((prefix) => @@ -585,6 +596,7 @@ const Search = { null, score, filenames[file], + SearchResultKind.text, ]); } return results; diff --git a/_static/sphinxdoc.css b/_static/sphinxdoc.css index b03830b4..ae94dcc7 100644 --- a/_static/sphinxdoc.css +++ b/_static/sphinxdoc.css @@ -1,12 +1,7 @@ /* - * sphinxdoc.css_t - * ~~~~~~~~~~~~~~~ + * Sphinx stylesheet -- sphinxdoc theme. * - * Sphinx stylesheet -- sphinxdoc theme. Originally created by - * Armin Ronacher for Werkzeug. - * - * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. + * Originally created by Armin Ronacher for Werkzeug. * */ diff --git a/cli.html b/cli.html index 133e3d80..c712b124 100644 --- a/cli.html +++ b/cli.html @@ -7,9 +7,9 @@