diff options
| author | 2024-11-23 18:47:50 +0000 | |
|---|---|---|
| committer | 2024-11-23 18:47:50 +0000 | |
| commit | 4497a82c504818d61ab18c5251ae2bc42bae279e (patch) | |
| tree | 787e4916831cac5ae07115fdf2b2bcc49f0a04e0 /v9.1.1/_static | |
| parent | Deploying to docs from @ python-discord/bot-core@06b1ada5772490e18a7ab1b96d05... (diff) | |
Deploying to docs from @ python-discord/bot-core@bdaaa2e76d4cb32843754757532ef8d73ac97761 🚀
Diffstat (limited to 'v9.1.1/_static')
| -rw-r--r-- | v9.1.1/_static/basic.css | 15 | ||||
| -rw-r--r-- | v9.1.1/_static/doctools.js | 7 | ||||
| -rw-r--r-- | v9.1.1/_static/language_data.js | 7 | ||||
| -rw-r--r-- | v9.1.1/_static/searchtools.js | 38 | 
4 files changed, 27 insertions, 40 deletions
| diff --git a/v9.1.1/_static/basic.css b/v9.1.1/_static/basic.css index f316efcb..7ebbd6d0 100644 --- a/v9.1.1/_static/basic.css +++ b/v9.1.1/_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/v9.1.1/_static/doctools.js b/v9.1.1/_static/doctools.js index 4d67807d..0398ebb9 100644 --- a/v9.1.1/_static/doctools.js +++ b/v9.1.1/_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/v9.1.1/_static/language_data.js b/v9.1.1/_static/language_data.js index 367b8ed8..c7fe6c6f 100644 --- a/v9.1.1/_static/language_data.js +++ b/v9.1.1/_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/v9.1.1/_static/searchtools.js b/v9.1.1/_static/searchtools.js index b08d58c9..2c774d17 100644 --- a/v9.1.1/_static/searchtools.js +++ b/v9.1.1/_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; | 
