From 0694f1f52722faa3512483656fd09b9bcf96bd29 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Mon, 8 Jan 2024 11:42:42 -0600 Subject: [PATCH 1/4] restore sidebar template file --- doc/source/_templates/sidebar-nav-bs.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/source/_templates/sidebar-nav-bs.html diff --git a/doc/source/_templates/sidebar-nav-bs.html b/doc/source/_templates/sidebar-nav-bs.html new file mode 100644 index 000000000000..f0e22edd16bc --- /dev/null +++ b/doc/source/_templates/sidebar-nav-bs.html @@ -0,0 +1,11 @@ +{# Displays the TOC-subtree for pages nested under the currently active top-level TOCtree element. #} + From 36d1ff30870bf0d2c6407ebcaac8c215cb53de3f Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Mon, 8 Jan 2024 11:43:10 -0600 Subject: [PATCH 2/4] don't set nav depth globally --- doc/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 49759d0892fc..b935193144cc 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -211,7 +211,6 @@ "icon_links": [], "navbar_start": ["navbar-logo", "version-switcher"], "navbar_persistent": [], - "navigation_depth": 1, "switcher": { "json_url": "https://scipy.github.io/devdocs/_static/version_switcher.json", "version_match": version, From 69287439e19ed0f20c2c736b42ebdec65d83da81 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Mon, 8 Jan 2024 14:55:58 -0600 Subject: [PATCH 3/4] tweak CSS for logo spacing --- doc/source/_static/scipy.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/_static/scipy.css b/doc/source/_static/scipy.css index 39a185399417..2603418aab24 100644 --- a/doc/source/_static/scipy.css +++ b/doc/source/_static/scipy.css @@ -185,3 +185,8 @@ div.admonition-legacy { .admonition-legacy.admonition > .admonition-title:after { background-color: var(--pst-color-warning); } + +/* extra breathing room for logo image */ +.navbar-brand.logo { + margin-right: 0.5rem; +} From dc3fccf56cb14173002c4026a9f145d78dfc9fb6 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Mon, 8 Jan 2024 14:56:27 -0600 Subject: [PATCH 4/4] don't includehidden on non-API pages --- doc/source/_templates/sidebar-nav-bs.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/_templates/sidebar-nav-bs.html b/doc/source/_templates/sidebar-nav-bs.html index f0e22edd16bc..46c5d22df8a7 100644 --- a/doc/source/_templates/sidebar-nav-bs.html +++ b/doc/source/_templates/sidebar-nav-bs.html @@ -5,7 +5,7 @@ {% if pagename.startswith("reference") %} {{- generate_toctree_html("sidebar", maxdepth=1, collapse=True, includehidden=True, titles_only=True) -}} {% else %} - {{- generate_toctree_html("sidebar", maxdepth=2, collapse=True, includehidden=True, titles_only=True) -}} + {{- generate_toctree_html("sidebar", maxdepth=2, collapse=True, includehidden=False, titles_only=True) -}} {% endif %}