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

Configure versions.json and remove the version switcher dropdown #3108

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,9 @@ results/
!docs/source/examples/notebooks/models/spm1.png
!docs/source/examples/notebooks/models/spm2.png

# do not ignore images in _static folder in docs
!docs/_static/favicon/favicon.png
!docs/_static/pybamm_logo.png

# tests
test_callback.log
34 changes: 0 additions & 34 deletions docs/source/_static/pybamm.css → docs/_static/pybamm.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,6 @@ h3 {
letter-spacing: -0.03em;
}

/* Style the active version button.

- latest: orange
- stable: green
- old, PR: red

Colors from:

Wong, B. Points of view: Color blindness.
Nat Methods 8, 441 (2011). https://doi.org/10.1038/nmeth.1618
*/

/* If the active version has the name "latest", style it orange */
.version-switcher__button[data-active-version-name*="latest"] {
background-color: #e69f00;
border-color: #e69f00;
color: #000000;
}

/* green for `stable` */
.version-switcher__button[data-active-version-name*="stable"] {
background-color: #009e73;
border-color: #009e73;
}

/* red for `old` */
.version-switcher__button:not(
[data-active-version-name*="latest"],
[data-active-version-name*="stable"]
) {
background-color: #980f0f;
border-color: #980f0f;
}

/* Main page overview cards */

.sd-card {
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
16 changes: 9 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@

html_theme = "pydata_sphinx_theme"

html_static_path = ["source/_static"]
html_static_path = ["_static"]

# Theme

# pydata theme options (see
# https://pydata-sphinx-theme.readthedocs.io/en/latest/index.html# for more information)
# mostly copied from numpy, scipy, pandas
html_logo = "source/_static/pybamm_logo.png"
html_favicon = "source/_static/favicon/favicon.png"
html_logo = "_static/pybamm_logo.png"
html_favicon = "_static/favicon/favicon.png"

html_theme_options = {
"logo": {
Expand Down Expand Up @@ -148,14 +148,16 @@
"url": "https://github.com/pybamm-team/PyBaMM/tree/develop/CONTRIBUTING.md",
},
],
# should be kept versioned to use for the version warning bar
"switcher": {
"version_match": release,
"json_url": "https://pybamm.readthedocs.io/en/latest/_static/versions.json", # noqa: E501
"version_match": version,
"json_url": "https://docs.pybamm.org/en/latest/_static/versions.json",
},
# turn to False to not fail build if json_url is not found
"check_switcher": True,
# for dark mode toggle, version switcher, and social media links
"navbar_end": ["theme-switcher", "version-switcher", "navbar-icon-links"],
# for dark mode toggle and social media links
# Note: the version switcher was removed in favour of the readthedocs one
"navbar_end": ["theme-switcher", "navbar-icon-links"],
# add Algolia to the persistent navbar, this removes the default search icon
"navbar_persistent": "algolia-searchbox",
"use_edit_page_button": True,
Expand Down
8 changes: 4 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ explore the effect of different battery designs and modeling assumptions under a
.. grid:: 2

.. grid-item-card::
:img-top: source/_static/index-images/getting_started.svg
:img-top: _static/index-images/getting_started.svg

User Guide
^^^^^^^^^^
Expand All @@ -59,7 +59,7 @@ explore the effect of different battery designs and modeling assumptions under a
To the user guide

.. grid-item-card::
:img-top: source/_static/index-images/examples.svg
:img-top: _static/index-images/examples.svg

Examples
^^^^^^^^
Expand All @@ -77,7 +77,7 @@ explore the effect of different battery designs and modeling assumptions under a
To the examples

.. grid-item-card::
:img-top: source/_static/index-images/api.svg
:img-top: _static/index-images/api.svg

API Documentation
^^^^^^^^^^^^^^^^^
Expand All @@ -96,7 +96,7 @@ explore the effect of different battery designs and modeling assumptions under a
To the API documentation

.. grid-item-card::
:img-top: source/_static/index-images/contributor.svg
:img-top: _static/index-images/contributor.svg

Contributor's Guide
^^^^^^^^^^^^^^^^^^^
Expand Down