From 42ade08824a02904332cea9b53886ddd2d4740c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Hern=C3=A1ndez?= Date: Fri, 23 May 2025 08:33:50 -0400 Subject: [PATCH 1/2] Make copy button appear when hovered (#243) --- python_docs_theme/static/pydoctheme.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 6d50092..4873116 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -451,6 +451,7 @@ div.genindex-jumpbox a { color: #000; background-color: #fff; border: 1px solid #ac9; /* follows div.body pre */ + display: none; } .copybutton:hover { @@ -461,6 +462,14 @@ div.genindex-jumpbox a { background-color: #ddd; } +.highlight:active .copybutton { + display: block; +} + +.highlight:hover .copybutton { + display: block; +} + @media (max-width: 1023px) { /* Body layout */ div.body { From 8e361585ca0aeb491353252af2a8fd91c4c55316 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 27 May 2025 16:29:51 +0300 Subject: [PATCH 2/2] Prepare 2025.5 release (#244) --- CHANGELOG.rst | 5 +++++ python_docs_theme/__init__.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fb43a9f..07b2735 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ Changelog ========= +`2025.5 `_ +--------------------------------------------------------------------------- + +* Make the copy button only appear when hovered over or clicked on by @kevteg in https://github.com/python/python-docs-theme/pull/243 + `2025.4.1 `_ ------------------------------------------------------------------------------- diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index 75459e1..2336dc1 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -7,7 +7,7 @@ from sphinx.application import Sphinx from sphinx.util.typing import ExtensionMetadata -__version__ = "2025.4.1" +__version__ = "2025.5" THEME_PATH = Path(__file__).resolve().parent