Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump napari sphinx theme version #423

Merged
merged 7 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
18 changes: 14 additions & 4 deletions docs/_templates/sidebar-nav-bs.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<nav class="bd-docs-nav bd-links"
aria-label="{{ _('Section Navigation') }}">
<div class="bd-toc-item navbar-nav">{{ sidebar_nav_html }}</div>
</nav>
{# Displays the TOC-subtree for pages nested under the currently active top-level TOCtree element. #}
<nav class="bd-docs-nav bd-links" aria-label="{{ _('Section Navigation') }}">
<div class="bd-toc-item navbar-nav">
{{- generate_toctree_html(
"sidebar",
show_nav_level=theme_show_nav_level | int,
maxdepth=theme_navigation_depth | int,
collapse=theme_collapse_navigation | tobool,
includehidden=theme_sidebar_includehidden | tobool,
titles_only=True
)
-}}
</div>
</nav>
10 changes: 7 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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,
Expand Down
Loading