python-docs-theme 2023.9__py3-none-any.whl → 2024.2__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 +5 -3
- python_docs_theme/layout.html +5 -4
- python_docs_theme/static/menu.js +1 -1
- python_docs_theme/static/pydoctheme.css +41 -1
- python_docs_theme/static/pydoctheme_dark.css +4 -0
- python_docs_theme/theme.conf +2 -0
- {python_docs_theme-2023.9.dist-info → python_docs_theme-2024.2.dist-info}/METADATA +13 -6
- python_docs_theme-2024.2.dist-info/RECORD +18 -0
- python_docs_theme-2023.9.dist-info/RECORD +0 -18
- {python_docs_theme-2023.9.dist-info → python_docs_theme-2024.2.dist-info}/LICENSE +0 -0
- {python_docs_theme-2023.9.dist-info → python_docs_theme-2024.2.dist-info}/WHEEL +0 -0
- {python_docs_theme-2023.9.dist-info → python_docs_theme-2024.2.dist-info}/entry_points.txt +0 -0
python_docs_theme/__init__.py
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
import hashlib
|
|
2
4
|
import os
|
|
3
5
|
from functools import lru_cache
|
|
4
6
|
from pathlib import Path
|
|
5
|
-
from typing import Any
|
|
7
|
+
from typing import Any
|
|
6
8
|
|
|
7
9
|
import sphinx.application
|
|
8
10
|
from sphinx.builders.html import StandaloneHTMLBuilder
|
|
@@ -19,7 +21,7 @@ def _asset_hash(path: str) -> str:
|
|
|
19
21
|
return f"{path}?digest={digest}"
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
def _add_asset_hashes(static:
|
|
24
|
+
def _add_asset_hashes(static: list[str], add_digest_to: list[str]) -> None:
|
|
23
25
|
for asset in add_digest_to:
|
|
24
26
|
index = static.index(asset)
|
|
25
27
|
static[index].filename = _asset_hash(asset) # type: ignore
|
|
@@ -29,7 +31,7 @@ def _html_page_context(
|
|
|
29
31
|
app: sphinx.application.Sphinx,
|
|
30
32
|
pagename: str,
|
|
31
33
|
templatename: str,
|
|
32
|
-
context:
|
|
34
|
+
context: dict[str, Any],
|
|
33
35
|
doctree: Any,
|
|
34
36
|
) -> None:
|
|
35
37
|
if app.config.html_theme != "python_docs_theme":
|
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/
|
|
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>
|
|
@@ -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/'
|
|
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>
|
|
@@ -100,7 +100,7 @@
|
|
|
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/
|
|
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" %}
|
|
@@ -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/'
|
|
124
|
+
<img class="logo" src="{{ pathto('_static/' ~ logo, 1)|e }}" alt="Logo"/>
|
|
125
125
|
</a>
|
|
126
126
|
</p>
|
|
127
127
|
{%- endif %}
|
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
{% trans %}Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.{% endtrans %}
|
|
144
144
|
<br />
|
|
145
145
|
{% if theme_license_url %}{% trans license_file=theme_license_url %}See <a href="{{ license_file }}">History and License</a> for more information.{% endtrans %}<br />{% endif %}
|
|
146
|
+
{% if theme_hosted_on %}{% trans hosted_on=theme_hosted_on %}Hosted on {{ hosted_on }}.{% endtrans %}<br />{% endif %}
|
|
146
147
|
<br />
|
|
147
148
|
|
|
148
149
|
{% include "footerdonate.html" %}
|
python_docs_theme/static/menu.js
CHANGED
|
@@ -29,6 +29,42 @@ pre {
|
|
|
29
29
|
color: inherit;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/* Add underlines to links */
|
|
33
|
+
a[href] {
|
|
34
|
+
text-decoration: underline 1px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Increase the underline offset for code to avoid obscuring underscores */
|
|
38
|
+
a[href]:has(> code) {
|
|
39
|
+
text-underline-offset: 0.25em;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* No underline for navigation */
|
|
43
|
+
a.headerlink,
|
|
44
|
+
div.genindex-jumpbox a,
|
|
45
|
+
div.modindex-jumpbox a,
|
|
46
|
+
div#search-results a,
|
|
47
|
+
div.sphinxsidebar a,
|
|
48
|
+
div.toctree-wrapper a,
|
|
49
|
+
div[role=navigation] a,
|
|
50
|
+
table.contentstable a,
|
|
51
|
+
table.indextable a {
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Except when hovered */
|
|
56
|
+
div.genindex-jumpbox a:hover,
|
|
57
|
+
div.modindex-jumpbox a:hover,
|
|
58
|
+
div#search-results a:hover,
|
|
59
|
+
div.sphinxsidebar a:hover,
|
|
60
|
+
div.toctree-wrapper a:hover,
|
|
61
|
+
div[role=navigation] a:hover,
|
|
62
|
+
table.contentstable a:hover,
|
|
63
|
+
table.indextable a:hover {
|
|
64
|
+
text-decoration: underline;
|
|
65
|
+
text-underline-offset: auto;
|
|
66
|
+
}
|
|
67
|
+
|
|
32
68
|
body {
|
|
33
69
|
margin-left: 1em;
|
|
34
70
|
margin-right: 1em;
|
|
@@ -177,7 +213,7 @@ div.body {
|
|
|
177
213
|
|
|
178
214
|
div.body p, div.body dd, div.body li, div.body blockquote {
|
|
179
215
|
text-align: left;
|
|
180
|
-
line-height: 1.
|
|
216
|
+
line-height: 1.6;
|
|
181
217
|
}
|
|
182
218
|
div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 {
|
|
183
219
|
margin: 0;
|
|
@@ -279,6 +315,10 @@ div.footer {
|
|
|
279
315
|
margin-right: 10px;
|
|
280
316
|
}
|
|
281
317
|
|
|
318
|
+
div.footer a {
|
|
319
|
+
text-underline-offset: auto;
|
|
320
|
+
}
|
|
321
|
+
|
|
282
322
|
div.footer a:hover {
|
|
283
323
|
color: #0095c4;
|
|
284
324
|
}
|
python_docs_theme/theme.conf
CHANGED
|
@@ -26,10 +26,12 @@ headlinkcolor = #aaaaaa
|
|
|
26
26
|
codebgcolor = #eeffcc
|
|
27
27
|
codetextcolor = #333333
|
|
28
28
|
|
|
29
|
+
hosted_on =
|
|
29
30
|
issues_url =
|
|
30
31
|
license_url =
|
|
31
32
|
root_name = Python
|
|
32
33
|
root_url = https://www.python.org/
|
|
33
34
|
root_icon = py.svg
|
|
35
|
+
root_icon_alt_text = Python logo
|
|
34
36
|
root_include_title = True
|
|
35
37
|
copyright_url =
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-docs-theme
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2024.2
|
|
4
4
|
Summary: The Sphinx theme for the CPython docs and related projects
|
|
5
5
|
Author-email: PyPA <distutils-sig@python.org>
|
|
6
6
|
Requires-Python: >=3.8
|
|
@@ -10,16 +10,16 @@ Classifier: Framework :: Sphinx :: Theme
|
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: License :: OSI Approved :: Python Software Foundation License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Topic :: Documentation
|
|
14
|
-
Classifier: Topic :: Software Development :: Documentation
|
|
15
13
|
Classifier: Programming Language :: Python
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Documentation
|
|
22
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
23
23
|
Project-URL: Code, https://github.com/python/python-docs-theme
|
|
24
24
|
Project-URL: Download, https://pypi.org/project/python-docs-theme/
|
|
25
25
|
Project-URL: Homepage, https://github.com/python/python-docs-theme/
|
|
@@ -37,7 +37,7 @@ projects if you so choose, but please keep in mind that in doing so you're also
|
|
|
37
37
|
choosing to accept some of the responsibility for maintaining that collective
|
|
38
38
|
trust.
|
|
39
39
|
|
|
40
|
-
To use the theme, install it into your docs build environment via ``pip``
|
|
40
|
+
To use the theme, install it into your docs build environment via ``pip``
|
|
41
41
|
(preferably in a virtual environment).
|
|
42
42
|
|
|
43
43
|
|
|
@@ -48,5 +48,12 @@ To use this theme, add the following to ``conf.py``:
|
|
|
48
48
|
|
|
49
49
|
- ``html_theme = 'python_docs_theme'``
|
|
50
50
|
|
|
51
|
-
- ``html_sidebars``, defaults taken from
|
|
51
|
+
- ``html_sidebars``, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
|
|
52
|
+
|
|
53
|
+
Preview
|
|
54
|
+
-------
|
|
55
|
+
|
|
56
|
+
See a demo of the CPython docs using this theme:
|
|
57
|
+
|
|
58
|
+
- https://python-docs-theme-previews.readthedocs.io
|
|
52
59
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
python_docs_theme/__init__.py,sha256=lohzhV2LTSRLhxi0G8Emc_TkccarW1O4aYXvFGU1HR8,1814
|
|
2
|
+
python_docs_theme/footerdonate.html,sha256=SVxLBvbrliqOzjau4SdhhtkRGXxX5ZrZN6Yr6luRhIQ,184
|
|
3
|
+
python_docs_theme/layout.html,sha256=BiJLOd6L5GsmI81SPfOe2NfG1kB503eCxAylsk07trI,7775
|
|
4
|
+
python_docs_theme/theme.conf,sha256=z6-gO0B0Lu7gdAW4RrNfUQCutmL8pHlZoQzjFZa5zAA,822
|
|
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=R1O74BqxlbtsxLYD7cElEKe3or2MRArqJVylcGLla1A,12050
|
|
10
|
+
python_docs_theme/static/pydoctheme_dark.css,sha256=R_FU5JN8Jcx_0fOkSJlp2rWrd6GoGLyXHhULFyqdXno,2214
|
|
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-2024.2.dist-info/entry_points.txt,sha256=VqpxCWQkYo2DkZVV2D2vA9LKmexR1Yhicqsrff4JAag,58
|
|
15
|
+
python_docs_theme-2024.2.dist-info/LICENSE,sha256=lx_9CsorlYBu9cw97FX-A1VnHHmrwk-H-jydZBJlWmY,2460
|
|
16
|
+
python_docs_theme-2024.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
17
|
+
python_docs_theme-2024.2.dist-info/METADATA,sha256=X3HPbI1TNK8dTZ_KcbjzOp8qmiLCS1QSXUrZdT169vw,2265
|
|
18
|
+
python_docs_theme-2024.2.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
python_docs_theme/__init__.py,sha256=rcPPT37dRpTSU2-k0p_wLP5yb29mG9zyyZ1AJmX6uO4,1790
|
|
2
|
-
python_docs_theme/footerdonate.html,sha256=SVxLBvbrliqOzjau4SdhhtkRGXxX5ZrZN6Yr6luRhIQ,184
|
|
3
|
-
python_docs_theme/layout.html,sha256=XgamCw_NhPPhbTqqmvkaMspYdtU7-PTYZcLnuXg6log,7583
|
|
4
|
-
python_docs_theme/theme.conf,sha256=aWs-01gZecIovY1zNsGUNv7Z8fxjP9-GgiAlp5_rUhw,777
|
|
5
|
-
python_docs_theme/static/copybutton.js,sha256=LSeNL29gDNKg3fv4rfcb8t-8xkH6HozpCbJXI9FuO6U,3508
|
|
6
|
-
python_docs_theme/static/menu.js,sha256=jJvLLkbdnWWv4sUBZHNKf5-qck72pF-GDXMsVNPH1RY,2136
|
|
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=AlSyGY86UzJV_36GUYORPI6gazIBnLZP2WbzBanffsI,11200
|
|
10
|
-
python_docs_theme/static/pydoctheme_dark.css,sha256=4K8pV4lsysDo2JR1CllPW8bvFG_iawAPGaf6H35rxlo,2161
|
|
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-2023.9.dist-info/entry_points.txt,sha256=VqpxCWQkYo2DkZVV2D2vA9LKmexR1Yhicqsrff4JAag,58
|
|
15
|
-
python_docs_theme-2023.9.dist-info/LICENSE,sha256=lx_9CsorlYBu9cw97FX-A1VnHHmrwk-H-jydZBJlWmY,2460
|
|
16
|
-
python_docs_theme-2023.9.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
|
17
|
-
python_docs_theme-2023.9.dist-info/METADATA,sha256=SELD2lI5cX6LUDWw_pajqED9e0WaSsei3E-ZDvnUPaE,2124
|
|
18
|
-
python_docs_theme-2023.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|