diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f44760d..0b02c3f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,18 +1,25 @@ -========= Changelog ========= +`2024.2 `_ +---------------------------------------------------------------------------- + +- Do not underline navigation links (#169) + Contributed by Hugo van Kemenade +- Only apply underline offset to code formatting for underline visibility (#171) + Contributed by Hugo van Kemenade + `2024.1 `_ ---------------------------------------------------------------------------- - Underline links for readability and a11y (#160, #166) - Contributed by Hugo van Kemenade + Contributed by Hugo van Kemenade - Add ``hosted_on`` variable for a link in the footer (#165) - Contributed by Hugo van Kemenade + Contributed by Hugo van Kemenade - Consistently reference ``theme_root_icon`` (#163) - Contributed by Marko Budiselic + Contributed by Marko Budiselic - Dark mode: fix contrast of footer highlight (#162) - Contributed by Hugo van Kemenade + Contributed by Hugo van Kemenade `2023.9 `_ ---------------------------------------------------------------------------- diff --git a/README.rst b/README.rst index 0a8db3f..5055bad 100644 --- a/README.rst +++ b/README.rst @@ -21,4 +21,11 @@ To use this theme, add the following to ``conf.py``: - ``html_theme = 'python_docs_theme'`` -- ``html_sidebars``, defaults taken from http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars +- ``html_sidebars``, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars + +Preview +------- + +See a demo of the CPython docs using this theme: + +- https://python-docs-theme-previews.readthedocs.io diff --git a/pyproject.toml b/pyproject.toml index ce22aed..dd228f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ [project] name = "python-docs-theme" -version = "2024.1" +version = "2024.2" description = "The Sphinx theme for the CPython docs and related projects" readme = "README.rst" license.file = "LICENSE" diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 14464db..87a0629 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -29,11 +29,42 @@ pre { color: inherit; } +/* Add underlines to links */ a[href] { text-decoration: underline 1px; +} + +/* Increase the underline offset for code to avoid obscuring underscores */ +a[href]:has(> code) { text-underline-offset: 0.25em; } +/* No underline for navigation */ +a.headerlink, +div.genindex-jumpbox a, +div.modindex-jumpbox a, +div#search-results a, +div.sphinxsidebar a, +div.toctree-wrapper a, +div[role=navigation] a, +table.contentstable a, +table.indextable a { + text-decoration: none; +} + +/* Except when hovered */ +div.genindex-jumpbox a:hover, +div.modindex-jumpbox a:hover, +div#search-results a:hover, +div.sphinxsidebar a:hover, +div.toctree-wrapper a:hover, +div[role=navigation] a:hover, +table.contentstable a:hover, +table.indextable a:hover { + text-decoration: underline; + text-underline-offset: auto; +} + body { margin-left: 1em; margin-right: 1em; @@ -284,6 +315,10 @@ div.footer { margin-right: 10px; } +div.footer a { + text-underline-offset: auto; +} + div.footer a:hover { color: #0095c4; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy