python-docs-theme 2025.2__py3-none-any.whl → 2025.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_docs_theme/__init__.py +2 -51
- python_docs_theme/footerdonate.html +1 -1
- python_docs_theme/layout.html +17 -17
- python_docs_theme/static/copybutton.js +49 -57
- python_docs_theme/static/pydoctheme.css +18 -20
- python_docs_theme/static/pydoctheme_dark.css +13 -0
- python_docs_theme/theme.toml +39 -0
- {python_docs_theme-2025.2.dist-info → python_docs_theme-2025.4.1.dist-info}/METADATA +8 -9
- python_docs_theme-2025.4.1.dist-info/RECORD +17 -0
- {python_docs_theme-2025.2.dist-info → python_docs_theme-2025.4.1.dist-info}/WHEEL +1 -1
- python_docs_theme/static/sidebar.js_t +0 -95
- python_docs_theme/theme.conf +0 -37
- python_docs_theme-2025.2.dist-info/RECORD +0 -18
- {python_docs_theme-2025.2.dist-info → python_docs_theme-2025.4.1.dist-info}/entry_points.txt +0 -0
- {python_docs_theme-2025.2.dist-info → python_docs_theme-2025.4.1.dist-info/licenses}/LICENSE +0 -0
python_docs_theme/__init__.py
CHANGED
|
@@ -1,71 +1,22 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import hashlib
|
|
4
|
-
from functools import cache
|
|
5
3
|
from pathlib import Path
|
|
6
4
|
|
|
7
|
-
import sphinx.application
|
|
8
|
-
from sphinx.builders.html import StandaloneHTMLBuilder
|
|
9
|
-
|
|
10
5
|
TYPE_CHECKING = False
|
|
11
6
|
if TYPE_CHECKING:
|
|
12
|
-
from typing import Any
|
|
13
|
-
|
|
14
7
|
from sphinx.application import Sphinx
|
|
15
8
|
from sphinx.util.typing import ExtensionMetadata
|
|
16
9
|
|
|
17
|
-
__version__ = "2025.
|
|
10
|
+
__version__ = "2025.4.1"
|
|
18
11
|
|
|
19
12
|
THEME_PATH = Path(__file__).resolve().parent
|
|
20
13
|
|
|
21
14
|
|
|
22
|
-
@cache
|
|
23
|
-
def _asset_hash(path: str) -> str:
|
|
24
|
-
"""Append a `?digest=` to an url based on the file content."""
|
|
25
|
-
full_path = THEME_PATH / path.replace("_static/", "static/")
|
|
26
|
-
digest = hashlib.sha1(full_path.read_bytes()).hexdigest()
|
|
27
|
-
|
|
28
|
-
return f"{path}?digest={digest}"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def _add_asset_hashes(static: list[str], add_digest_to: list[str]) -> None:
|
|
32
|
-
for asset in add_digest_to:
|
|
33
|
-
index = static.index(asset)
|
|
34
|
-
static[index].filename = _asset_hash(asset) # type: ignore[attr-defined]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def _html_page_context(
|
|
38
|
-
app: sphinx.application.Sphinx,
|
|
39
|
-
pagename: str,
|
|
40
|
-
templatename: str,
|
|
41
|
-
context: dict[str, Any],
|
|
42
|
-
doctree: Any,
|
|
43
|
-
) -> None:
|
|
44
|
-
if app.config.html_theme != "python_docs_theme":
|
|
45
|
-
return
|
|
46
|
-
|
|
47
|
-
assert isinstance(app.builder, StandaloneHTMLBuilder)
|
|
48
|
-
|
|
49
|
-
if (4,) <= sphinx.version_info < (7, 1) and "css_files" in context:
|
|
50
|
-
if "_static/pydoctheme.css" not in context["css_files"]:
|
|
51
|
-
raise ValueError(
|
|
52
|
-
"This documentation is not using `pydoctheme.css` as the stylesheet. "
|
|
53
|
-
"If you have set `html_style` in your conf.py file, remove it."
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
_add_asset_hashes(
|
|
57
|
-
context["css_files"],
|
|
58
|
-
["_static/pydoctheme.css"],
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
15
|
def setup(app: Sphinx) -> ExtensionMetadata:
|
|
63
|
-
app.require_sphinx("3
|
|
16
|
+
app.require_sphinx("7.3")
|
|
64
17
|
|
|
65
18
|
app.add_html_theme("python_docs_theme", str(THEME_PATH))
|
|
66
19
|
|
|
67
|
-
app.connect("html-page-context", _html_page_context)
|
|
68
|
-
|
|
69
20
|
return {
|
|
70
21
|
"version": __version__,
|
|
71
22
|
"parallel_read_safe": True,
|
python_docs_theme/layout.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</li>
|
|
15
15
|
{%- endfor %}
|
|
16
16
|
{%- block rootrellink %}
|
|
17
|
-
<li><img src="{{ pathto('_static/' ~ theme_root_icon, 1) }}" alt="{{ theme_root_icon_alt_text }}" style="vertical-align: middle; margin-top: -1px"
|
|
17
|
+
<li><img src="{{ pathto('_static/' ~ theme_root_icon, 1) }}" alt="{{ theme_root_icon_alt_text }}" style="vertical-align: middle; margin-top: -1px"></li>
|
|
18
18
|
<li><a href="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li>
|
|
19
19
|
<li class="switchers">
|
|
20
20
|
<div class="language_switcher_placeholder"></div>
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
{%- if builder != "htmlhelp" %}
|
|
49
49
|
<div class="inline-search" role="search">
|
|
50
50
|
<form class="inline-search" action="{{ pathto('search') }}" method="get">
|
|
51
|
-
<input placeholder="{{ _('Quick search') }}" aria-label="{{ _('Quick search') }}" type="search" name="q" id="search-box"
|
|
52
|
-
<input type="submit" value="{{ _('Go') }}"
|
|
51
|
+
<input placeholder="{{ _('Quick search') }}" aria-label="{{ _('Quick search') }}" type="search" name="q" id="search-box">
|
|
52
|
+
<input type="submit" value="{{ _('Go') }}">
|
|
53
53
|
</form>
|
|
54
54
|
</div>
|
|
55
55
|
{%- endif %}
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
{%- block extrahead -%}
|
|
73
73
|
<link rel="stylesheet" href="{{ pathto('_static/pydoctheme_dark.css', 1) }}" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
|
|
74
|
-
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/' ~ theme_root_icon, 1) }}"
|
|
74
|
+
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/' ~ theme_root_icon, 1) }}">
|
|
75
75
|
{%- if builder != "htmlhelp" %}
|
|
76
76
|
{%- if not embedded %}
|
|
77
77
|
<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>
|
|
@@ -93,14 +93,14 @@
|
|
|
93
93
|
{%- if builder != 'htmlhelp' %}
|
|
94
94
|
<div class="mobile-nav">
|
|
95
95
|
<input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
|
|
96
|
-
aria-pressed="false" aria-expanded="false" role="button" aria-label="{{ _('Menu')}}"
|
|
96
|
+
aria-pressed="false" aria-expanded="false" role="button" aria-label="{{ _('Menu')}}">
|
|
97
97
|
<nav class="nav-content" role="navigation">
|
|
98
98
|
<label for="menuToggler" class="toggler__label">
|
|
99
99
|
<span></span>
|
|
100
100
|
</label>
|
|
101
101
|
<span class="nav-items-wrapper">
|
|
102
102
|
<a href="{{ theme_root_url }}" class="nav-logo">
|
|
103
|
-
<img src="{{ pathto('_static/' ~ theme_root_icon, 1) }}" alt="{{ theme_root_icon_alt_text }}"
|
|
103
|
+
<img src="{{ pathto('_static/' ~ theme_root_icon, 1) }}" alt="{{ theme_root_icon_alt_text }}">
|
|
104
104
|
</a>
|
|
105
105
|
<span class="version_switcher_placeholder"></span>
|
|
106
106
|
{%- if pagename != "search" and builder != "singlehtml" %}
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
|
|
109
109
|
<path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
|
|
110
110
|
</svg>
|
|
111
|
-
<input placeholder="{{ _('Quick search') }}" aria-label="{{ _('Quick search') }}" type="search" name="q"
|
|
112
|
-
<input type="submit" value="{{ _('Go') }}"
|
|
111
|
+
<input placeholder="{{ _('Quick search') }}" aria-label="{{ _('Quick search') }}" type="search" name="q">
|
|
112
|
+
<input type="submit" value="{{ _('Go') }}">
|
|
113
113
|
</form>
|
|
114
114
|
{%- endif %}
|
|
115
115
|
</span>
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
{%- if logo %}
|
|
122
122
|
<p class="logo">
|
|
123
123
|
<a href="{{ pathto('index') }}">
|
|
124
|
-
<img class="logo" src="{{ pathto('_static/' ~ logo, 1)|e }}" alt="Logo"
|
|
124
|
+
<img class="logo" src="{{ pathto('_static/' ~ logo, 1)|e }}" alt="Logo">
|
|
125
125
|
</a>
|
|
126
126
|
</p>
|
|
127
127
|
{%- endif %}
|
|
@@ -143,21 +143,21 @@
|
|
|
143
143
|
{% if theme_copyright_url or hasdoc('copyright') %}
|
|
144
144
|
</a>
|
|
145
145
|
{% endif %} {{ copyright|e }}.
|
|
146
|
-
<br
|
|
146
|
+
<br>
|
|
147
147
|
{% trans %}This page is licensed under the Python Software Foundation License Version 2.{% endtrans %}
|
|
148
|
-
<br
|
|
148
|
+
<br>
|
|
149
149
|
{% trans %}Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.{% endtrans %}
|
|
150
|
-
<br
|
|
150
|
+
<br>
|
|
151
151
|
{% if theme_license_url %}
|
|
152
|
-
{% trans license_file=theme_license_url %}See <a href="{{ license_file }}">History and License</a> for more information.{% endtrans %}<br
|
|
152
|
+
{% trans license_file=theme_license_url %}See <a href="{{ license_file }}">History and License</a> for more information.{% endtrans %}<br>
|
|
153
153
|
{% endif %}
|
|
154
154
|
{% if theme_hosted_on %}
|
|
155
|
-
{% trans hosted_on=theme_hosted_on %}Hosted on {{ hosted_on }}.{% endtrans %}<br
|
|
155
|
+
{% trans hosted_on=theme_hosted_on %}Hosted on {{ hosted_on }}.{% endtrans %}<br>
|
|
156
156
|
{% endif %}
|
|
157
|
-
<br
|
|
157
|
+
<br>
|
|
158
158
|
|
|
159
159
|
{% include "footerdonate.html" %}
|
|
160
|
-
<br
|
|
160
|
+
<br>
|
|
161
161
|
|
|
162
162
|
{%- if last_updated %}
|
|
163
163
|
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
{% if theme_issues_url %}
|
|
166
166
|
{% trans %}<a href="{{ theme_issues_url }}">Found a bug</a>?{% endtrans %}
|
|
167
167
|
{% endif %}
|
|
168
|
-
<br
|
|
168
|
+
<br>
|
|
169
169
|
|
|
170
170
|
{% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
|
|
171
171
|
</div>
|
|
@@ -1,65 +1,59 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (el.nodeType === Node.ELEMENT_NODE && el.matches(".gp, .go")) {
|
|
16
|
-
break
|
|
17
|
-
}
|
|
18
|
-
// if the node is a text node with content, wrap it in a
|
|
19
|
-
// span element so that we can control visibility
|
|
20
|
-
if (el.nodeType === Node.TEXT_NODE && el.textContent.trim()) {
|
|
21
|
-
const wrapper = document.createElement("span")
|
|
22
|
-
el.after(wrapper)
|
|
23
|
-
wrapper.appendChild(el)
|
|
24
|
-
el = wrapper
|
|
25
|
-
}
|
|
26
|
-
yield el
|
|
1
|
+
// Extract copyable text from the code block ignoring the
|
|
2
|
+
// prompts and output.
|
|
3
|
+
function getCopyableText(rootElement) {
|
|
4
|
+
rootElement = rootElement.cloneNode(true)
|
|
5
|
+
// tracebacks (.gt) contain bare text elements that
|
|
6
|
+
// need to be removed
|
|
7
|
+
const tracebacks = rootElement.querySelectorAll(".gt")
|
|
8
|
+
for (const el of tracebacks) {
|
|
9
|
+
while (
|
|
10
|
+
el.nextSibling &&
|
|
11
|
+
(el.nextSibling.nodeType !== Node.ELEMENT_NODE ||
|
|
12
|
+
!el.nextSibling.matches(".gp, .go"))
|
|
13
|
+
) {
|
|
14
|
+
el.nextSibling.remove()
|
|
27
15
|
}
|
|
28
16
|
}
|
|
17
|
+
// Remove all elements with the "go" (Generic.Output),
|
|
18
|
+
// "gp" (Generic.Prompt), or "gt" (Generic.Traceback) CSS class
|
|
19
|
+
const elements = rootElement.querySelectorAll(".gp, .go, .gt")
|
|
20
|
+
for (const el of elements) {
|
|
21
|
+
el.remove()
|
|
22
|
+
}
|
|
23
|
+
return rootElement.innerText.trim()
|
|
29
24
|
}
|
|
30
25
|
|
|
31
|
-
|
|
32
26
|
const loadCopyButton = () => {
|
|
33
|
-
|
|
34
|
-
* the >>> and ... prompts and the output and thus make the code
|
|
35
|
-
* copyable. */
|
|
36
|
-
const hide_text = "Hide the prompts and output"
|
|
37
|
-
const show_text = "Show the prompts and output"
|
|
38
|
-
|
|
39
|
-
const button = document.createElement("span")
|
|
27
|
+
const button = document.createElement("button")
|
|
40
28
|
button.classList.add("copybutton")
|
|
41
|
-
button.
|
|
42
|
-
button.
|
|
43
|
-
button.
|
|
44
|
-
|
|
29
|
+
button.type = "button"
|
|
30
|
+
button.innerText = _("Copy")
|
|
31
|
+
button.title = _("Copy to clipboard")
|
|
32
|
+
|
|
33
|
+
const makeOnButtonClick = () => {
|
|
34
|
+
let timeout = null
|
|
45
35
|
// define the behavior of the button when it's clicked
|
|
46
|
-
event
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// hide the code output
|
|
51
|
-
for (const el of getHideableCopyButtonElements(codeEl)) {
|
|
52
|
-
el.hidden = true
|
|
36
|
+
return async event => {
|
|
37
|
+
// check if the clipboard is available
|
|
38
|
+
if (!navigator.clipboard || !navigator.clipboard.writeText) {
|
|
39
|
+
return;
|
|
53
40
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
41
|
+
|
|
42
|
+
clearTimeout(timeout)
|
|
43
|
+
const buttonEl = event.currentTarget
|
|
44
|
+
const codeEl = buttonEl.nextElementSibling
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
await navigator.clipboard.writeText(getCopyableText(codeEl))
|
|
48
|
+
} catch (e) {
|
|
49
|
+
console.error(e.message)
|
|
50
|
+
return
|
|
60
51
|
}
|
|
61
|
-
|
|
62
|
-
buttonEl.
|
|
52
|
+
|
|
53
|
+
buttonEl.innerText = _("Copied!")
|
|
54
|
+
timeout = setTimeout(() => {
|
|
55
|
+
buttonEl.innerText = _("Copy")
|
|
56
|
+
}, 1500)
|
|
63
57
|
}
|
|
64
58
|
}
|
|
65
59
|
|
|
@@ -78,10 +72,8 @@ const loadCopyButton = () => {
|
|
|
78
72
|
// if we find a console prompt (.gp), prepend the (deeply cloned) button
|
|
79
73
|
const clonedButton = button.cloneNode(true)
|
|
80
74
|
// the onclick attribute is not cloned, set it on the new element
|
|
81
|
-
clonedButton.onclick =
|
|
82
|
-
|
|
83
|
-
el.prepend(clonedButton)
|
|
84
|
-
}
|
|
75
|
+
clonedButton.onclick = makeOnButtonClick()
|
|
76
|
+
el.prepend(clonedButton)
|
|
85
77
|
})
|
|
86
78
|
}
|
|
87
79
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import url('classic.css');
|
|
2
|
-
|
|
3
1
|
/* Common colours */
|
|
4
2
|
:root {
|
|
5
3
|
--good-color: rgb(41 100 51);
|
|
@@ -200,16 +198,6 @@ div.sphinxsidebar input[type='text'] {
|
|
|
200
198
|
display: flex;
|
|
201
199
|
justify-content: center;
|
|
202
200
|
align-items: center;
|
|
203
|
-
/* Sphinx 4.x and earlier compat */
|
|
204
|
-
height: 100%;
|
|
205
|
-
background-color: #CCCCCC;
|
|
206
|
-
margin-left: 0;
|
|
207
|
-
color: #444444;
|
|
208
|
-
font-size: 1.2em;
|
|
209
|
-
cursor: pointer;
|
|
210
|
-
padding-top: 1px;
|
|
211
|
-
float: none;
|
|
212
|
-
/* after Sphinx 4.x and earlier is dropped, only the below is needed */
|
|
213
201
|
width: 12px;
|
|
214
202
|
min-width: 12px;
|
|
215
203
|
border-radius: 0 5px 5px 0;
|
|
@@ -340,6 +328,10 @@ tt, code, pre {
|
|
|
340
328
|
font-size: 96.5%;
|
|
341
329
|
}
|
|
342
330
|
|
|
331
|
+
div.body pre {
|
|
332
|
+
line-height: 120%;
|
|
333
|
+
}
|
|
334
|
+
|
|
343
335
|
div.body tt,
|
|
344
336
|
div.body code {
|
|
345
337
|
border-radius: 3px;
|
|
@@ -450,17 +442,23 @@ div.genindex-jumpbox a {
|
|
|
450
442
|
top: 0;
|
|
451
443
|
right: 0;
|
|
452
444
|
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
|
|
453
|
-
|
|
454
|
-
padding-
|
|
445
|
+
font-size: 80%;
|
|
446
|
+
padding-left: .5em;
|
|
447
|
+
padding-right: .5em;
|
|
448
|
+
height: 100%;
|
|
449
|
+
max-height: min(100%, 2.4em);
|
|
455
450
|
border-radius: 0 3px 0 0;
|
|
456
|
-
color: #
|
|
457
|
-
|
|
458
|
-
border
|
|
459
|
-
|
|
451
|
+
color: #000;
|
|
452
|
+
background-color: #fff;
|
|
453
|
+
border: 1px solid #ac9; /* follows div.body pre */
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.copybutton:hover {
|
|
457
|
+
background-color: #eee;
|
|
460
458
|
}
|
|
461
459
|
|
|
462
|
-
.copybutton
|
|
463
|
-
|
|
460
|
+
.copybutton:active {
|
|
461
|
+
background-color: #ddd;
|
|
464
462
|
}
|
|
465
463
|
|
|
466
464
|
@media (max-width: 1023px) {
|
|
@@ -176,3 +176,16 @@ img.invert-in-dark-mode {
|
|
|
176
176
|
--versionchanged: var(--middle-color);
|
|
177
177
|
--deprecated: var(--bad-color);
|
|
178
178
|
}
|
|
179
|
+
|
|
180
|
+
.copybutton {
|
|
181
|
+
color: #ac9; /* follows div.body pre */
|
|
182
|
+
background-color: #222222; /* follows body */
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.copybutton:hover {
|
|
186
|
+
background-color: #434343;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.copybutton:active {
|
|
190
|
+
background-color: #656565;
|
|
191
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[theme]
|
|
2
|
+
inherit = "default"
|
|
3
|
+
stylesheets = [
|
|
4
|
+
"classic.css",
|
|
5
|
+
"pydoctheme.css",
|
|
6
|
+
]
|
|
7
|
+
pygments_style = { default = "default", dark = "monokai" }
|
|
8
|
+
|
|
9
|
+
[options]
|
|
10
|
+
bodyfont = "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"
|
|
11
|
+
headfont = "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"
|
|
12
|
+
footerbgcolor = "white"
|
|
13
|
+
footertextcolor = "#555555"
|
|
14
|
+
relbarbgcolor = "white"
|
|
15
|
+
relbartextcolor = "#666666"
|
|
16
|
+
relbarlinkcolor = "#444444"
|
|
17
|
+
sidebarbgcolor = "white"
|
|
18
|
+
sidebartextcolor = "#444444"
|
|
19
|
+
sidebarlinkcolor = "#444444"
|
|
20
|
+
sidebarbtncolor = "#cccccc"
|
|
21
|
+
bgcolor = "white"
|
|
22
|
+
textcolor = "#222222"
|
|
23
|
+
linkcolor = "#0090c0"
|
|
24
|
+
visitedlinkcolor = "#00608f"
|
|
25
|
+
headtextcolor = "#1a1a1a"
|
|
26
|
+
headbgcolor = "white"
|
|
27
|
+
headlinkcolor = "#aaaaaa"
|
|
28
|
+
codebgcolor = "#eeffcc"
|
|
29
|
+
codetextcolor = "#333333"
|
|
30
|
+
|
|
31
|
+
hosted_on = ""
|
|
32
|
+
issues_url = ""
|
|
33
|
+
license_url = ""
|
|
34
|
+
root_name = "Python"
|
|
35
|
+
root_url = "https://www.python.org/"
|
|
36
|
+
root_icon = "py.svg"
|
|
37
|
+
root_icon_alt_text = "Python logo"
|
|
38
|
+
root_include_title = "True"
|
|
39
|
+
copyright_url = ""
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-docs-theme
|
|
3
|
-
Version: 2025.
|
|
3
|
+
Version: 2025.4.1
|
|
4
4
|
Summary: The Sphinx theme for the CPython docs and related projects
|
|
5
5
|
Author-email: PyPA <distutils-sig@python.org>
|
|
6
|
-
Requires-Python: >=3.
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
+
License-Expression: PSF-2.0
|
|
8
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
10
|
Classifier: Framework :: Sphinx :: Theme
|
|
10
11
|
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: License :: OSI Approved :: Python Software Foundation License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
18
|
Classifier: Topic :: Documentation
|
|
21
19
|
Classifier: Topic :: Software Development :: Documentation
|
|
22
|
-
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: sphinx>=7.3
|
|
23
22
|
Project-URL: Code, https://github.com/python/python-docs-theme
|
|
24
23
|
Project-URL: Download, https://pypi.org/project/python-docs-theme/
|
|
25
24
|
Project-URL: Homepage, https://github.com/python/python-docs-theme/
|
|
@@ -28,7 +27,7 @@ Project-URL: Issue tracker, https://github.com/python/python-docs-theme/issues
|
|
|
28
27
|
# Python Docs Sphinx Theme
|
|
29
28
|
|
|
30
29
|
This is the theme for the Python documentation.
|
|
31
|
-
It requires Python 3.
|
|
30
|
+
It requires Python 3.12 or newer and Sphinx 7.3 or newer.
|
|
32
31
|
|
|
33
32
|
Note that when adopting this theme, you're also borrowing an element of the
|
|
34
33
|
trust and credibility established by the CPython core developers over the
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
python_docs_theme/__init__.py,sha256=hCvreDfgmbewAnbYuqZ2ov6jD5LldvKHwbPkYIF0AZc,533
|
|
2
|
+
python_docs_theme/footerdonate.html,sha256=-FO52fS7x4iqjtMD9un5b--rPED2BPlcug9gkUMW2Uk,182
|
|
3
|
+
python_docs_theme/layout.html,sha256=0VeG3IEXiWEBnETcCHDnCnHsTgPVEUninHfvgWq7KN8,7861
|
|
4
|
+
python_docs_theme/theme.toml,sha256=Y39XrHfXHgz6wdQgG-KX_Oewp2SQOrHswKBsGzvWsis,1139
|
|
5
|
+
python_docs_theme/static/copybutton.js,sha256=t9_nK_Gh_SI4oxm-sBc3gaQW-3McdEdpunG-3cULfuw,2791
|
|
6
|
+
python_docs_theme/static/menu.js,sha256=JmrKD08_6CiCgQH32As9AgiSiV-th1fZInVrmTCihzA,2137
|
|
7
|
+
python_docs_theme/static/py.png,sha256=rhc9xIQjUfwcilUa-9tYyyspVJB4ITDapPNZpqgNclY,695
|
|
8
|
+
python_docs_theme/static/py.svg,sha256=WGW-i8wK-IhZSQPqARL2yNkjxXJsQIHoyFYRDMcznO8,2041
|
|
9
|
+
python_docs_theme/static/pydoctheme.css,sha256=dy_l2epKFqXfH05WlE7N8zH5J6lJ_uNdsR9UntDpcTQ,15196
|
|
10
|
+
python_docs_theme/static/pydoctheme_dark.css,sha256=kBPdZntNZFTtY7DJTNprMZkxlymdt1jfMqRsnvFafAE,3472
|
|
11
|
+
python_docs_theme/static/search-focus.js,sha256=DwWV71ssKvrzagPenP7yLvFQCdyqFJirbBk1PFRvVoA,559
|
|
12
|
+
python_docs_theme/static/themetoggle.js,sha256=6D1LE0wg8DjPP776_KxPCxXdIk-gGJJX5DYpHFLG1Uw,779
|
|
13
|
+
python_docs_theme-2025.4.1.dist-info/entry_points.txt,sha256=VqpxCWQkYo2DkZVV2D2vA9LKmexR1Yhicqsrff4JAag,58
|
|
14
|
+
python_docs_theme-2025.4.1.dist-info/licenses/LICENSE,sha256=lx_9CsorlYBu9cw97FX-A1VnHHmrwk-H-jydZBJlWmY,2460
|
|
15
|
+
python_docs_theme-2025.4.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
16
|
+
python_docs_theme-2025.4.1.dist-info/METADATA,sha256=I6UKOstXH_zgerGzqEEkib7-fKyeOuOGCDteH6CfyX4,2256
|
|
17
|
+
python_docs_theme-2025.4.1.dist-info/RECORD,,
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* sidebar.js
|
|
3
|
-
* ~~~~~~~~~~
|
|
4
|
-
*
|
|
5
|
-
* This file is functionally identical to "sidebar.js" in Sphinx 5.0.
|
|
6
|
-
* When support for Sphinx 4 and earlier is dropped from the theme,
|
|
7
|
-
* this file can be removed.
|
|
8
|
-
*
|
|
9
|
-
* This script makes the Sphinx sidebar collapsible.
|
|
10
|
-
*
|
|
11
|
-
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
|
|
12
|
-
* in .sphinxsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
|
|
13
|
-
* used to collapse and expand the sidebar.
|
|
14
|
-
*
|
|
15
|
-
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
|
|
16
|
-
* and the width of the sidebar and the margin-left of the document
|
|
17
|
-
* are decreased. When the sidebar is expanded the opposite happens.
|
|
18
|
-
* This script saves a per-browser/per-session cookie used to
|
|
19
|
-
* remember the position of the sidebar among the pages.
|
|
20
|
-
* Once the browser is closed the cookie is deleted and the position
|
|
21
|
-
* reset to the default (expanded).
|
|
22
|
-
*
|
|
23
|
-
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
|
24
|
-
* :license: BSD, see LICENSE for details.
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
const initialiseSidebar = () => {
|
|
29
|
-
// global elements used by the functions.
|
|
30
|
-
const bodyWrapper = document.getElementsByClassName("bodywrapper")[0]
|
|
31
|
-
const sidebar = document.getElementsByClassName("sphinxsidebar")[0]
|
|
32
|
-
const sidebarWrapper = document.getElementsByClassName("sphinxsidebarwrapper")[0]
|
|
33
|
-
|
|
34
|
-
// exit early if the document has no sidebar for some reason
|
|
35
|
-
if (typeof sidebar === "undefined") {
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
{# Check if we need to dynamically insert the sidebar button.
|
|
40
|
-
# We prefer the ``sphinx_version_tuple`` variable, and if it is undefined we
|
|
41
|
-
# know we are running a Sphinx version older than 4.2.
|
|
42
|
-
#
|
|
43
|
-
# See: https://www.sphinx-doc.org/en/master/development/templating.html#sphinx_version_tuple
|
|
44
|
-
#}
|
|
45
|
-
{% if sphinx_version_tuple is defined and sphinx_version_tuple[0] >= 5 %}
|
|
46
|
-
const sidebarButton = document.getElementById("sidebarbutton")
|
|
47
|
-
const sidebarArrow = sidebarButton.querySelector('span')
|
|
48
|
-
{% else %}
|
|
49
|
-
// create the sidebar button element
|
|
50
|
-
const sidebarButton = document.createElement("div")
|
|
51
|
-
sidebarButton.id = "sidebarbutton"
|
|
52
|
-
// create the sidebar button arrow element
|
|
53
|
-
const sidebarArrow = document.createElement("span")
|
|
54
|
-
sidebarArrow.innerText = "«"
|
|
55
|
-
sidebarButton.appendChild(sidebarArrow)
|
|
56
|
-
sidebar.appendChild(sidebarButton)
|
|
57
|
-
{% endif %}
|
|
58
|
-
|
|
59
|
-
const collapse_sidebar = () => {
|
|
60
|
-
bodyWrapper.style.marginLeft = ".8em"
|
|
61
|
-
sidebar.style.width = ".8em"
|
|
62
|
-
sidebarWrapper.style.display = "none"
|
|
63
|
-
sidebarArrow.innerText = "»"
|
|
64
|
-
sidebarButton.title = _("Expand sidebar")
|
|
65
|
-
window.localStorage.setItem("sidebar", "collapsed")
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const expand_sidebar = () => {
|
|
69
|
-
bodyWrapper.style.marginLeft = ""
|
|
70
|
-
sidebar.style.removeProperty("width")
|
|
71
|
-
sidebarWrapper.style.display = ""
|
|
72
|
-
sidebarArrow.innerText = "«"
|
|
73
|
-
sidebarButton.title = _("Collapse sidebar")
|
|
74
|
-
window.localStorage.setItem("sidebar", "expanded")
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
sidebarButton.addEventListener("click", () => {
|
|
78
|
-
(sidebarWrapper.style.display === "none") ? expand_sidebar() : collapse_sidebar()
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
const sidebar_state = window.localStorage.getItem("sidebar")
|
|
82
|
-
if (sidebar_state === "collapsed") {
|
|
83
|
-
collapse_sidebar()
|
|
84
|
-
}
|
|
85
|
-
else if (sidebar_state === "expanded") {
|
|
86
|
-
expand_sidebar()
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (document.readyState !== "loading") {
|
|
91
|
-
initialiseSidebar()
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
document.addEventListener("DOMContentLoaded", initialiseSidebar)
|
|
95
|
-
}
|
python_docs_theme/theme.conf
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
[theme]
|
|
2
|
-
inherit = default
|
|
3
|
-
stylesheet = pydoctheme.css
|
|
4
|
-
pygments_style = default
|
|
5
|
-
pygments_dark_style = monokai
|
|
6
|
-
|
|
7
|
-
[options]
|
|
8
|
-
bodyfont = -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif
|
|
9
|
-
headfont = -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif
|
|
10
|
-
footerbgcolor = white
|
|
11
|
-
footertextcolor = #555555
|
|
12
|
-
relbarbgcolor = white
|
|
13
|
-
relbartextcolor = #666666
|
|
14
|
-
relbarlinkcolor = #444444
|
|
15
|
-
sidebarbgcolor = white
|
|
16
|
-
sidebartextcolor = #444444
|
|
17
|
-
sidebarlinkcolor = #444444
|
|
18
|
-
sidebarbtncolor = #cccccc
|
|
19
|
-
bgcolor = white
|
|
20
|
-
textcolor = #222222
|
|
21
|
-
linkcolor = #0090c0
|
|
22
|
-
visitedlinkcolor = #00608f
|
|
23
|
-
headtextcolor = #1a1a1a
|
|
24
|
-
headbgcolor = white
|
|
25
|
-
headlinkcolor = #aaaaaa
|
|
26
|
-
codebgcolor = #eeffcc
|
|
27
|
-
codetextcolor = #333333
|
|
28
|
-
|
|
29
|
-
hosted_on =
|
|
30
|
-
issues_url =
|
|
31
|
-
license_url =
|
|
32
|
-
root_name = Python
|
|
33
|
-
root_url = https://www.python.org/
|
|
34
|
-
root_icon = py.svg
|
|
35
|
-
root_icon_alt_text = Python logo
|
|
36
|
-
root_include_title = True
|
|
37
|
-
copyright_url =
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
python_docs_theme/__init__.py,sha256=iAcK7Elf4JUzoTWAZ3rK5Ox7TDJK8X8NabQ6v6Qq6y8,1996
|
|
2
|
-
python_docs_theme/footerdonate.html,sha256=SVxLBvbrliqOzjau4SdhhtkRGXxX5ZrZN6Yr6luRhIQ,184
|
|
3
|
-
python_docs_theme/layout.html,sha256=W5gSelJr85H5a1uaSPUDFoONpaGscpqdJkKszq5t95E,7891
|
|
4
|
-
python_docs_theme/theme.conf,sha256=y8hpLRiQymGaL7AuTvXRxmhUMk6I3ehHCh5fUWbfD88,1040
|
|
5
|
-
python_docs_theme/static/copybutton.js,sha256=LSeNL29gDNKg3fv4rfcb8t-8xkH6HozpCbJXI9FuO6U,3508
|
|
6
|
-
python_docs_theme/static/menu.js,sha256=JmrKD08_6CiCgQH32As9AgiSiV-th1fZInVrmTCihzA,2137
|
|
7
|
-
python_docs_theme/static/py.png,sha256=rhc9xIQjUfwcilUa-9tYyyspVJB4ITDapPNZpqgNclY,695
|
|
8
|
-
python_docs_theme/static/py.svg,sha256=WGW-i8wK-IhZSQPqARL2yNkjxXJsQIHoyFYRDMcznO8,2041
|
|
9
|
-
python_docs_theme/static/pydoctheme.css,sha256=4ctRAZBn9yhKtvFKxDL5PPQSIQFT9UguuB9roGToPe4,15467
|
|
10
|
-
python_docs_theme/static/pydoctheme_dark.css,sha256=NJ3l0yMhn_hH3CPJ5f_DwxxSr6j4OHHEvaxzkM9Yy2k,3252
|
|
11
|
-
python_docs_theme/static/search-focus.js,sha256=DwWV71ssKvrzagPenP7yLvFQCdyqFJirbBk1PFRvVoA,559
|
|
12
|
-
python_docs_theme/static/sidebar.js_t,sha256=swTyAoy6dNGm6Ro0_iRl_9ujRrIz5nq207tMIqNnYgs,3350
|
|
13
|
-
python_docs_theme/static/themetoggle.js,sha256=6D1LE0wg8DjPP776_KxPCxXdIk-gGJJX5DYpHFLG1Uw,779
|
|
14
|
-
python_docs_theme-2025.2.dist-info/entry_points.txt,sha256=VqpxCWQkYo2DkZVV2D2vA9LKmexR1Yhicqsrff4JAag,58
|
|
15
|
-
python_docs_theme-2025.2.dist-info/LICENSE,sha256=lx_9CsorlYBu9cw97FX-A1VnHHmrwk-H-jydZBJlWmY,2460
|
|
16
|
-
python_docs_theme-2025.2.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
17
|
-
python_docs_theme-2025.2.dist-info/METADATA,sha256=YaQ5cf3Rz81isdduvkbEs3R6QNXIvvo3zycrrf0LsJE,2377
|
|
18
|
-
python_docs_theme-2025.2.dist-info/RECORD,,
|
{python_docs_theme-2025.2.dist-info → python_docs_theme-2025.4.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{python_docs_theme-2025.2.dist-info → python_docs_theme-2025.4.1.dist-info/licenses}/LICENSE
RENAMED
|
File without changes
|