From 8cb718ed2552cb4dc92aaa5f042d053a2169a0d9 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Mon, 14 Nov 2022 00:08:03 +0100 Subject: [PATCH 1/3] update theme --- _static/custom.css | 21 --------------------- _templates/donate.html | 9 --------- _templates/search-field.html | 4 ---- examples/conf.py | 29 +---------------------------- requirements-docs.txt | 2 +- 5 files changed, 2 insertions(+), 63 deletions(-) delete mode 100644 _static/custom.css delete mode 100644 _templates/donate.html delete mode 100644 _templates/search-field.html diff --git a/_static/custom.css b/_static/custom.css deleted file mode 100644 index 3b2ff83c2..000000000 --- a/_static/custom.css +++ /dev/null @@ -1,21 +0,0 @@ -/* taken from sphinx-codeautolink examples */ -.sphinx-codeautolink-a{ - border-bottom-color: rgb(0, 0, 0); - border-bottom-style: dotted; - border-bottom-width: 1px; -} -.sphinx-codeautolink-a:hover{ - color: rgb(255, 139, 139); -} - -.bd-sidebar { - overflow-y: auto; -} - -.navbar-brand { - display: inline-block !important; -} - -.supportbutton a { - color: var(--pst-color-sidebar-link-active); -} diff --git a/_templates/donate.html b/_templates/donate.html deleted file mode 100644 index 6de283a35..000000000 --- a/_templates/donate.html +++ /dev/null @@ -1,9 +0,0 @@ -{% if "generated" in sourcename %} -
-{% else %} - diff --git a/_templates/search-field.html b/_templates/search-field.html deleted file mode 100644 index cd28dbb0e..000000000 --- a/_templates/search-field.html +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/examples/conf.py b/examples/conf.py index d4bd638c7..df879959f 100644 --- a/examples/conf.py +++ b/examples/conf.py @@ -112,35 +112,9 @@ def setup(app: Sphinx): # a list of builtin themes. # theme options -html_theme = "pydata_sphinx_theme" +html_theme = "pymc_sphinx_theme" html_theme_options = { - "icon_links": [ - { - "name": "GitHub", - "url": "https://github.com/pymc-devs/pymc-examples", - "icon": "fab fa-github-square", - }, - { - "name": "Twitter", - "url": "https://twitter.com/pymc_devs", - "icon": "fab fa-twitter-square", - }, - { - "name": "YouTube", - "url": "https://www.youtube.com/c/PyMCDevelopers", - "icon": "fab fa-youtube", - }, - { - "name": "Discourse", - "url": "https://discourse.pymc.io", - "icon": "fab fa-discourse", - }, - ], - "search_bar_text": "Search...", - "navbar_end": ["navbar-icon-links.html"], "page_sidebar_items": ["postcard", "page-toc", "edit-this-page", "donate"], - "google_analytics_id": "G-6KPRBTE6WV", - "header_links_before_dropdown": 6, "logo": { "link": "https://www.pymc.io", }, @@ -170,7 +144,6 @@ def setup(app: Sphinx): # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["../_static"] html_extra_path = ["../_thumbnails"] -html_css_files = ["custom.css"] templates_path = ["../_templates"] html_sidebars = { "**": [ diff --git a/requirements-docs.txt b/requirements-docs.txt index 893d7765a..584f87834 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,6 +1,6 @@ myst-nb sphinx==5.0.2 # see https://github.com/pymc-devs/pymc-examples/issues/409 -pydata_sphinx_theme>=0.11.0 +git+https://github.com/pymc-devs/pymc-sphinx-theme sphinx-design sphinx-copybutton sphinxcontrib-bibtex From 1dc709d673b5fecf772bf5b55a619ec8c0728548 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Tue, 15 Nov 2022 00:54:46 +0100 Subject: [PATCH 2/3] have only logo in navbar start section --- examples/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/conf.py b/examples/conf.py index df879959f..c3d6d34b3 100644 --- a/examples/conf.py +++ b/examples/conf.py @@ -115,6 +115,7 @@ def setup(app: Sphinx): html_theme = "pymc_sphinx_theme" html_theme_options = { "page_sidebar_items": ["postcard", "page-toc", "edit-this-page", "donate"], + "navbar_start": ["navbar-logo"], "logo": { "link": "https://www.pymc.io", }, From 213c6470d995899e796fbf94cbe754e74f47a1f9 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Tue, 15 Nov 2022 15:54:23 +0100 Subject: [PATCH 3/3] fix secondary sidebar --- examples/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/conf.py b/examples/conf.py index c3d6d34b3..976531e9f 100644 --- a/examples/conf.py +++ b/examples/conf.py @@ -114,7 +114,7 @@ def setup(app: Sphinx): # theme options html_theme = "pymc_sphinx_theme" html_theme_options = { - "page_sidebar_items": ["postcard", "page-toc", "edit-this-page", "donate"], + "secondary_sidebar_items": ["postcard", "page-toc", "edit-this-page", "sourcelink", "donate"], "navbar_start": ["navbar-logo"], "logo": { "link": "https://www.pymc.io",