Skip to content

Commit

Permalink
Merge pull request #2257 from RCarter-IDM/pydata
Browse files Browse the repository at this point in the history
from rtd to pydata sphinx theme
  • Loading branch information
JSchripsema-IDM committed May 7, 2024
2 parents bc9c711 + 015592f commit dff13c9
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 25 deletions.
9 changes: 0 additions & 9 deletions docs/_templates/breadcrumbs.html

This file was deleted.

8 changes: 0 additions & 8 deletions docs/_templates/footer.html

This file was deleted.

2 changes: 2 additions & 0 deletions docs/_templates/footer_end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<p><a href="https://www.gatesfoundation.org/Privacy-and-Cookies-Notice">Privacy and Cookies Notice</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<a href="https://www.gatesfoundation.org/Terms-of-Use">Terms of Use</a></p>
3 changes: 3 additions & 0 deletions docs/_templates/footer_start.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>idmtools is licensed under the <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode">Creative Commons
Attribution-ShareAlike 4.0 International License</a>.</p>
<p>Send documentation feedback to <a href="mailto:idmsupport@gatesfoundation.org" target="_top">idmsupport@gatesfoundation.org</a>.</p>
12 changes: 12 additions & 0 deletions docs/_templates/navbar-side.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{# Displays links to the top-level TOCtree elements, in the header navbar. #}
<nav class="navbar-nav">
<p class="sidebar-header-items__title"
role="heading"
aria-level="1"
aria-label="{{ _('') }}">
{{ _("") }}
</p>
<ul class="bd-navbar-elements navbar-nav">
{{ generate_header_nav_html(n_links_before_dropdown=20, dropdown_text=theme_header_dropdown_text) }}
</ul>
</nav>
45 changes: 38 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import os
import subprocess
import sys
import sphinx_rtd_theme
#import sphinx_rtd_theme
from datetime import datetime

if sys.platform in ["linux", "darwin"]:
Expand Down Expand Up @@ -191,17 +191,48 @@
# The theme to use for HTML and HTML Help pages. See the docs for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = 'pydata_sphinx_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# docs.
# #
# html_theme_options = {
# }
html_theme_options = {
"collapse_navigation": False,
"navigation_depth": 3,
"show_prev_next": True,
"icon_links": [
{"name": "IDM docs", "url": "https://docs.idmod.org", "icon": "fas fa-home"},
{
"name": "GitHub",
"url": "https://github.com/institutefordiseasemodeling/idmtools",
"icon": "fab fa-github-square",
},
],
"navbar_end": ["theme-switcher", "navbar-icon-links"],
"secondary_sidebar_items": ["navbar-side"],
"header_links_before_dropdown": 5,
"footer_start": ["copyright", "footer_start"],
"footer_end": ["theme-version", "footer_end"],
}
html_sidebars = {
"**": ["sidebar-nav-bs", "page-toc"],
}
html_logo = "images/idm-logo-transparent.png"
html_favicon = "images/favicon.ico"
html_static_path = ['_static']
html_baseurl = "https://docs.idmod.org/projects/idmtools/en/latest"
html_context = {
'rtd_url': 'https://docs.idmod.org/projects/idmtools/en/latest',
"versions_dropdown": {
"latest": "devel (latest)",
"stable": "current (stable)",
},
"default_mode": "light",
}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents.
# "<project> v<release> docs" by default.
Expand All @@ -215,7 +246,7 @@
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
html_logo = "images/IDM_white.png"
#html_logo = "images/IDM_white.png"

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand All @@ -231,7 +262,7 @@

html_css_files = ['theme_overrides.css']

html_js_files = ['show_block_by_os.js']
#html_js_files = ['show_block_by_os.js']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down
Binary file added docs/images/idm-logo-transparent.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pygit2>=1.4.0
sphinxext-rediraffe
sphinx~=6.2.1
sphinx-rtd-theme~=1.2.2
pydata-sphinx-theme
sphinxcontrib-napoleon~=0.7
plantweb~=1.2.1
sphinxcontrib-programoutput~=0.17
Expand Down

0 comments on commit dff13c9

Please sign in to comment.