Skip to content

Commit

Permalink
Merge pull request #23351 from jklymak/doc-dev-install-mpl-theme
Browse files Browse the repository at this point in the history
DOC/MNT install docs with dev version of sphinx theme
  • Loading branch information
timhoffm committed Jun 29, 2022
2 parents d276edb + 2565a0b commit 4b311a2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ commands:
numpy<< parameters.numpy_version >> codecov coverage \
-r requirements/doc/doc-requirements.txt
mpl-theme-install:
steps:
- run:
name: Install mpl-sphinx-theme dev
command: |
pip install git+https://github.com/matplotlib/mpl-sphinx-theme.git
mpl-install:
steps:
- run:
Expand Down
10 changes: 8 additions & 2 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
:root {
--sd-color-primary: #11557C;
--sd-color-primary-highlight: #003c63;
--pst-color-link: var(--pst-color-primary);
--pst-color-link-hover: var(--pst-color-secondary);
--sd-color-primary: var(--pst-color-primary);
--sd-color-primary-text: var(--pst-color-text-base);
}

.simple li>p {
Expand Down Expand Up @@ -51,6 +53,10 @@ does not float with it.
margin: 5px 2px;
}

html[data-theme="dark"] .sphx-glr-thumbcontainer {
background-color: rgb(63, 63, 63);
}

/* workaround: the default padding decenters the image inside the frame */
.sphx-glr-thumbcontainer .figure {
padding: 0;
Expand Down
6 changes: 4 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
html_logo = "_static/logo2.svg"
html_theme_options = {
"native_site": True,
"logo": {"link": "index"},
# collapse_navigation in pydata-sphinx-theme is slow, so skipped for local
# and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
"collapse_navigation": not is_release_build,
Expand All @@ -342,7 +341,10 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
'stable' if matplotlib.__version_info__.releaselevel == 'final'
else 'devdocs')
},
"navbar_end": ["version-switcher", "mpl_icon_links"]
"logo": {"link": "index",
"image_light": "images/logo2.svg",
"image_dark": "images/logo_dark.svg"},
"navbar_end": ["version-switcher", "mpl_icon_links", "theme-switcher"]
}
include_analytics = is_release_build
if include_analytics:
Expand Down
4 changes: 0 additions & 4 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Learning resources
.. grid:: 1 1 2 2

.. grid-item-card::
:class-header: sd-bg-light
:padding: 2

Tutorials
Expand All @@ -56,7 +55,6 @@ Learning resources
- :doc:`External learning resources <users/resources/index>`

.. grid-item-card::
:class-header: sd-bg-light
:padding: 2

How-tos
Expand All @@ -66,7 +64,6 @@ Learning resources
- :doc:`Matplotlib FAQ <users/faq/index>`

.. grid-item-card::
:class-header: sd-bg-light
:padding: 2

Understand how Matplotlib works
Expand All @@ -79,7 +76,6 @@ Learning resources
material

.. grid-item-card::
:class-header: sd-bg-light
:padding: 2

Reference
Expand Down

0 comments on commit 4b311a2

Please sign in to comment.