From 7125f167c1c7b8bb96680a25de19f09a960080a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Fri, 31 May 2024 23:51:08 -0300 Subject: [PATCH] Bump napari sphinx theme version (#423) # References and relevant issues Depends on napari/napari-sphinx-theme#161 (and a new release of the theme) # Description Restores the sidebar after the PyData Sphinx Theme is updated to version 0.15.3 --------- Co-authored-by: Juan Nunez-Iglesias Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com> --- Makefile | 1 + docs/_static/custom.css | 6 ++++++ docs/_templates/sidebar-nav-bs.html | 18 ++++++++++++++---- docs/conf.py | 10 +++++++--- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ac6717c9..111a436c 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ clean: docs-install: python -m pip install -qr $(current_dir)requirements.txt + python -m pip freeze prep-docs: python $(docs_dir)/_scripts/prep_docs.py diff --git a/docs/_static/custom.css b/docs/_static/custom.css index 9bc02cb7..cf888242 100644 --- a/docs/_static/custom.css +++ b/docs/_static/custom.css @@ -23,3 +23,9 @@ div.sphx-glr-download a:hover { background-image: none; background-color: #ffffff !important; } + +/* Workaround for https: //github.com/napari/docs/pull/423#issuecomment-2141165872 */ +.bd-content .sd-tab-set>label { + background-color: var(--napari-gray); + color: #222832; +} \ No newline at end of file diff --git a/docs/_templates/sidebar-nav-bs.html b/docs/_templates/sidebar-nav-bs.html index ac8e5eab..2e8c34f1 100644 --- a/docs/_templates/sidebar-nav-bs.html +++ b/docs/_templates/sidebar-nav-bs.html @@ -1,4 +1,14 @@ - +{# Displays the TOC-subtree for pages nested under the currently active top-level TOCtree element. #} + \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 8d2854c1..8626cb6b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -100,9 +100,7 @@ version_match = release html_theme_options = { - "external_links": [ - {"name": "napari hub", "url": "https://napari-hub.org"} - ], + "external_links": [{"name": "napari hub", "url": "https://napari-hub.org"}], "github_url": "https://github.com/napari/napari", "navbar_start": ["navbar-logo", "navbar-project"], "navbar_end": ["version-switcher", "navbar-icon-links"], @@ -116,6 +114,12 @@ "pygment_light_style": "napari", "pygment_dark_style": "napari", "announcement": "https://napari.org/dev/_static/announcement.html", + "back_to_top_button": False, +} + +html_context = { + # use Light theme only, don't auto switch (default) + "default_mode": "light" } # Add any paths that contain custom static files (such as style sheets) here,