python-docs-theme 2024.2__tar.gz → 2024.4__tar.gz

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.
Files changed (17) hide show
  1. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/PKG-INFO +13 -12
  2. python_docs_theme-2024.2/README.rst → python_docs_theme-2024.4/README.md +11 -10
  3. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/pyproject.toml +6 -2
  4. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/layout.html +19 -5
  5. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/pydoctheme.css +51 -5
  6. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/pydoctheme_dark.css +7 -0
  7. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/theme.conf +2 -2
  8. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/LICENSE +0 -0
  9. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/__init__.py +0 -0
  10. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/footerdonate.html +0 -0
  11. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/copybutton.js +0 -0
  12. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/menu.js +0 -0
  13. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/py.png +0 -0
  14. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/py.svg +0 -0
  15. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/search-focus.js +0 -0
  16. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/sidebar.js_t +0 -0
  17. {python_docs_theme-2024.2 → python_docs_theme-2024.4}/python_docs_theme/static/themetoggle.js +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-docs-theme
3
- Version: 2024.2
3
+ Version: 2024.4
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
7
- Description-Content-Type: text/x-rst
7
+ Description-Content-Type: text/markdown
8
8
  Classifier: Development Status :: 5 - Production/Stable
9
9
  Classifier: Framework :: Sphinx :: Theme
10
10
  Classifier: Intended Audience :: Developers
@@ -25,8 +25,7 @@ Project-URL: Download, https://pypi.org/project/python-docs-theme/
25
25
  Project-URL: Homepage, https://github.com/python/python-docs-theme/
26
26
  Project-URL: Issue tracker, https://github.com/python/python-docs-theme/issues
27
27
 
28
- Python Docs Sphinx Theme
29
- =========================
28
+ # Python Docs Sphinx Theme
30
29
 
31
30
  This is the theme for the Python documentation.
32
31
 
@@ -37,23 +36,25 @@ projects if you so choose, but please keep in mind that in doing so you're also
37
36
  choosing to accept some of the responsibility for maintaining that collective
38
37
  trust.
39
38
 
40
- To use the theme, install it into your docs build environment via ``pip``
39
+ To use the theme, install it into your docs build environment via `pip`
41
40
  (preferably in a virtual environment).
42
41
 
43
42
 
44
- Configuration options
45
- ---------------------
43
+ ## Configuration options
46
44
 
47
- To use this theme, add the following to ``conf.py``:
45
+ To use this theme, add the following to `conf.py`:
48
46
 
49
- - ``html_theme = 'python_docs_theme'``
47
+ - `html_theme = 'python_docs_theme'`
50
48
 
51
- - ``html_sidebars``, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
49
+ - `html_sidebars`, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
52
50
 
53
- Preview
54
- -------
51
+ ## Preview
55
52
 
56
53
  See a demo of the CPython docs using this theme:
57
54
 
58
55
  - https://python-docs-theme-previews.readthedocs.io
59
56
 
57
+ The kitchen sink is a showcase of every Sphinx feature:
58
+
59
+ - https://sphinx-themes.org/sample-sites/python-docs-theme/kitchen-sink/
60
+
@@ -1,5 +1,4 @@
1
- Python Docs Sphinx Theme
2
- =========================
1
+ # Python Docs Sphinx Theme
3
2
 
4
3
  This is the theme for the Python documentation.
5
4
 
@@ -10,22 +9,24 @@ projects if you so choose, but please keep in mind that in doing so you're also
10
9
  choosing to accept some of the responsibility for maintaining that collective
11
10
  trust.
12
11
 
13
- To use the theme, install it into your docs build environment via ``pip``
12
+ To use the theme, install it into your docs build environment via `pip`
14
13
  (preferably in a virtual environment).
15
14
 
16
15
 
17
- Configuration options
18
- ---------------------
16
+ ## Configuration options
19
17
 
20
- To use this theme, add the following to ``conf.py``:
18
+ To use this theme, add the following to `conf.py`:
21
19
 
22
- - ``html_theme = 'python_docs_theme'``
20
+ - `html_theme = 'python_docs_theme'`
23
21
 
24
- - ``html_sidebars``, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
22
+ - `html_sidebars`, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
25
23
 
26
- Preview
27
- -------
24
+ ## Preview
28
25
 
29
26
  See a demo of the CPython docs using this theme:
30
27
 
31
28
  - https://python-docs-theme-previews.readthedocs.io
29
+
30
+ The kitchen sink is a showcase of every Sphinx feature:
31
+
32
+ - https://sphinx-themes.org/sample-sites/python-docs-theme/kitchen-sink/
@@ -6,9 +6,9 @@ requires = [
6
6
 
7
7
  [project]
8
8
  name = "python-docs-theme"
9
- version = "2024.2"
9
+ version = "2024.4"
10
10
  description = "The Sphinx theme for the CPython docs and related projects"
11
- readme = "README.rst"
11
+ readme = "README.md"
12
12
  license.file = "LICENSE"
13
13
  authors = [{name = "PyPA", email = "distutils-sig@python.org"}]
14
14
  requires-python = ">=3.8"
@@ -43,3 +43,7 @@ name = "python_docs_theme"
43
43
  include = [
44
44
  "python_docs_theme/",
45
45
  ]
46
+
47
+ [tool.isort]
48
+ add_imports = "from __future__ import annotations"
49
+ profile = "black"
@@ -136,21 +136,35 @@
136
136
 
137
137
  {% block footer %}
138
138
  <div class="footer">
139
- &copy; {% if theme_copyright_url or hasdoc('copyright') %}<a href="{% if theme_copyright_url %}{{ theme_copyright_url }}{% else %}{{ pathto('copyright') }}{% endif %}">{% endif %}{% trans %}Copyright{% endtrans %}{% if theme_copyright_url or hasdoc('copyright') %}</a>{% endif %} {{ copyright|e }}.
139
+ &copy; {% if theme_copyright_url or hasdoc('copyright') %}
140
+ <a href="{% if theme_copyright_url %}{{ theme_copyright_url }}{% else %}{{ pathto('copyright') }}{% endif %}">
141
+ {% endif %}
142
+ {% trans %}Copyright{% endtrans %}
143
+ {% if theme_copyright_url or hasdoc('copyright') %}
144
+ </a>
145
+ {% endif %} {{ copyright|e }}.
140
146
  <br />
141
147
  {% trans %}This page is licensed under the Python Software Foundation License Version 2.{% endtrans %}
142
148
  <br />
143
149
  {% trans %}Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.{% endtrans %}
144
150
  <br />
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 %}
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 />
153
+ {% endif %}
154
+ {% if theme_hosted_on %}
155
+ {% trans hosted_on=theme_hosted_on %}Hosted on {{ hosted_on }}.{% endtrans %}<br />
156
+ {% endif %}
147
157
  <br />
148
158
 
149
159
  {% include "footerdonate.html" %}
150
160
  <br />
151
161
 
152
- {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
153
- {% if theme_issues_url %}{% trans %}<a href="{{ theme_issues_url }}">Found a bug</a>?{% endtrans %}{% endif %}
162
+ {%- if last_updated %}
163
+ {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
164
+ {%- endif %}
165
+ {% if theme_issues_url %}
166
+ {% trans %}<a href="{{ theme_issues_url }}">Found a bug</a>?{% endtrans %}
167
+ {% endif %}
154
168
  <br />
155
169
 
156
170
  {% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
@@ -170,7 +170,7 @@ div.sphinxsidebar a:hover {
170
170
  form.inline-search input,
171
171
  div.sphinxsidebar input,
172
172
  div.related input {
173
- font-family: 'Lucida Grande', Arial, sans-serif;
173
+ font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
174
174
  border: 1px solid #999999;
175
175
  font-size: smaller;
176
176
  border-radius: 3px;
@@ -258,7 +258,7 @@ div.body a:hover {
258
258
  }
259
259
 
260
260
  tt, code, pre {
261
- font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Liberation Mono", Menlo, Monaco, Consolas, monospace;
261
+ font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
262
262
  font-size: 96.5%;
263
263
  }
264
264
 
@@ -333,7 +333,7 @@ div.footer a:hover {
333
333
 
334
334
  dl > dt span ~ em,
335
335
  .sig {
336
- font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Liberation Mono", Menlo, Monaco, Consolas, monospace;
336
+ font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
337
337
  }
338
338
 
339
339
  .toctree-wrapper ul {
@@ -361,8 +361,7 @@ div.genindex-jumpbox a {
361
361
  position: absolute;
362
362
  top: 0;
363
363
  right: 0;
364
- text-size: 75%;
365
- font-family: monospace;
364
+ font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
366
365
  padding-left: 0.2em;
367
366
  padding-right: 0.2em;
368
367
  border-radius: 0 3px 0 0;
@@ -623,3 +622,50 @@ div.genindex-jumpbox a {
623
622
  margin-top: -2em;
624
623
  }
625
624
  }
625
+
626
+ /* Version change directives */
627
+ :root {
628
+ --versionadded: rgb(41 100 51);
629
+ --versionchanged: rgb(133 72 38);
630
+ --deprecated: rgb(159 49 51);
631
+
632
+ --versionadded-border: rgb(79 196 100);
633
+ --versionchanged-border: rgb(244, 227, 76);
634
+ --deprecated-border: rgb(244, 76, 78);
635
+ }
636
+
637
+ div.versionadded,
638
+ div.versionchanged,
639
+ div.deprecated,
640
+ div.deprecated-removed {
641
+ border-left: 3px solid;
642
+ padding: 0 1rem;
643
+ }
644
+
645
+ div.versionadded {
646
+ border-left-color: var(--versionadded-border);
647
+ }
648
+
649
+ div.versionchanged {
650
+ border-left-color: var(--versionchanged-border);
651
+ }
652
+
653
+ div.deprecated,
654
+ div.deprecated-removed,
655
+ div.versionremoved {
656
+ border-left-color: var(--deprecated-border);
657
+ }
658
+
659
+ div.versionadded .versionmodified {
660
+ color: var(--versionadded);
661
+ }
662
+
663
+ div.versionchanged .versionmodified {
664
+ color: var(--versionchanged);
665
+ }
666
+
667
+ div.deprecated .versionmodified,
668
+ div.deprecated-removed .versionmodified,
669
+ div.versionremoved .versionmodified {
670
+ color: var(--deprecated);
671
+ }
@@ -140,3 +140,10 @@ img.invert-in-dark-mode {
140
140
  .sig.cpp .k, .sig.cpp .kt {
141
141
  color: #5283ff;
142
142
  }
143
+
144
+ /* Version change directives */
145
+ :root {
146
+ --versionadded: rgb(79 196 100);
147
+ --versionchanged: rgb(244, 227, 76);
148
+ --deprecated: rgb(244, 76, 78);
149
+ }
@@ -5,8 +5,8 @@ pygments_style = default
5
5
  pygments_dark_style = monokai
6
6
 
7
7
  [options]
8
- bodyfont = 'Lucida Grande', Arial, sans-serif
9
- headfont = 'Lucida Grande', Arial, sans-serif
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
10
  footerbgcolor = white
11
11
  footertextcolor = #555555
12
12
  relbarbgcolor = white