From ec38133730ccb17e003ef97acb3bdbffa2bac2b0 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Mon, 22 Jan 2018 10:05:08 +0530 Subject: [PATCH 001/260] Use documentwrapper's height of sidebar (#9) This is sort of a more correct thing to do since the first/last element of the body may have a margin that can cause the documentwrapper to be taller than bodywrapper. While this doesn't cause any major issues for this theme as is (due to the ample use of whitespace around the sidebar), this behaviour would help with derivative themes which remove the excessive margins on the sidebar. --- python_docs_theme/static/sidebar.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python_docs_theme/static/sidebar.js b/python_docs_theme/static/sidebar.js index 9efc2520..0680c6c8 100644 --- a/python_docs_theme/static/sidebar.js +++ b/python_docs_theme/static/sidebar.js @@ -28,6 +28,7 @@ $(function() { var jwindow = $(window); var jdocument = $(document); var bodywrapper = $('.bodywrapper'); + var documentwrapper = $('.documentwrapper'); var sidebar = $('.sphinxsidebar'); var sidebarwrapper = $('.sphinxsidebarwrapper'); @@ -71,7 +72,7 @@ $(function() { bodywrapper.css('margin-left', bw_margin_collapsed); sidebarbutton.css({ 'margin-left': '0', - 'height': bodywrapper.height(), + 'height': documentwrapper.height(), 'border-radius': '5px' }); sidebarbutton.find('span').text('»'); @@ -85,7 +86,7 @@ $(function() { sidebarwrapper.show(); sidebarbutton.css({ 'margin-left': ssb_width_expanded-12, - 'height': Math.max(sidebarwrapper.height(), bodywrapper.height()), + 'height': Math.max(sidebarwrapper.height(), documentwrapper.height()), 'border-radius': '0 5px 5px 0' }); sidebarbutton.find('span').text('«'); @@ -109,7 +110,7 @@ $(function() { // find the height of the viewport to center the '<<' in the page var viewport_height = get_viewport_height(); var sidebar_offset = sidebar.offset().top; - var sidebar_height = Math.max(bodywrapper.height(), sidebar.height()); + var sidebar_height = Math.max(documentwrapper.height(), sidebar.height()); sidebarbutton.find('span').css({ 'display': 'block', 'position': 'fixed', From 2a7d0cc6d977232303616dc77bf2250d43abb5e9 Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Thu, 1 Feb 2018 21:37:16 -0800 Subject: [PATCH 002/260] Use date-based release numbers (#11) --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2f25d98f..9e0d978e 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,9 @@ setup( name='python-docs-theme', - version='0.0.1', + # Version is date based as year.month[.serial], where serial is used + # if multiple releases are needed to address build failures. + version='2018.2', description='The Sphinx theme for the CPython docs and related projects', long_description=long_description, author='PyPA', From e1f920e04cc4d2bf85e03427a2afa870eab3574b Mon Sep 17 00:00:00 2001 From: Jon Wayne Parrott Date: Wed, 28 Mar 2018 13:51:28 -0700 Subject: [PATCH 003/260] Return metadata indicating that this is parallel_read_safe (#14) --- python_docs_theme/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index ec776b71..407d62a8 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -5,3 +5,8 @@ def setup(app): current_dir = os.path.abspath(os.path.dirname(__file__)) app.add_html_theme( 'python_docs_theme', current_dir) + + return { + 'parallel_read_safe': True, + 'parallel_write_safe': True, + } From 443a60b1c634e1e8775b943f1d449f564cd75fdf Mon Sep 17 00:00:00 2001 From: Mariatta Date: Fri, 1 Jun 2018 09:28:38 -0700 Subject: [PATCH 004/260] Update the pip installation step in readme (#15) It can be installed as `pip install python-docs-theme` (much shorter to type). Remove the mention of cloning with git. --- README.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 1469624e..1ba79624 100644 --- a/README.rst +++ b/README.rst @@ -10,7 +10,6 @@ projects if you so choose, but please keep in mind that in doing so you're also choosing to accept some of the responsibility for maintaining that collective trust. -To use the theme either clone it directly with ``git``, or else install it -into your docs build environment via ``pip``:: +To use the theme, install it into your docs build environment via ``pip``:: - pip install git+https://github.com/python/python-docs-theme.git#egg=python-docs-theme + pip install python-docs-theme From 68b11a117d83b9a9463fc6feaf1a0946af9d572a Mon Sep 17 00:00:00 2001 From: zhsj Date: Wed, 11 Jul 2018 00:46:59 +0800 Subject: [PATCH 005/260] Make the search button wider to better accommodate text (#17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when the word "Go" translated to "搜索" in Chinese, this button seems too narrow. See example on https://zhsj.github.io/python-docs-zh-cn/ --- python_docs_theme/static/pydoctheme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 1d5c18e5..50b0fe7e 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -29,7 +29,7 @@ form.inline-search input { display: inline; } form.inline-search input[type="submit"] { - width: 30px; + width: 40px; } div.sphinxsidebar { From 44a8f306db9ec86d277a8a687538d5d51e415130 Mon Sep 17 00:00:00 2001 From: Thea Flowers Date: Tue, 24 Jul 2018 11:27:42 -0700 Subject: [PATCH 006/260] Release 2018.7 (#19) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9e0d978e..8e4a76c8 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ name='python-docs-theme', # Version is date based as year.month[.serial], where serial is used # if multiple releases are needed to address build failures. - version='2018.2', + version='2018.7', description='The Sphinx theme for the CPython docs and related projects', long_description=long_description, author='PyPA', From ea3cc21908fe0e0c3ffc852125d903493edf90e7 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Fri, 10 Aug 2018 16:53:07 -0700 Subject: [PATCH 007/260] Add CoC (#22) --- code_of_conduct.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 code_of_conduct.rst diff --git a/code_of_conduct.rst b/code_of_conduct.rst new file mode 100644 index 00000000..28de97ce --- /dev/null +++ b/code_of_conduct.rst @@ -0,0 +1,14 @@ +Code of Conduct +=============== + +Please note that all interactions on +`Python Software Foundation `__-supported +infrastructure is `covered +`__ +by the `PSF Code of Conduct `__, +which includes all infrastructure used in the development of Python itself +(e.g. mailing lists, issue trackers, GitHub, etc.). + +In general this means everyone is expected to be open, considerate, and +respectful of others no matter what their position is within the project. + From 10be089395a0cb79aa50b41fddb62745476b1584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Wed, 13 Feb 2019 18:08:57 +0100 Subject: [PATCH 008/260] Change the font-family for the parameters of a function (#25) Change the font-family for the parameters of a function. --- python_docs_theme/static/pydoctheme.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 50b0fe7e..2aa5bad9 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -192,3 +192,6 @@ div.footer a:hover { background: none !important; } +dl > dt span ~ em { + font-family: monospace, sans-serif; +} From 6487f569ac6f747e89e2ca79c86e61ed9f2337c8 Mon Sep 17 00:00:00 2001 From: Liang-Bo Wang Date: Fri, 15 Feb 2019 21:45:16 -0600 Subject: [PATCH 009/260] Fix copybutton to appear on all code examples (#26) --- python_docs_theme/static/copybutton.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python_docs_theme/static/copybutton.js b/python_docs_theme/static/copybutton.js index 716c9e47..f5960d26 100644 --- a/python_docs_theme/static/copybutton.js +++ b/python_docs_theme/static/copybutton.js @@ -3,7 +3,9 @@ $(document).ready(function() { * the >>> and ... prompts and the output and thus make the code * copyable. */ var div = $('.highlight-python .highlight,' + - '.highlight-python3 .highlight') + '.highlight-python3 .highlight,' + + '.highlight-pycon .highlight,' + + '.highlight-default .highlight'); var pre = div.find('pre'); // get the styles from the current theme From b862f1159388ed3134818e56b065e18b835d652c Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Tue, 14 May 2019 16:02:57 +0200 Subject: [PATCH 010/260] Removing border radius on a white-on-white box. (#29) --- python_docs_theme/static/pydoctheme.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 2aa5bad9..33f74d79 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -133,10 +133,6 @@ div.body tt.xref, div.body a tt, div.body code.xref, div.body a code { font-weight: normal; } -.deprecated { - border-radius: 3px; -} - table.docutils { border: 1px solid #ddd; min-width: 20%; From fc9f203dd79587c8aed2b822cf7401518cd65bb5 Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Tue, 10 Dec 2019 18:01:02 -0500 Subject: [PATCH 011/260] Fix link to Sphinx (#34) --- python_docs_theme/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_docs_theme/layout.html b/python_docs_theme/layout.html index 822e6eda..4ad39cb8 100644 --- a/python_docs_theme/layout.html +++ b/python_docs_theme/layout.html @@ -55,6 +55,6 @@ {% if theme_issues_url %}{% trans pathto_bugs=theme_issues_url %}Found a bug?{% endtrans %}{% endif %}
- {% trans sphinx_version=sphinx_version|e %}Created using Sphinx {{ sphinx_version }}.{% endtrans %} + {% trans sphinx_version=sphinx_version|e %}Created using Sphinx {{ sphinx_version }}.{% endtrans %} {% endblock %} From e7367ebe35c3d6622d7e2bb01d7881e476eeadf0 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Tue, 14 Jan 2020 14:07:43 -0600 Subject: [PATCH 012/260] Bump version for release (#38) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8e4a76c8..58cad187 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ name='python-docs-theme', # Version is date based as year.month[.serial], where serial is used # if multiple releases are needed to address build failures. - version='2018.7', + version='2020.1', description='The Sphinx theme for the CPython docs and related projects', long_description=long_description, author='PyPA', From 05e68881225f21ffce2a1d721e56e99f38d92efa Mon Sep 17 00:00:00 2001 From: Mariatta Date: Tue, 14 Jan 2020 19:59:16 -0800 Subject: [PATCH 013/260] post release version bump (#39) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 58cad187..2e145d62 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ name='python-docs-theme', # Version is date based as year.month[.serial], where serial is used # if multiple releases are needed to address build failures. - version='2020.1', + version='2020.1.post1', description='The Sphinx theme for the CPython docs and related projects', long_description=long_description, author='PyPA', From 628a66466589ba42037d4aad3d676cb7d81fb6e6 Mon Sep 17 00:00:00 2001 From: Mariatta Date: Wed, 15 Jan 2020 06:38:03 -0800 Subject: [PATCH 014/260] Remind user about virtualenv and using python -m (#41) --- README.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 1ba79624..476a46c0 100644 --- a/README.rst +++ b/README.rst @@ -10,6 +10,14 @@ projects if you so choose, but please keep in mind that in doing so you're also choosing to accept some of the responsibility for maintaining that collective trust. -To use the theme, install it into your docs build environment via ``pip``:: +To use the theme, install it into your docs build environment via ``pip`` +(preferably in a virtual environment). - pip install python-docs-theme +1. Create and activate a virtual environment:: + + $ python -m venv env + $ source env/bin/activate + +2. Install python-docs-theme using `pip`:: + + (env)$ python -m pip install python-docs-theme From ffb755eeee8b8b7343965423e1918fac90d33949 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam <3275593+pradyunsg@users.noreply.github.com> Date: Wed, 29 Jul 2020 02:07:15 +0530 Subject: [PATCH 015/260] Use the GitHub Repository as url (#49) This provides more information on the PyPI page for the project, and makes it easier to reach this repository from the PyPI page. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2e145d62..a3c93ef6 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ long_description=long_description, author='PyPA', author_email='distutils-sig@python.org', - url='https://docs.python.org', + url='https://github.com/python/python-docs-theme/', packages=['python_docs_theme'], include_package_data=True, entry_points={ From dad145a2968348603856e32b18509e3b1f2b16ee Mon Sep 17 00:00:00 2001 From: Todd Date: Sat, 12 Sep 2020 14:01:24 -0400 Subject: [PATCH 016/260] Add license information to footer (#36) * add license information to footer * modify wording as requested --- python_docs_theme/layout.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python_docs_theme/layout.html b/python_docs_theme/layout.html index 4ad39cb8..3d7d5086 100644 --- a/python_docs_theme/layout.html +++ b/python_docs_theme/layout.html @@ -47,6 +47,12 @@