summaryrefslogtreecommitdiffstats
path: root/sphinx/themes
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:20:58 +0000
commit5bb0bb4be543fd5eca41673696a62ed80d493591 (patch)
treead2c464f140e86c7f178a6276d7ea4a93e3e6c92 /sphinx/themes
parentAdding upstream version 7.2.6. (diff)
downloadsphinx-upstream.tar.xz
sphinx-upstream.zip
Adding upstream version 7.3.7.upstream/7.3.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sphinx/themes')
-rw-r--r--sphinx/themes/agogo/layout.html8
-rw-r--r--sphinx/themes/agogo/static/agogo.css_t2
-rw-r--r--sphinx/themes/agogo/theme.conf20
-rw-r--r--sphinx/themes/agogo/theme.toml22
-rw-r--r--sphinx/themes/basic/defindex.html2
-rw-r--r--sphinx/themes/basic/domainindex.html2
-rw-r--r--sphinx/themes/basic/genindex-single.html2
-rw-r--r--sphinx/themes/basic/genindex-split.html2
-rw-r--r--sphinx/themes/basic/genindex.html2
-rw-r--r--sphinx/themes/basic/globaltoc.html2
-rw-r--r--sphinx/themes/basic/layout.html2
-rw-r--r--sphinx/themes/basic/localtoc.html2
-rw-r--r--sphinx/themes/basic/page.html2
-rw-r--r--sphinx/themes/basic/relations.html2
-rw-r--r--sphinx/themes/basic/search.html25
-rw-r--r--sphinx/themes/basic/searchbox.html6
-rw-r--r--sphinx/themes/basic/searchfield.html6
-rw-r--r--sphinx/themes/basic/sourcelink.html2
-rw-r--r--sphinx/themes/basic/static/basic.css_t2
-rw-r--r--sphinx/themes/basic/static/doctools.js2
-rw-r--r--sphinx/themes/basic/static/language_data.js_t4
-rw-r--r--sphinx/themes/basic/static/searchtools.js165
-rw-r--r--sphinx/themes/basic/theme.conf16
-rw-r--r--sphinx/themes/basic/theme.toml23
-rw-r--r--sphinx/themes/bizstyle/layout.html7
-rw-r--r--sphinx/themes/bizstyle/static/bizstyle.css_t2
-rw-r--r--sphinx/themes/bizstyle/static/bizstyle.js_t2
-rw-r--r--sphinx/themes/bizstyle/static/css3-mediaqueries_src.js6
-rw-r--r--sphinx/themes/bizstyle/theme.conf10
-rw-r--r--sphinx/themes/bizstyle/theme.toml12
-rw-r--r--sphinx/themes/classic/layout.html2
-rw-r--r--sphinx/themes/classic/static/classic.css_t2
-rw-r--r--sphinx/themes/classic/static/sidebar.js_t2
-rw-r--r--sphinx/themes/classic/theme.conf32
-rw-r--r--sphinx/themes/classic/theme.toml34
-rw-r--r--sphinx/themes/default/theme.conf2
-rw-r--r--sphinx/themes/default/theme.toml2
-rw-r--r--sphinx/themes/epub/epub-cover.html2
-rw-r--r--sphinx/themes/epub/layout.html2
-rw-r--r--sphinx/themes/epub/static/epub.css_t2
-rw-r--r--sphinx/themes/epub/theme.conf8
-rw-r--r--sphinx/themes/epub/theme.toml10
-rw-r--r--sphinx/themes/haiku/layout.html6
-rw-r--r--sphinx/themes/haiku/static/haiku.css_t4
-rw-r--r--sphinx/themes/haiku/theme.conf14
-rw-r--r--sphinx/themes/haiku/theme.toml16
-rw-r--r--sphinx/themes/nature/static/nature.css_t2
-rw-r--r--sphinx/themes/nature/theme.conf4
-rw-r--r--sphinx/themes/nature/theme.toml6
-rw-r--r--sphinx/themes/nonav/layout.html2
-rw-r--r--sphinx/themes/nonav/static/nonav.css_t2
-rw-r--r--sphinx/themes/nonav/theme.conf8
-rw-r--r--sphinx/themes/nonav/theme.toml10
-rw-r--r--sphinx/themes/pyramid/static/epub.css_t2
-rw-r--r--sphinx/themes/pyramid/static/pyramid.css_t2
-rw-r--r--sphinx/themes/pyramid/theme.conf4
-rw-r--r--sphinx/themes/pyramid/theme.toml6
-rw-r--r--sphinx/themes/scrolls/artwork/logo.svg2
-rw-r--r--sphinx/themes/scrolls/layout.html4
-rw-r--r--sphinx/themes/scrolls/static/scrolls.css_t2
-rw-r--r--sphinx/themes/scrolls/theme.conf13
-rw-r--r--sphinx/themes/scrolls/theme.toml15
-rw-r--r--sphinx/themes/sphinxdoc/static/sphinxdoc.css_t2
-rw-r--r--sphinx/themes/sphinxdoc/theme.conf4
-rw-r--r--sphinx/themes/sphinxdoc/theme.toml6
-rw-r--r--sphinx/themes/traditional/static/traditional.css_t2
-rw-r--r--sphinx/themes/traditional/theme.conf7
-rw-r--r--sphinx/themes/traditional/theme.toml9
68 files changed, 335 insertions, 281 deletions
diff --git a/sphinx/themes/agogo/layout.html b/sphinx/themes/agogo/layout.html
index 75c21c2..5b46819 100644
--- a/sphinx/themes/agogo/layout.html
+++ b/sphinx/themes/agogo/layout.html
@@ -5,7 +5,7 @@
Sphinx layout template for the agogo theme, originally written
by Andi Albrecht.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}
@@ -39,13 +39,13 @@
{{ toctree(includehidden=True) }}
{%- endblock %}
{%- block sidebarsearch %}
- <div role="search">
+ <search role="search">
<h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" />
<input type="submit" value="{{ _('Go') }}" />
</form>
- </div>
+ </search>
{%- endblock %}
{% endmacro %}
@@ -76,7 +76,7 @@
<div class="footer-wrapper">
<div class="footer">
<div class="left">
- <div role="navigation" aria-label="related navigaton">
+ <div role="navigation" aria-label="related navigation">
{%- for rellink in rellinks|reverse %}
<a href="{{ pathto(rellink[0])|e }}" title="{{ rellink[1]|striptags|e }}"
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t
index e885d8c..3b7a1d0 100644
--- a/sphinx/themes/agogo/static/agogo.css_t
+++ b/sphinx/themes/agogo/static/agogo.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- agogo theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/agogo/theme.conf b/sphinx/themes/agogo/theme.conf
deleted file mode 100644
index 6a4457e..0000000
--- a/sphinx/themes/agogo/theme.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = agogo.css
-pygments_style = tango
-
-[options]
-bodyfont = "Verdana", Arial, sans-serif
-headerfont = "Georgia", "Times New Roman", serif
-pagewidth = 70em
-documentwidth = 50em
-rightsidebar = true
-sidebarwidth = 20em
-bgcolor = #eeeeec
-headerbg = #555573 url(bgtop.png) top left repeat-x
-footerbg = url(bgfooter.png) top left repeat-x
-linkcolor = #ce5c00
-headercolor1 = #204a87
-headercolor2 = #3465a4
-headerlinkcolor = #fcaf3e
-textalign = justify
diff --git a/sphinx/themes/agogo/theme.toml b/sphinx/themes/agogo/theme.toml
new file mode 100644
index 0000000..ebb47ac
--- /dev/null
+++ b/sphinx/themes/agogo/theme.toml
@@ -0,0 +1,22 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "agogo.css",
+]
+pygments_style = { default = "tango" }
+
+[options]
+bodyfont = "\"Verdana\", Arial, sans-serif"
+headerfont = "\"Georgia\", \"Times New Roman\", serif"
+pagewidth = "70em"
+documentwidth = "50em"
+rightsidebar = "true"
+sidebarwidth = "20em"
+bgcolor = "#eeeeec"
+headerbg = "#555573 url(bgtop.png) top left repeat-x"
+footerbg = "url(bgfooter.png) top left repeat-x"
+linkcolor = "#ce5c00"
+headercolor1 = "#204a87"
+headercolor2 = "#3465a4"
+headerlinkcolor = "#fcaf3e"
+textalign = "justify"
diff --git a/sphinx/themes/basic/defindex.html b/sphinx/themes/basic/defindex.html
index 6fcdb9c..c614b69 100644
--- a/sphinx/themes/basic/defindex.html
+++ b/sphinx/themes/basic/defindex.html
@@ -4,7 +4,7 @@
Default template for the "index" page.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}{{ warn('Now base template defindex.html is deprecated.') }}
{%- extends "layout.html" %}
diff --git a/sphinx/themes/basic/domainindex.html b/sphinx/themes/basic/domainindex.html
index c5b0dad..25d7e30 100644
--- a/sphinx/themes/basic/domainindex.html
+++ b/sphinx/themes/basic/domainindex.html
@@ -4,7 +4,7 @@
Template for domain indices (module index, ...).
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
diff --git a/sphinx/themes/basic/genindex-single.html b/sphinx/themes/basic/genindex-single.html
index dd1d1f0..70b2946 100644
--- a/sphinx/themes/basic/genindex-single.html
+++ b/sphinx/themes/basic/genindex-single.html
@@ -4,7 +4,7 @@
Template for a "single" page of a split index.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{% macro indexentries(firstname, links) %}
diff --git a/sphinx/themes/basic/genindex-split.html b/sphinx/themes/basic/genindex-split.html
index df2c2c2..5375365 100644
--- a/sphinx/themes/basic/genindex-split.html
+++ b/sphinx/themes/basic/genindex-split.html
@@ -4,7 +4,7 @@
Template for a "split" index overview page.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
diff --git a/sphinx/themes/basic/genindex.html b/sphinx/themes/basic/genindex.html
index 465b612..b62a9c3 100644
--- a/sphinx/themes/basic/genindex.html
+++ b/sphinx/themes/basic/genindex.html
@@ -4,7 +4,7 @@
Template for an "all-in-one" index.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
diff --git a/sphinx/themes/basic/globaltoc.html b/sphinx/themes/basic/globaltoc.html
index dd5cd6f..9745538 100644
--- a/sphinx/themes/basic/globaltoc.html
+++ b/sphinx/themes/basic/globaltoc.html
@@ -4,7 +4,7 @@
Sphinx sidebar template: global table of contents.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
<h3><a href="{{ pathto(root_doc)|e }}">{{ _('Table of Contents') }}</a></h3>
diff --git a/sphinx/themes/basic/layout.html b/sphinx/themes/basic/layout.html
index 156ebcd..bc0a67d 100644
--- a/sphinx/themes/basic/layout.html
+++ b/sphinx/themes/basic/layout.html
@@ -4,7 +4,7 @@
Master layout template for Sphinx themes.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- block doctype -%}
diff --git a/sphinx/themes/basic/localtoc.html b/sphinx/themes/basic/localtoc.html
index f53db07..70f3e16 100644
--- a/sphinx/themes/basic/localtoc.html
+++ b/sphinx/themes/basic/localtoc.html
@@ -4,7 +4,7 @@
Sphinx sidebar template: local table of contents.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- if display_toc %}
diff --git a/sphinx/themes/basic/page.html b/sphinx/themes/basic/page.html
index a490fc6..502278e 100644
--- a/sphinx/themes/basic/page.html
+++ b/sphinx/themes/basic/page.html
@@ -4,7 +4,7 @@
Master template for simple pages.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
diff --git a/sphinx/themes/basic/relations.html b/sphinx/themes/basic/relations.html
index 86ed02e..7ce494f 100644
--- a/sphinx/themes/basic/relations.html
+++ b/sphinx/themes/basic/relations.html
@@ -4,7 +4,7 @@
Sphinx sidebar template: relation links.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- if prev %}
diff --git a/sphinx/themes/basic/search.html b/sphinx/themes/basic/search.html
index f29d9db..8bad82a 100644
--- a/sphinx/themes/basic/search.html
+++ b/sphinx/themes/basic/search.html
@@ -4,7 +4,7 @@
Template for the search page.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
@@ -15,8 +15,9 @@
<script src="{{ pathto('_static/language_data.js', 1) }}"></script>
{%- endblock %}
{% block extrahead %}
- <script src="{{ pathto('searchindex.js', 1) }}" defer></script>
- {{ super() }}
+ <script src="{{ pathto('searchindex.js', 1) }}" defer="defer"></script>
+ <meta name="robots" content="noindex" />
+ {{ super() }}
{% endblock %}
{% block body %}
<h1 id="search-documentation">{{ _('Search') }}</h1>
@@ -44,22 +45,6 @@
</form>
{% endblock %}
{% block searchresults %}
- {% if search_performed %}
- <h2>{{ _('Search Results') }}</h2>
- {% if not search_results %}
- <p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>
- {% endif %}
- {% endif %}
- <div id="search-results">
- {% if search_results %}
- <ul>
- {% for href, caption, context in search_results %}
- <li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
- <div class="context">{{ context|e }}</div>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
- </div>
+ <div id="search-results"></div>
{% endblock %}
{% endblock %}
diff --git a/sphinx/themes/basic/searchbox.html b/sphinx/themes/basic/searchbox.html
index 0cd4523..1f084bb 100644
--- a/sphinx/themes/basic/searchbox.html
+++ b/sphinx/themes/basic/searchbox.html
@@ -4,11 +4,11 @@
Sphinx sidebar template: quick search box.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- if pagename != "search" and builder != "singlehtml" %}
-<div id="searchbox" style="display: none" role="search">
+<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">{{ _('Quick search') }}</h3>
<div class="searchformwrapper">
<form class="search" action="{{ pathto('search') }}" method="get">
@@ -16,6 +16,6 @@
<input type="submit" value="{{ _('Go') }}" />
</form>
</div>
-</div>
+</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
{%- endif %}
diff --git a/sphinx/themes/basic/searchfield.html b/sphinx/themes/basic/searchfield.html
index 1286be0..396218f 100644
--- a/sphinx/themes/basic/searchfield.html
+++ b/sphinx/themes/basic/searchfield.html
@@ -7,17 +7,17 @@
extra heading ("Quick search"). Instead, it uses a placeholder text
in the search field.
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- if pagename != "search" and builder != "singlehtml" %}
-<div id="searchbox" style="display: none" role="search">
+<search id="searchbox" style="display: none" role="search">
<div class="searchformwrapper">
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="Search"/>
<input type="submit" value="{{ _('Go') }}" />
</form>
</div>
-</div>
+</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
{%- endif %}
diff --git a/sphinx/themes/basic/sourcelink.html b/sphinx/themes/basic/sourcelink.html
index 2ff0f00..72a5966 100644
--- a/sphinx/themes/basic/sourcelink.html
+++ b/sphinx/themes/basic/sourcelink.html
@@ -4,7 +4,7 @@
Sphinx sidebar template: "show source" link.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- if show_source and has_source and sourcename %}
diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t
index 53f5eb4..297b9bf 100644
--- a/sphinx/themes/basic/static/basic.css_t
+++ b/sphinx/themes/basic/static/basic.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/basic/static/doctools.js b/sphinx/themes/basic/static/doctools.js
index d06a71d..4d67807 100644
--- a/sphinx/themes/basic/static/doctools.js
+++ b/sphinx/themes/basic/static/doctools.js
@@ -4,7 +4,7 @@
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/basic/static/language_data.js_t b/sphinx/themes/basic/static/language_data.js_t
index 80f2a4f..3666e5e 100644
--- a/sphinx/themes/basic/static/language_data.js_t
+++ b/sphinx/themes/basic/static/language_data.js_t
@@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -13,7 +13,7 @@
var stopwords = {{ search_language_stop_words }};
{% if search_language_stemming_code %}
-/* Non-minified version is copied as a separate JS file, is available */
+/* Non-minified version is copied as a separate JS file, if available */
{{ search_language_stemming_code|safe }}
{% endif -%}
diff --git a/sphinx/themes/basic/static/searchtools.js b/sphinx/themes/basic/static/searchtools.js
index 7918c3f..92da3f8 100644
--- a/sphinx/themes/basic/static/searchtools.js
+++ b/sphinx/themes/basic/static/searchtools.js
@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -99,7 +99,7 @@ const _displayItem = (item, searchTerms, highlightTerms) => {
.then((data) => {
if (data)
listItem.appendChild(
- Search.makeSearchSummary(data, searchTerms)
+ Search.makeSearchSummary(data, searchTerms, anchor)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
@@ -116,8 +116,8 @@ const _finishSearch = (resultCount) => {
);
else
Search.status.innerText = _(
- `Search finished, found ${resultCount} page(s) matching the search query.`
- );
+ "Search finished, found ${resultCount} page(s) matching the search query."
+ ).replace('${resultCount}', resultCount);
};
const _displayNextItem = (
results,
@@ -137,6 +137,22 @@ const _displayNextItem = (
// search finished, update title and status message
else _finishSearch(resultCount);
};
+// Helper function used by query() to order search results.
+// Each input is an array of [docname, title, anchor, descr, score, filename].
+// 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) => {
+ const leftScore = a[4];
+ const rightScore = b[4];
+ if (leftScore === rightScore) {
+ // same score: sort alphabetically
+ const leftTitle = a[1].toLowerCase();
+ const rightTitle = b[1].toLowerCase();
+ if (leftTitle === rightTitle) return 0;
+ return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
+ }
+ return leftScore > rightScore ? 1 : -1;
+};
/**
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
@@ -160,13 +176,26 @@ const Search = {
_queued_query: null,
_pulse_status: -1,
- htmlToText: (htmlString) => {
+ htmlToText: (htmlString, anchor) => {
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
- htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
+ for (const removalQuery of [".headerlinks", "script", "style"]) {
+ htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
+ }
+ if (anchor) {
+ const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`);
+ if (anchorContent) return anchorContent.textContent;
+
+ console.warn(
+ `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.`
+ );
+ }
+
+ // if anchor not specified or not found, fall back to main content
const docContent = htmlElement.querySelector('[role="main"]');
- if (docContent !== undefined) return docContent.textContent;
+ if (docContent) return docContent.textContent;
+
console.warn(
- "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
+ "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template."
);
return "";
},
@@ -239,16 +268,7 @@ const Search = {
else Search.deferQuery(query);
},
- /**
- * execute search (requires search index to be loaded)
- */
- query: (query) => {
- const filenames = Search._index.filenames;
- const docNames = Search._index.docnames;
- const titles = Search._index.titles;
- const allTitles = Search._index.alltitles;
- const indexEntries = Search._index.indexentries;
-
+ _parseQuery: (query) => {
// stem the search terms and add them to the correct list
const stemmer = new Stemmer();
const searchTerms = new Set();
@@ -284,16 +304,32 @@ const Search = {
// console.info("required: ", [...searchTerms]);
// console.info("excluded: ", [...excludedTerms]);
- // array of [docname, title, anchor, descr, score, filename]
- let results = [];
+ return [query, searchTerms, excludedTerms, highlightTerms, objectTerms];
+ },
+
+ /**
+ * execute search (requires search index to be loaded)
+ */
+ _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => {
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const titles = Search._index.titles;
+ const allTitles = Search._index.alltitles;
+ 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].
+ const normalResults = [];
+ const nonMainIndexResults = [];
+
_removeChildren(document.getElementById("search-progress"));
- const queryLower = query.toLowerCase();
+ const queryLower = query.toLowerCase().trim();
for (const [title, foundTitles] of Object.entries(allTitles)) {
- if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+ if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
for (const [file, id] of foundTitles) {
let score = Math.round(100 * queryLower.length / title.length)
- results.push([
+ normalResults.push([
docNames[file],
titles[file] !== title ? `${titles[file]} > ${title}` : title,
id !== null ? "#" + id : "",
@@ -308,46 +344,47 @@ const Search = {
// search for explicit entries in index directives
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
- for (const [file, id] of foundEntries) {
- let score = Math.round(100 * queryLower.length / entry.length)
- results.push([
+ for (const [file, id, isMain] of foundEntries) {
+ const score = Math.round(100 * queryLower.length / entry.length);
+ const result = [
docNames[file],
titles[file],
id ? "#" + id : "",
null,
score,
filenames[file],
- ]);
+ ];
+ if (isMain) {
+ normalResults.push(result);
+ } else {
+ nonMainIndexResults.push(result);
+ }
}
}
}
// lookup as object
objectTerms.forEach((term) =>
- results.push(...Search.performObjectSearch(term, objectTerms))
+ normalResults.push(...Search.performObjectSearch(term, objectTerms))
);
// lookup as search terms in fulltext
- results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
+ normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms));
// let the scorer override scores with a custom scoring function
- if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
-
- // now sort the results by score (in opposite order of appearance, since the
- // display function below uses pop() to retrieve items) and then
- // alphabetically
- results.sort((a, b) => {
- const leftScore = a[4];
- const rightScore = b[4];
- if (leftScore === rightScore) {
- // same score: sort alphabetically
- const leftTitle = a[1].toLowerCase();
- const rightTitle = b[1].toLowerCase();
- if (leftTitle === rightTitle) return 0;
- return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
- }
- return leftScore > rightScore ? 1 : -1;
- });
+ if (Scorer.score) {
+ normalResults.forEach((item) => (item[4] = Scorer.score(item)));
+ nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item)));
+ }
+
+ // Sort each group of results by score and then alphabetically by name.
+ normalResults.sort(_orderResultsByScoreThenName);
+ nonMainIndexResults.sort(_orderResultsByScoreThenName);
+
+ // Combine the result groups in (reverse) order.
+ // Non-main index entries are typically arbitrary cross-references,
+ // so display them after other results.
+ let results = [...nonMainIndexResults, ...normalResults];
// remove duplicate search results
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
@@ -361,7 +398,12 @@ const Search = {
return acc;
}, []);
- results = results.reverse();
+ return results.reverse();
+ },
+
+ query: (query) => {
+ const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query);
+ const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms);
// for debugging
//Search.lastresults = results.slice(); // a copy
@@ -466,14 +508,18 @@ const Search = {
// add support for partial matches
if (word.length > 2) {
const escapedWord = _escapeRegExp(word);
- Object.keys(terms).forEach((term) => {
- if (term.match(escapedWord) && !terms[word])
- arr.push({ files: terms[term], score: Scorer.partialTerm });
- });
- Object.keys(titleTerms).forEach((term) => {
- if (term.match(escapedWord) && !titleTerms[word])
- arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
- });
+ if (!terms.hasOwnProperty(word)) {
+ Object.keys(terms).forEach((term) => {
+ if (term.match(escapedWord))
+ arr.push({ files: terms[term], score: Scorer.partialTerm });
+ });
+ }
+ if (!titleTerms.hasOwnProperty(word)) {
+ Object.keys(titleTerms).forEach((term) => {
+ if (term.match(escapedWord))
+ arr.push({ files: titleTerms[term], score: Scorer.partialTitle });
+ });
+ }
}
// no match but word was a required one
@@ -496,9 +542,8 @@ const Search = {
// create the mapping
files.forEach((file) => {
- if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
- fileMap.get(file).push(word);
- else fileMap.set(file, [word]);
+ if (!fileMap.has(file)) fileMap.set(file, [word]);
+ else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word);
});
});
@@ -549,8 +594,8 @@ const Search = {
* search summary for a given text. keywords is a list
* of stemmed words.
*/
- makeSearchSummary: (htmlText, keywords) => {
- const text = Search.htmlToText(htmlText);
+ makeSearchSummary: (htmlText, keywords, anchor) => {
+ const text = Search.htmlToText(htmlText, anchor);
if (text === "") return null;
const textLower = text.toLowerCase();
diff --git a/sphinx/themes/basic/theme.conf b/sphinx/themes/basic/theme.conf
deleted file mode 100644
index f8e7b26..0000000
--- a/sphinx/themes/basic/theme.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-[theme]
-inherit = none
-stylesheet = basic.css
-pygments_style = none
-sidebars = localtoc.html, relations.html, sourcelink.html, searchbox.html
-
-[options]
-nosidebar = false
-sidebarwidth = 230
-body_min_width = 360
-body_max_width = 800
-navigation_with_keys = False
-enable_search_shortcuts = True
-globaltoc_collapse = true
-globaltoc_includehidden = false
-globaltoc_maxdepth =
diff --git a/sphinx/themes/basic/theme.toml b/sphinx/themes/basic/theme.toml
new file mode 100644
index 0000000..f380be0
--- /dev/null
+++ b/sphinx/themes/basic/theme.toml
@@ -0,0 +1,23 @@
+[theme]
+inherit = "none"
+stylesheets = [
+ "basic.css",
+]
+sidebars = [
+ "localtoc.html",
+ "relations.html",
+ "sourcelink.html",
+ "searchbox.html",
+]
+pygments_style = { default = "none" }
+
+[options]
+nosidebar = "false"
+sidebarwidth = "230"
+body_min_width = "360"
+body_max_width = "800"
+navigation_with_keys = "False"
+enable_search_shortcuts = "True"
+globaltoc_collapse = "true"
+globaltoc_includehidden = "false"
+globaltoc_maxdepth = ""
diff --git a/sphinx/themes/bizstyle/layout.html b/sphinx/themes/bizstyle/layout.html
index 6fd1e18..226c787 100644
--- a/sphinx/themes/bizstyle/layout.html
+++ b/sphinx/themes/bizstyle/layout.html
@@ -4,7 +4,7 @@
Sphinx layout template for the bizstyle theme.
- :copyright: Copyright 2007-2023 by Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{% extends "basic/layout.html" %}
@@ -14,11 +14,6 @@
<script src="{{ pathto('_static/bizstyle.js', 1) }}"></script>
{%- endblock %}
-{# doctype override #}
-{%- block doctype %}
-<!doctype html>
-{%- endblock %}
-
{%- block extrahead %}
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!--[if lt IE 9]>
diff --git a/sphinx/themes/bizstyle/static/bizstyle.css_t b/sphinx/themes/bizstyle/static/bizstyle.css_t
index 3cf7832..9630fbc 100644
--- a/sphinx/themes/bizstyle/static/bizstyle.css_t
+++ b/sphinx/themes/bizstyle/static/bizstyle.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- business style theme.
*
- * :copyright: Copyright 2007-2023 by Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/bizstyle/static/bizstyle.js_t b/sphinx/themes/bizstyle/static/bizstyle.js_t
index fd0865e..1373b22 100644
--- a/sphinx/themes/bizstyle/static/bizstyle.js_t
+++ b/sphinx/themes/bizstyle/static/bizstyle.js_t
@@ -6,7 +6,7 @@
//
// This theme was created by referring to 'sphinxdoc'
//
-// :copyright: Copyright 2007-2023 by Sphinx team, see AUTHORS.
+// :copyright: Copyright 2007-2024 by Sphinx team, see AUTHORS.
// :license: BSD, see LICENSE for details.
//
const initialiseBizStyle = () => {
diff --git a/sphinx/themes/bizstyle/static/css3-mediaqueries_src.js b/sphinx/themes/bizstyle/static/css3-mediaqueries_src.js
index 7878620..8aedaab 100644
--- a/sphinx/themes/bizstyle/static/css3-mediaqueries_src.js
+++ b/sphinx/themes/bizstyle/static/css3-mediaqueries_src.js
@@ -4,15 +4,15 @@ css3-mediaqueries.js - CSS Helper and CSS3 Media Queries Enabler
author: Wouter van der Graaf <wouter at dynora nl>
version: 1.0 (20110330)
license: MIT
-website: http://code.google.com/p/css3-mediaqueries-js/
+website: https://code.google.com/p/css3-mediaqueries-js/
-W3C spec: http://www.w3.org/TR/css3-mediaqueries/
+W3C spec: https://www.w3.org/TR/css3-mediaqueries/
Note: use of embedded <style> is not recommended when using media queries, because IE has no way of returning the raw literal css text from a <style> element.
*/
-// true prototypal inheritance (http://javascript.crockford.com/prototypal.html)
+// true prototypal inheritance (https://javascript.crockford.com/prototypal.html)
if (typeof Object.create !== 'function') {
Object.create = function (o) {
function F() {}
diff --git a/sphinx/themes/bizstyle/theme.conf b/sphinx/themes/bizstyle/theme.conf
deleted file mode 100644
index 3c21b0f..0000000
--- a/sphinx/themes/bizstyle/theme.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = bizstyle.css
-pygments_style = friendly
-
-[options]
-rightsidebar = false
-sidebarwidth = 210
-
-maincolor = #336699
diff --git a/sphinx/themes/bizstyle/theme.toml b/sphinx/themes/bizstyle/theme.toml
new file mode 100644
index 0000000..f7de8c2
--- /dev/null
+++ b/sphinx/themes/bizstyle/theme.toml
@@ -0,0 +1,12 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "bizstyle.css",
+]
+pygments_style = { default = "friendly" }
+
+[options]
+rightsidebar = "false"
+sidebarwidth = "210"
+
+maincolor = "#336699"
diff --git a/sphinx/themes/classic/layout.html b/sphinx/themes/classic/layout.html
index e6a5c43..99a101c 100644
--- a/sphinx/themes/classic/layout.html
+++ b/sphinx/themes/classic/layout.html
@@ -4,7 +4,7 @@
Sphinx layout template for the classic theme.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}
diff --git a/sphinx/themes/classic/static/classic.css_t b/sphinx/themes/classic/static/classic.css_t
index 8a903e8..78429fc 100644
--- a/sphinx/themes/classic/static/classic.css_t
+++ b/sphinx/themes/classic/static/classic.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- classic theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/classic/static/sidebar.js_t b/sphinx/themes/classic/static/sidebar.js_t
index 32ae506..205e1dc 100644
--- a/sphinx/themes/classic/static/sidebar.js_t
+++ b/sphinx/themes/classic/static/sidebar.js_t
@@ -16,7 +16,7 @@
* Once the browser is closed the cookie is deleted and the position
* reset to the default (expanded).
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/classic/theme.conf b/sphinx/themes/classic/theme.conf
deleted file mode 100644
index 5963d04..0000000
--- a/sphinx/themes/classic/theme.conf
+++ /dev/null
@@ -1,32 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = classic.css
-pygments_style = sphinx
-
-[options]
-rightsidebar = false
-stickysidebar = false
-collapsiblesidebar = false
-externalrefs = false
-
-footerbgcolor = #11303d
-footertextcolor = #ffffff
-sidebarbgcolor = #1c4e63
-sidebarbtncolor = #3c6e83
-sidebartextcolor = #ffffff
-sidebarlinkcolor = #98dbcc
-relbarbgcolor = #133f52
-relbartextcolor = #ffffff
-relbarlinkcolor = #ffffff
-bgcolor = #ffffff
-textcolor = #000000
-headbgcolor = #f2f2f2
-headtextcolor = #20435c
-headlinkcolor = #c60f0f
-linkcolor = #355f7c
-visitedlinkcolor = #551a8b
-codebgcolor = unset
-codetextcolor = unset
-
-bodyfont = sans-serif
-headfont = 'Trebuchet MS', sans-serif
diff --git a/sphinx/themes/classic/theme.toml b/sphinx/themes/classic/theme.toml
new file mode 100644
index 0000000..fbb2fed
--- /dev/null
+++ b/sphinx/themes/classic/theme.toml
@@ -0,0 +1,34 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "classic.css",
+]
+pygments_style = { default = "sphinx" }
+
+[options]
+rightsidebar = "false"
+stickysidebar = "false"
+collapsiblesidebar = "false"
+externalrefs = "false"
+
+footerbgcolor = "#11303d"
+footertextcolor = "#ffffff"
+sidebarbgcolor = "#1c4e63"
+sidebarbtncolor = "#3c6e83"
+sidebartextcolor = "#ffffff"
+sidebarlinkcolor = "#98dbcc"
+relbarbgcolor = "#133f52"
+relbartextcolor = "#ffffff"
+relbarlinkcolor = "#ffffff"
+bgcolor = "#ffffff"
+textcolor = "#000000"
+headbgcolor = "#f2f2f2"
+headtextcolor = "#20435c"
+headlinkcolor = "#c60f0f"
+linkcolor = "#355f7c"
+visitedlinkcolor = "#551a8b"
+codebgcolor = "unset"
+codetextcolor = "unset"
+
+bodyfont = "sans-serif"
+headfont = "'Trebuchet MS', sans-serif"
diff --git a/sphinx/themes/default/theme.conf b/sphinx/themes/default/theme.conf
deleted file mode 100644
index 0d8403f..0000000
--- a/sphinx/themes/default/theme.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[theme]
-inherit = classic
diff --git a/sphinx/themes/default/theme.toml b/sphinx/themes/default/theme.toml
new file mode 100644
index 0000000..207c717
--- /dev/null
+++ b/sphinx/themes/default/theme.toml
@@ -0,0 +1,2 @@
+[theme]
+inherit = "classic"
diff --git a/sphinx/themes/epub/epub-cover.html b/sphinx/themes/epub/epub-cover.html
index bb348bb..15d4616 100644
--- a/sphinx/themes/epub/epub-cover.html
+++ b/sphinx/themes/epub/epub-cover.html
@@ -4,7 +4,7 @@
Sample template for the html cover page.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
diff --git a/sphinx/themes/epub/layout.html b/sphinx/themes/epub/layout.html
index f4bcf97..c7b63cd 100644
--- a/sphinx/themes/epub/layout.html
+++ b/sphinx/themes/epub/layout.html
@@ -4,7 +4,7 @@
Sphinx layout template for the epub theme.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}
diff --git a/sphinx/themes/epub/static/epub.css_t b/sphinx/themes/epub/static/epub.css_t
index 1afb150..75b45df 100644
--- a/sphinx/themes/epub/static/epub.css_t
+++ b/sphinx/themes/epub/static/epub.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- epub theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/epub/theme.conf b/sphinx/themes/epub/theme.conf
deleted file mode 100644
index 11f098e..0000000
--- a/sphinx/themes/epub/theme.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = epub.css
-pygments_style = none
-
-[options]
-relbar1 = true
-footer = true
diff --git a/sphinx/themes/epub/theme.toml b/sphinx/themes/epub/theme.toml
new file mode 100644
index 0000000..8fcf9d9
--- /dev/null
+++ b/sphinx/themes/epub/theme.toml
@@ -0,0 +1,10 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "epub.css",
+]
+pygments_style = { default = "none" }
+
+[options]
+relbar1 = "true"
+footer = "true"
diff --git a/sphinx/themes/haiku/layout.html b/sphinx/themes/haiku/layout.html
index 4e14826..c0c1904 100644
--- a/sphinx/themes/haiku/layout.html
+++ b/sphinx/themes/haiku/layout.html
@@ -4,7 +4,7 @@
Sphinx layout template for the haiku theme.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}
@@ -35,14 +35,14 @@
<div class="header" role="banner">
{%- block haikuheader %}
{%- if theme_full_logo != "false" %}
- <a href="{{ pathto('index') }}">
+ <a href="{{ pathto(root_doc)|e }}">
<img class="logo" src="{{ logo_url|e }}" alt="Logo"/>
</a>
{%- else %}
{%- if logo -%}
<img class="rightlogo" src="{{ logo_url|e }}" alt="Logo"/>
{%- endif -%}
- <h1 class="heading"><a href="{{ pathto('index') }}">
+ <h1 class="heading"><a href="{{ pathto(root_doc)|e }}">
<span>{{ shorttitle|e }}</span></a></h1>
<h2 class="heading"><span>{{ title|striptags|e }}</span></h2>
{%- endif %}
diff --git a/sphinx/themes/haiku/static/haiku.css_t b/sphinx/themes/haiku/static/haiku.css_t
index bccc3ea..ce449b5 100644
--- a/sphinx/themes/haiku/static/haiku.css_t
+++ b/sphinx/themes/haiku/static/haiku.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- haiku theme.
*
- * Adapted from http://haiku-os.org/docs/Haiku-doc.css.
+ * Adapted from https://haiku-os.org/docs/Haiku-doc.css.
* Original copyright message:
*
* Copyright 2008-2009, Haiku. All rights reserved.
@@ -16,7 +16,7 @@
* Braden Ewing <brewin@gmail.com>
* Humdinger <humdingerb@gmail.com>
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/haiku/theme.conf b/sphinx/themes/haiku/theme.conf
deleted file mode 100644
index 77dd7c7..0000000
--- a/sphinx/themes/haiku/theme.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = haiku.css
-pygments_style = autumn
-
-[options]
-full_logo = false
-body_min_width = 59em
-body_max_width = 70em
-textcolor = #333333
-headingcolor = #0c3762
-linkcolor = #dc3c01
-visitedlinkcolor = #551a8b
-hoverlinkcolor = #ff4500
diff --git a/sphinx/themes/haiku/theme.toml b/sphinx/themes/haiku/theme.toml
new file mode 100644
index 0000000..149b89d
--- /dev/null
+++ b/sphinx/themes/haiku/theme.toml
@@ -0,0 +1,16 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "haiku.css",
+]
+pygments_style = { default = "autumn" }
+
+[options]
+full_logo = "false"
+body_min_width = "59em"
+body_max_width = "70em"
+textcolor = "#333333"
+headingcolor = "#0c3762"
+linkcolor = "#dc3c01"
+visitedlinkcolor = "#551a8b"
+hoverlinkcolor = "#ff4500"
diff --git a/sphinx/themes/nature/static/nature.css_t b/sphinx/themes/nature/static/nature.css_t
index fe95c35..e2a9606 100644
--- a/sphinx/themes/nature/static/nature.css_t
+++ b/sphinx/themes/nature/static/nature.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- nature theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/nature/theme.conf b/sphinx/themes/nature/theme.conf
deleted file mode 100644
index 1cc4004..0000000
--- a/sphinx/themes/nature/theme.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = nature.css
-pygments_style = tango
diff --git a/sphinx/themes/nature/theme.toml b/sphinx/themes/nature/theme.toml
new file mode 100644
index 0000000..0322e5d
--- /dev/null
+++ b/sphinx/themes/nature/theme.toml
@@ -0,0 +1,6 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "nature.css",
+]
+pygments_style = { default = "tango" }
diff --git a/sphinx/themes/nonav/layout.html b/sphinx/themes/nonav/layout.html
index 06607f4..ba5f7b7 100644
--- a/sphinx/themes/nonav/layout.html
+++ b/sphinx/themes/nonav/layout.html
@@ -4,7 +4,7 @@
Sphinx layout template for the any help system theme.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}
diff --git a/sphinx/themes/nonav/static/nonav.css_t b/sphinx/themes/nonav/static/nonav.css_t
index b4d26cc..5e76c0e 100644
--- a/sphinx/themes/nonav/static/nonav.css_t
+++ b/sphinx/themes/nonav/static/nonav.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- nonav theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/nonav/theme.conf b/sphinx/themes/nonav/theme.conf
deleted file mode 100644
index d4799c7..0000000
--- a/sphinx/themes/nonav/theme.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = nonav.css
-pygments_style = none
-
-[options]
-relbar1 = true
-footer = true
diff --git a/sphinx/themes/nonav/theme.toml b/sphinx/themes/nonav/theme.toml
new file mode 100644
index 0000000..4202049
--- /dev/null
+++ b/sphinx/themes/nonav/theme.toml
@@ -0,0 +1,10 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "nonav.css",
+]
+pygments_style = { default = "none" }
+
+[options]
+relbar1 = "true"
+footer = "true"
diff --git a/sphinx/themes/pyramid/static/epub.css_t b/sphinx/themes/pyramid/static/epub.css_t
index 798054b..43f82cd 100644
--- a/sphinx/themes/pyramid/static/epub.css_t
+++ b/sphinx/themes/pyramid/static/epub.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- default theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/pyramid/static/pyramid.css_t b/sphinx/themes/pyramid/static/pyramid.css_t
index 560093c..5283e94 100644
--- a/sphinx/themes/pyramid/static/pyramid.css_t
+++ b/sphinx/themes/pyramid/static/pyramid.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- pylons theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/pyramid/theme.conf b/sphinx/themes/pyramid/theme.conf
deleted file mode 100644
index 409579f..0000000
--- a/sphinx/themes/pyramid/theme.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = pyramid.css
-pygments_style = sphinx.pygments_styles.PyramidStyle
diff --git a/sphinx/themes/pyramid/theme.toml b/sphinx/themes/pyramid/theme.toml
new file mode 100644
index 0000000..0e0c487
--- /dev/null
+++ b/sphinx/themes/pyramid/theme.toml
@@ -0,0 +1,6 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "pyramid.css",
+]
+pygments_style = { default = "sphinx.pygments_styles.PyramidStyle" }
diff --git a/sphinx/themes/scrolls/artwork/logo.svg b/sphinx/themes/scrolls/artwork/logo.svg
index 0907a4e..b281baf 100644
--- a/sphinx/themes/scrolls/artwork/logo.svg
+++ b/sphinx/themes/scrolls/artwork/logo.svg
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<!-- Created with Inkscape (https://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
diff --git a/sphinx/themes/scrolls/layout.html b/sphinx/themes/scrolls/layout.html
index da91ee9..4bec473 100644
--- a/sphinx/themes/scrolls/layout.html
+++ b/sphinx/themes/scrolls/layout.html
@@ -5,7 +5,7 @@
Sphinx layout template for the scrolls theme, originally written
by Armin Ronacher.
- :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "basic/layout.html" %}
@@ -23,7 +23,7 @@
{% block content %}
<div id="content">
<div class="header">
- <h1 class="heading"><a href="{{ pathto('index') }}"
+ <h1 class="heading"><a href="{{ pathto(root_doc)|e }}"
title="back to the documentation overview"><span>{{ title|striptags|e }}</span></a></h1>
</div>
<div class="relnav" role="navigation" aria-label="related navigation">
diff --git a/sphinx/themes/scrolls/static/scrolls.css_t b/sphinx/themes/scrolls/static/scrolls.css_t
index ae6eb0a..a159689 100644
--- a/sphinx/themes/scrolls/static/scrolls.css_t
+++ b/sphinx/themes/scrolls/static/scrolls.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- scrolls theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/scrolls/theme.conf b/sphinx/themes/scrolls/theme.conf
deleted file mode 100644
index 7e83de1..0000000
--- a/sphinx/themes/scrolls/theme.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = scrolls.css
-pygments_style = tango
-
-[options]
-body_min_width = 0
-body_max_width = 680
-headerbordercolor = #1752b4
-subheadlinecolor = #0d306b
-linkcolor = #1752b4
-visitedlinkcolor = #551a8b
-admonitioncolor = #28437f
diff --git a/sphinx/themes/scrolls/theme.toml b/sphinx/themes/scrolls/theme.toml
new file mode 100644
index 0000000..92b1bfa
--- /dev/null
+++ b/sphinx/themes/scrolls/theme.toml
@@ -0,0 +1,15 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "scrolls.css",
+]
+pygments_style = { default = "tango" }
+
+[options]
+body_min_width = "0"
+body_max_width = "680"
+headerbordercolor = "#1752b4"
+subheadlinecolor = "#0d306b"
+linkcolor = "#1752b4"
+visitedlinkcolor = "#551a8b"
+admonitioncolor = "#28437f"
diff --git a/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t b/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t
index bf4d254..3cfd310 100644
--- a/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t
+++ b/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t
@@ -5,7 +5,7 @@
* Sphinx stylesheet -- sphinxdoc theme. Originally created by
* Armin Ronacher for Werkzeug.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/sphinxdoc/theme.conf b/sphinx/themes/sphinxdoc/theme.conf
deleted file mode 100644
index 9a22fef..0000000
--- a/sphinx/themes/sphinxdoc/theme.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = sphinxdoc.css
-pygments_style = friendly
diff --git a/sphinx/themes/sphinxdoc/theme.toml b/sphinx/themes/sphinxdoc/theme.toml
new file mode 100644
index 0000000..472da10
--- /dev/null
+++ b/sphinx/themes/sphinxdoc/theme.toml
@@ -0,0 +1,6 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "sphinxdoc.css",
+]
+pygments_style = { default = "friendly" }
diff --git a/sphinx/themes/traditional/static/traditional.css_t b/sphinx/themes/traditional/static/traditional.css_t
index 085c98a..9ddac53 100644
--- a/sphinx/themes/traditional/static/traditional.css_t
+++ b/sphinx/themes/traditional/static/traditional.css_t
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- traditional docs.python.org theme.
*
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
diff --git a/sphinx/themes/traditional/theme.conf b/sphinx/themes/traditional/theme.conf
deleted file mode 100644
index acc6bc7..0000000
--- a/sphinx/themes/traditional/theme.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[theme]
-inherit = basic
-stylesheet = traditional.css
-
-[options]
-body_min_width = 0
-body_max_width = none
diff --git a/sphinx/themes/traditional/theme.toml b/sphinx/themes/traditional/theme.toml
new file mode 100644
index 0000000..173be97
--- /dev/null
+++ b/sphinx/themes/traditional/theme.toml
@@ -0,0 +1,9 @@
+[theme]
+inherit = "basic"
+stylesheets = [
+ "traditional.css",
+]
+
+[options]
+body_min_width = "0"
+body_max_width = "none"