sunpy-sphinx-theme 2.1.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/PKG-INFO +4 -5
  2. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/pyproject.toml +8 -4
  3. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/__init__.py +84 -79
  4. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/static/sunpy_style.css +44 -8
  5. sunpy_sphinx_theme-2.2.0/src/sunpy_sphinx_theme/theme/sunpy/theme.toml +80 -0
  6. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme.egg-info/PKG-INFO +4 -5
  7. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme.egg-info/SOURCES.txt +1 -1
  8. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme.egg-info/requires.txt +3 -3
  9. sunpy_sphinx_theme-2.1.0/src/sunpy_sphinx_theme/theme/sunpy/theme.conf +0 -43
  10. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/.editorconfig +0 -0
  11. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/.readthedocs.yaml +0 -0
  12. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/.rtd-environment.yml +0 -0
  13. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/.stylelintrc.json +0 -0
  14. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/LICENSE.md +0 -0
  15. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/MANIFEST.in +0 -0
  16. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/README.md +0 -0
  17. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/_typos.toml +0 -0
  18. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/ruff.toml +0 -0
  19. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/setup.cfg +0 -0
  20. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/cards.py +0 -0
  21. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/conf.py +0 -0
  22. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/components/built-with.html +0 -0
  23. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/components/footer-links.html +0 -0
  24. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/components/navbar-logo.html +0 -0
  25. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/components/navbar_center.html +0 -0
  26. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/components/navbar_start.html +0 -0
  27. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/components/sst-sidebar-nav.html +0 -0
  28. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/sections/header.html +0 -0
  29. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/static/css/rtd_enhanced_search.css +0 -0
  30. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/static/css/sunpy_cards.css +0 -0
  31. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/static/img/favicon-32.ico +0 -0
  32. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/static/img/sunpy_icon.svg +0 -0
  33. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/static/img/sunpy_icon_128x128.png +0 -0
  34. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/static/js/rtd_enhanced_search.js +0 -0
  35. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme/theme/sunpy/static/js/submenu-concertina-toggle.js +0 -0
  36. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme.egg-info/dependency_links.txt +0 -0
  37. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme.egg-info/entry_points.txt +0 -0
  38. {sunpy_sphinx_theme-2.1.0 → sunpy_sphinx_theme-2.2.0}/src/sunpy_sphinx_theme.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sunpy-sphinx-theme
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: The sphinx theme for the SunPy website and documentation.
5
5
  Author: The SunPy Developers
6
6
  License: BSD 2-Clause License
@@ -36,19 +36,18 @@ Classifier: Programming Language :: Python :: 3
36
36
  Classifier: Framework :: Sphinx
37
37
  Classifier: Framework :: Sphinx :: Theme
38
38
  Classifier: Operating System :: OS Independent
39
- Classifier: License :: OSI Approved :: BSD License
40
39
  Requires-Python: >=3.9
41
40
  Description-Content-Type: text/markdown
42
41
  License-File: LICENSE.md
43
- Requires-Dist: pydata-sphinx-theme~=0.16.0
44
- Requires-Dist: sphinx
42
+ Requires-Dist: pydata-sphinx-theme~=0.17
43
+ Requires-Dist: sphinxext-opengraph>=0.13
44
+ Requires-Dist: sphinx>=7.3.0
45
45
  Provides-Extra: docs
46
46
  Requires-Dist: matplotlib; extra == "docs"
47
47
  Requires-Dist: sphinx-automodapi; extra == "docs"
48
48
  Requires-Dist: sphinx-copybutton; extra == "docs"
49
49
  Requires-Dist: sphinx-design; extra == "docs"
50
50
  Requires-Dist: sphinx-gallery; extra == "docs"
51
- Requires-Dist: sphinx-hoverxref; extra == "docs"
52
51
  Requires-Dist: sphinx-togglebutton; extra == "docs"
53
52
  Requires-Dist: sunpy; extra == "docs"
54
53
  Dynamic: license-file
@@ -19,12 +19,12 @@ classifiers = [
19
19
  "Framework :: Sphinx",
20
20
  "Framework :: Sphinx :: Theme",
21
21
  "Operating System :: OS Independent",
22
- "License :: OSI Approved :: BSD License",
23
22
  ]
24
23
  requires-python = ">=3.9"
25
24
  dependencies = [
26
- "pydata-sphinx-theme~=0.16.0",
27
- "sphinx"
25
+ "pydata-sphinx-theme~=0.17",
26
+ "sphinxext-opengraph>=0.13",
27
+ "sphinx>=7.3.0"
28
28
  ]
29
29
 
30
30
  [project.optional-dependencies]
@@ -34,7 +34,6 @@ docs = [
34
34
  "sphinx-copybutton",
35
35
  "sphinx-design",
36
36
  "sphinx-gallery",
37
- "sphinx-hoverxref",
38
37
  "sphinx-togglebutton",
39
38
  "sunpy",
40
39
  ]
@@ -65,3 +64,8 @@ include-package-data = true
65
64
  url = "sunpy_docs-devdeps/sunpy/docs/_build/html/index.html"
66
65
  message = "sunpy docs with devdeps preview"
67
66
  report_on_fail = true
67
+
68
+ [ tool.gilesbot.circleci_artifacts.astropy_website ]
69
+ url = "astropy.org/_build/html/index.html"
70
+ message = "Astropy website preview"
71
+ report_on_fail = true
@@ -2,18 +2,29 @@
2
2
  SunPy Sphinx Theme.
3
3
  """
4
4
 
5
+ import importlib
5
6
  import json
6
7
  import os
8
+ import posixpath
7
9
  from functools import partial
8
- from pathlib import Path
10
+ from pathlib import Path, PurePosixPath
9
11
  from textwrap import dedent, indent
10
- from urllib.parse import urljoin
12
+ from urllib.parse import urljoin, urlparse
11
13
 
12
14
  from pydata_sphinx_theme import utils
13
15
  from sphinx.application import Sphinx
14
16
 
15
17
  __all__ = ["ON_RTD", "PNG_ICON", "SVG_ICON", "get_html_theme_path"]
16
18
 
19
+ SPHINX_GALLERY_IMAGE_EXTENSIONS = {".apng", ".gif", ".jpeg", ".jpg", ".png", ".webp"}
20
+
21
+
22
+ def get_theme_options(app):
23
+ """
24
+ This gets the user configured options and the defaults and merges them.
25
+ """
26
+ return {**app.builder.theme.get_options(), **utils.get_theme_options_dict(app)}
27
+
17
28
 
18
29
  def get_html_theme_path():
19
30
  """
@@ -23,66 +34,6 @@ def get_html_theme_path():
23
34
  return parent / "theme" / "sunpy"
24
35
 
25
36
 
26
- def default_navbar():
27
- return [
28
- (
29
- "About",
30
- [
31
- ("Our Mission", "about/", 2),
32
- ("SunPy Project", "about/project/", 2),
33
- ("Presentations", "about/presentations/", 2),
34
- ("Meetings", "about/meetings/", 2),
35
- ("Code of Conduct", "coc/", 2),
36
- ],
37
- ),
38
- (
39
- "Documentation",
40
- [
41
- # Core goes first always
42
- ("sunpy", "https://docs.sunpy.org/", 3),
43
- # Other affiliated packages are in alphabetical order
44
- ("aiapy", "https://aiapy.readthedocs.io/", 3),
45
- ("dkist", "https://docs.dkist.nso.edu/projects/python-tools", 3),
46
- ("drms", "https://docs.sunpy.org/projects/drms/", 3),
47
- ("irispy", "https://irispy.readthedocs.io/", 3),
48
- ("ndcube", "https://docs.sunpy.org/projects/ndcube/", 3),
49
- ("roentgen", "https://roentgen.readthedocs.io/", 3),
50
- ("scope", "https://statistical-confidence-of-oscillatory-processes-with-emd.readthedocs.io", 3),
51
- ("solarmach", "https://solarmach.readthedocs.io/en/stable/", 3),
52
- ("sunkit-image", "https://docs.sunpy.org/projects/sunkit-image/", 3),
53
- ("sunkit-instruments ", "https://docs.sunpy.org/projects/sunkit-instruments/", 3),
54
- ("sunkit-magex", "https://docs.sunpy.org/projects/sunkit-magex/", 3),
55
- ("sunkit-pyvista", "https://docs.sunpy.org/projects/sunkit-pyvista/", 3),
56
- ("sunpy-soar", "https://docs.sunpy.org/projects/soar/", 3),
57
- ("sunraster", "https://docs.sunpy.org/projects/sunraster/", 3),
58
- ("xrtpy", "https://xrtpy.readthedocs.io/", 3),
59
- # Provisional packages submenu
60
- (
61
- "Provisional",
62
- [
63
- ("pyflct", "https://pyflct.readthedocs.io/", 3),
64
- ("radiospectra", "https://docs.sunpy.org/projects/radiospectra/", 3),
65
- ],
66
- ),
67
- # Tools submenu
68
- (
69
- "Tools",
70
- [
71
- ("ablog", "https://ablog.readthedocs.io/en/stable/", 3),
72
- ("mpl-animators", "https://docs.sunpy.org/projects/mpl-animators/", 3),
73
- ("streamtracer", "https://docs.sunpy.org/projects/streamtracer/", 3),
74
- ],
75
- ),
76
- ],
77
- ),
78
- ("Packages", "affiliated/", 2),
79
- ("Get Help", "help/", 2),
80
- ("Contribute", "contribute/", 2),
81
- ("Blog", "blog/", 2),
82
- ("Cite SunPy", "https://docs.sunpy.org/en/stable/citation.html", 3),
83
- ]
84
-
85
-
86
37
  def update_config(app) -> None:
87
38
  """
88
39
  Update config with new default values and handle deprecated keys.
@@ -91,33 +42,49 @@ def update_config(app) -> None:
91
42
  # At this point, modifying app.config.html_theme_options will NOT update the
92
43
  # page's HTML context (e.g. in jinja, `theme_keyword`).
93
44
  # To do this, you must manually modify `app.builder.theme_options`.
45
+ theme_options_with_defaults = get_theme_options(app)
94
46
  theme_options = utils.get_theme_options_dict(app)
95
47
 
96
- if theme_options.get("sst_logo") and not isinstance(theme_options["sst_logo"], dict):
48
+ if theme_options_with_defaults.get("sst_logo") and not isinstance(theme_options_with_defaults["sst_logo"], dict):
97
49
  sst_logo = str(theme_options["sst_logo"])
98
50
  theme_options["sst_logo"] = {"light": sst_logo, "dark": sst_logo}
99
51
 
100
- theme_options["sst_is_root"] = bool(theme_options.get("sst_is_root", False))
101
-
102
- if not theme_options.get("navbar_links"):
103
- theme_options["navbar_links"] = default_navbar()
104
-
105
- if not theme_options.get("footer_links", False):
106
- theme_options["footer_links"] = [
107
- ("Code", "https://github.com/sunpy", 3),
108
- ("Forum", "https://community.openastronomy.org/c/sunpy", 3),
109
- ("Chat", "https://openastronomy.element.io/#/room/#sunpy:openastronomy.org", 3),
110
- ]
52
+ theme_options["sst_is_root"] = bool(theme_options_with_defaults.get("sst_is_root", False))
111
53
 
112
- # TODO: This is nasty
113
54
  # Set the default value of show_source to False unless it's specified in the user config
114
- if "html_show_sourcelink" not in app.config._raw_config: # NOQA: SLF001
55
+ if not utils.config_provided_by_user(app, "html_show_sourcelink"):
115
56
  app.config.html_show_sourcelink = False
116
57
 
117
58
  # Set the logo to the sunpy logo unless it's overridden in the user config
118
- if "html_logo" not in app.config._raw_config: # NOQA: SLF001
59
+ if not utils.config_provided_by_user(app, "html_logo"):
119
60
  app.config.html_logo = str(get_html_theme_path() / "static" / "img" / "sunpy_icon.svg")
120
61
 
62
+ if not utils.config_provided_by_user(app, "ogp_use_first_image"):
63
+ app.config.ogp_use_first_image = True
64
+
65
+ if app.config.html_baseurl and not utils.config_provided_by_user(app, "ogp_site_url"):
66
+ app.config.ogp_site_url = app.config.html_baseurl
67
+
68
+ # Include sunpy.org in extra_search_projects as long as none of
69
+ # navbar_links, rtd_search_projects and rtd_extra_search_projects
70
+ # are set, i.e. you are using the default sunpy set of projects.
71
+ # Without this non-sunpy projects would have to explicitly un-set
72
+ # rtd_extra_search_projects
73
+ if not (
74
+ "navbar_links" not in theme_options
75
+ or "rtd_search_projects" not in theme_options
76
+ or "rtd_extra_search_projects" not in theme_options
77
+ ):
78
+ theme_options["rtd_extra_search_projects"] = [["sunpyorg", "https://sunpy.org"]]
79
+
80
+ if importlib.util.find_spec("sphinx_gallery"):
81
+ ssi = theme_options_with_defaults["secondary_sidebar_items"].split(",")
82
+ if "sg_download_links" not in ssi:
83
+ ssi.append("sg_download_links")
84
+ if "sg_launcher_links" not in ssi:
85
+ ssi.append("sg_launcher_links")
86
+ theme_options["secondary_sidebar_items"] = ", ".join(ssi)
87
+
121
88
 
122
89
  def sst_pathto(context, document, relative_to=0):
123
90
  """
@@ -156,13 +123,45 @@ def update_html_context(app: Sphinx, pagename: str, templatename: str, context,
156
123
  context["sst_pathto"] = partial(sst_pathto, context)
157
124
 
158
125
 
126
+ def update_opengraph_context(app: Sphinx, pagename: str, templatename: str, context, doctree) -> None: # NOQA: ARG001
127
+ """
128
+ Add Sphinx-Gallery images to the Open Graph metadata context.
129
+ """
130
+ if doctree is None:
131
+ return
132
+
133
+ metadata = context.get("meta") or {}
134
+ if "og:image" in metadata:
135
+ return
136
+
137
+ for node in doctree.findall():
138
+ if node.__class__.__name__ != "imgsgnode" or not node.get("uri"):
139
+ continue
140
+
141
+ parsed_uri = urlparse(node["uri"])
142
+ image_suffix = PurePosixPath(parsed_uri.path).suffix.lower()
143
+ if image_suffix not in SPHINX_GALLERY_IMAGE_EXTENSIONS:
144
+ continue
145
+
146
+ if parsed_uri.scheme:
147
+ metadata["og:image"] = node["uri"]
148
+ else:
149
+ metadata["og:image"] = posixpath.join(app.builder.imagedir, PurePosixPath(parsed_uri.path).name)
150
+
151
+ if node.get("alt") and "og:image:alt" not in metadata:
152
+ metadata["og:image:alt"] = node["alt"]
153
+
154
+ context["meta"] = metadata
155
+ return
156
+
157
+
159
158
  def generate_search_config(app):
160
159
  """
161
160
  This function parses the config for the "Documentation" section of the theme config.
162
161
  """
163
- theme_config = utils.get_theme_options_dict(app)
162
+ theme_config = get_theme_options(app)
164
163
  search_projects = theme_config.get("rtd_search_projects", None)
165
- if search_projects is None:
164
+ if not search_projects:
166
165
  navbar_links = theme_config["navbar_links"]
167
166
  doc_links = next(section[1] for section in navbar_links if section[0] == "Documentation")
168
167
 
@@ -180,6 +179,9 @@ def generate_search_config(app):
180
179
 
181
180
  search_projects = filter_doc_links(doc_links)
182
181
 
182
+ if extra_search_projects := theme_config.get("rtd_extra_search_projects", None):
183
+ search_projects += filter_doc_links(extra_search_projects)
184
+
183
185
  load_more_label = theme_config.get("rtd_search_load_more_label", "Load more results")
184
186
  no_results_label = theme_config.get("rtd_search_no_results_label", "There are no results for this search")
185
187
  script = dedent(f"""
@@ -198,12 +200,15 @@ def generate_search_config(app):
198
200
 
199
201
 
200
202
  def setup(app: Sphinx):
203
+ app.setup_extension("sphinxext.opengraph")
204
+
201
205
  # Register theme
202
206
  theme_dir = get_html_theme_path()
203
207
  app.add_html_theme("sunpy", theme_dir)
204
208
  app.add_css_file("sunpy_style.css", priority=600)
205
209
  app.connect("builder-inited", update_config, priority=100)
206
210
  app.connect("builder-inited", generate_search_config, priority=500)
211
+ app.connect("html-page-context", update_opengraph_context, priority=400)
207
212
  app.connect("html-page-context", update_html_context)
208
213
  # Conditionally include goat counter js
209
214
  # We can't do this in update_config as that causes the scripts to be duplicated.
@@ -154,6 +154,16 @@ body {
154
154
  color: var(--sg-download-a-color);
155
155
  }
156
156
 
157
+ /* Hide the download buttons in the gallery pages, as they are in the secondary side bar */
158
+ .sphx-glr-download-link-note, /* Download link note in header */
159
+ .binder-badge, /* Binder launch badge in footer */
160
+ .lite-badge, /* Lite launch badge in footer */
161
+ .sphx-glr-download-jupyter, /* Download Jupyter notebook link in footer */
162
+ .sphx-glr-download-python, /* Download Python script link in footer */
163
+ .sphx-glr-download-zip /* Download zipped link in footer */ {
164
+ display: none;
165
+ }
166
+
157
167
  /* Global Styling */
158
168
  a:visited {
159
169
  color: var(--pst-color-link);
@@ -177,11 +187,6 @@ div.math {
177
187
  --bs-modal-bg: var(--pst-color-background);
178
188
  }
179
189
 
180
- /* Flip the colours on graphviz graphs on dark mode */
181
- html[data-theme="dark"] div.graphviz > object.inheritance {
182
- filter: invert(0.9);
183
- }
184
-
185
190
  /* Top Nav */
186
191
  .bd-header {
187
192
  background-color: var(--sst-header-background) !important;
@@ -223,10 +228,27 @@ html[data-theme="dark"] div.graphviz > object.inheritance {
223
228
  color: var(--sst-accent-color-bright);
224
229
  }
225
230
 
226
- html .pst-navbar-icon {
231
+ /* Change the top navbar toggles and icons in the header to be light */
232
+ .bd-header button.sidebar-toggle,
233
+ html .navbar-header-items__end .pst-navbar-icon,
234
+ html .navbar-header-items__end .pst-navbar-icon:visited {
227
235
  color: var(--sst-header-text);
228
236
  }
229
237
 
238
+ /* Don't style sidebar links as visited color */
239
+ html .pst-navbar-icon:visited {
240
+ color: var(--pst-color-text-muted);
241
+ }
242
+
243
+ html .pst-navbar-icon:hover {
244
+ color: var(--pst-color-secondary);
245
+ }
246
+
247
+ /* Don't put an underline on the icons when hovering */
248
+ html .pst-navbar-icon:hover::before {
249
+ border-bottom: none;
250
+ }
251
+
230
252
  .search-button {
231
253
  color: var(--sst-header-text);
232
254
  }
@@ -278,6 +300,12 @@ html[data-theme="light"] .bd-sidebar-primary .theme-switch-button span {
278
300
  border-right-color: var(--sst-accent-color-bright);
279
301
  }
280
302
 
303
+ /* Put the logo above the version. */
304
+ div.sidebar-primary-item > a.logo {
305
+ display: flex;
306
+ flex-direction: column;
307
+ }
308
+
281
309
  /* Both left and right sidebars */
282
310
  .bd-sidebar-primary,
283
311
  .bd-sidebar-secondary {
@@ -307,7 +335,7 @@ html[data-theme="light"] .bd-sidebar-primary .theme-switch-button span {
307
335
  }
308
336
 
309
337
  img.logo__image {
310
- height: var(--pst-header-height);
338
+ max-height: var(--pst-header-height);
311
339
  }
312
340
 
313
341
  .bd-sidebar-primary .sidebar-primary-items__end {
@@ -456,7 +484,7 @@ html[data-theme="dark"] .search-button-field:hover {
456
484
  .navbar-nav .concertina-toggle:hover,
457
485
  .bd-header .dropdown-item:hover,
458
486
  .bd-header .concertina-toggle:hover {
459
- color: var(--pst-color-link-hover);
487
+ color: var(--sst-accent-color-bright);
460
488
  background-color: transparent;
461
489
  text-decoration: underline;
462
490
  }
@@ -470,7 +498,15 @@ html[data-theme="dark"] .search-button-field:hover {
470
498
  }
471
499
  /* Limit the height of dropdown menu to keep on screen */
472
500
  .bd-header .dropdown-menu {
501
+ --bs-dropdown-bg: var(--sst-header-background);
502
+ --bs-dropdown-color: var(--sst-header-text);
503
+ --bs-dropdown-link-active-bg: var(--bs-dropdown-bg);
473
504
  max-height: 80vh;
474
505
  overflow-y: auto;
475
506
  overscroll-behavior: contain;
476
507
  }
508
+ .dropdown-item.active,
509
+ .dropdown-item:active {
510
+ color: var(--bs-dropdown-link-active-color);
511
+ text-decoration: none;
512
+ }
@@ -0,0 +1,80 @@
1
+ [theme]
2
+ inherit = "pydata_sphinx_theme"
3
+ sidebars = [
4
+ "components/navbar-logo.html",
5
+ "components/sst-sidebar-nav.html",
6
+ ]
7
+
8
+ [options]
9
+ navbar_start = "components/navbar_start.html"
10
+ navbar_center = "components/navbar_center.html"
11
+ footer_start = "copyright.html"
12
+ footer_center = "components/footer-links.html"
13
+ footer_end = "components/built-with.html"
14
+
15
+ sst_site_root = "https://sunpy.org"
16
+ sst_is_root = false
17
+ sst_project_name = "SunPy"
18
+ sst_logo = ""
19
+ navbar_links = [
20
+ ["About",
21
+ [
22
+ ["Our Mission", "about/", 2],
23
+ ["SunPy Project", "about/project/", 2],
24
+ ["Presentations", "about/presentations/", 2],
25
+ ["Meetings", "about/meetings/", 2],
26
+ ["Code of Conduct", "coc/", 2]
27
+ ]
28
+ ],
29
+ ["Documentation",
30
+ [
31
+ ["sunpy", "https://docs.sunpy.org/", 3],
32
+ ["aiapy", "https://aiapy.readthedocs.io/", 3],
33
+ ["dkist", "https://docs.dkist.nso.edu/projects/python-tools", 3],
34
+ ["drms", "https://docs.sunpy.org/projects/drms/", 3],
35
+ ["irispy", "https://irispy.readthedocs.io/", 3],
36
+ ["ndcube", "https://docs.sunpy.org/projects/ndcube/", 3],
37
+ ["roentgen", "https://roentgen.readthedocs.io/", 3],
38
+ ["scope", "https://statistical-confidence-of-oscillatory-processes-with-emd.readthedocs.io", 3],
39
+ ["solarmach", "https://solarmach.readthedocs.io/en/stable/", 3],
40
+ ["sunkit-image", "https://docs.sunpy.org/projects/sunkit-image/", 3],
41
+ ["sunkit-instruments ", "https://docs.sunpy.org/projects/sunkit-instruments/", 3],
42
+ ["sunkit-magex", "https://docs.sunpy.org/projects/sunkit-magex/", 3],
43
+ ["sunkit-pyvista", "https://docs.sunpy.org/projects/sunkit-pyvista/", 3],
44
+ ["sunpy-soar", "https://docs.sunpy.org/projects/soar/", 3],
45
+ ["sunraster", "https://docs.sunpy.org/projects/sunraster/", 3],
46
+ ["xrtpy", "https://xrtpy.readthedocs.io/", 3],
47
+ ["Provisional",
48
+ [
49
+ ["pyflct", "https://pyflct.readthedocs.io/", 3],
50
+ ["radiospectra", "https://docs.sunpy.org/projects/radiospectra/", 3]
51
+ ]
52
+ ],
53
+ ["Tools",
54
+ [
55
+ ["ablog", "https://ablog.readthedocs.io/en/stable/", 3],
56
+ ["mpl-animators", "https://docs.sunpy.org/projects/mpl-animators/", 3],
57
+ ["streamtracer", "https://docs.sunpy.org/projects/streamtracer/", 3]
58
+ ]
59
+ ]
60
+ ]
61
+ ],
62
+ ["Packages", "affiliated/", 2],
63
+ ["Get Help", "help/", 2],
64
+ ["Contribute", "contribute/", 2],
65
+ ["Blog", "blog/", 2],
66
+ ["Cite SunPy", "https://docs.sunpy.org/en/stable/citation.html", 3]
67
+ ]
68
+ footer_links = [
69
+ ["Code", "https://github.com/sunpy", 3],
70
+ ["Forum", "https://community.openastronomy.org/c/sunpy", 3],
71
+ ["Chat", "https://openastronomy.element.io/#/room/#sunpy:openastronomy.org", 3],
72
+ ]
73
+ goatcounter_analytics_url = ""
74
+ goatcounter_non_domain_endpoint = "False"
75
+ pygment_light_style = "github-light"
76
+ rtd_search = "True"
77
+ rtd_search_projects = ""
78
+ rtd_extra_search_projects = ""
79
+ rtd_search_load_more_label = "Load more results"
80
+ rtd_search_no_results_label = "There are no results for this search"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sunpy-sphinx-theme
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: The sphinx theme for the SunPy website and documentation.
5
5
  Author: The SunPy Developers
6
6
  License: BSD 2-Clause License
@@ -36,19 +36,18 @@ Classifier: Programming Language :: Python :: 3
36
36
  Classifier: Framework :: Sphinx
37
37
  Classifier: Framework :: Sphinx :: Theme
38
38
  Classifier: Operating System :: OS Independent
39
- Classifier: License :: OSI Approved :: BSD License
40
39
  Requires-Python: >=3.9
41
40
  Description-Content-Type: text/markdown
42
41
  License-File: LICENSE.md
43
- Requires-Dist: pydata-sphinx-theme~=0.16.0
44
- Requires-Dist: sphinx
42
+ Requires-Dist: pydata-sphinx-theme~=0.17
43
+ Requires-Dist: sphinxext-opengraph>=0.13
44
+ Requires-Dist: sphinx>=7.3.0
45
45
  Provides-Extra: docs
46
46
  Requires-Dist: matplotlib; extra == "docs"
47
47
  Requires-Dist: sphinx-automodapi; extra == "docs"
48
48
  Requires-Dist: sphinx-copybutton; extra == "docs"
49
49
  Requires-Dist: sphinx-design; extra == "docs"
50
50
  Requires-Dist: sphinx-gallery; extra == "docs"
51
- Requires-Dist: sphinx-hoverxref; extra == "docs"
52
51
  Requires-Dist: sphinx-togglebutton; extra == "docs"
53
52
  Requires-Dist: sunpy; extra == "docs"
54
53
  Dynamic: license-file
@@ -17,7 +17,7 @@ src/sunpy_sphinx_theme.egg-info/dependency_links.txt
17
17
  src/sunpy_sphinx_theme.egg-info/entry_points.txt
18
18
  src/sunpy_sphinx_theme.egg-info/requires.txt
19
19
  src/sunpy_sphinx_theme.egg-info/top_level.txt
20
- src/sunpy_sphinx_theme/theme/sunpy/theme.conf
20
+ src/sunpy_sphinx_theme/theme/sunpy/theme.toml
21
21
  src/sunpy_sphinx_theme/theme/sunpy/components/built-with.html
22
22
  src/sunpy_sphinx_theme/theme/sunpy/components/footer-links.html
23
23
  src/sunpy_sphinx_theme/theme/sunpy/components/navbar-logo.html
@@ -1,5 +1,6 @@
1
- pydata-sphinx-theme~=0.16.0
2
- sphinx
1
+ pydata-sphinx-theme~=0.17
2
+ sphinxext-opengraph>=0.13
3
+ sphinx>=7.3.0
3
4
 
4
5
  [docs]
5
6
  matplotlib
@@ -7,6 +8,5 @@ sphinx-automodapi
7
8
  sphinx-copybutton
8
9
  sphinx-design
9
10
  sphinx-gallery
10
- sphinx-hoverxref
11
11
  sphinx-togglebutton
12
12
  sunpy
@@ -1,43 +0,0 @@
1
- [theme]
2
- inherit = pydata_sphinx_theme
3
- sidebars = components/navbar-logo.html, icon-links.html, components/sst-sidebar-nav.html
4
-
5
- [options]
6
- navbar_start = components/navbar_start.html
7
- navbar_center = components/navbar_center.html
8
-
9
- footer_start = copyright.html
10
- footer_center = components/footer-links.html
11
- footer_end = components/built-with.html
12
-
13
- # sunpy-sphinx-theme config
14
- # This config sets the base URL for top navbar items when sst_is_root is False
15
- sst_site_root = https://sunpy.org
16
- # If true then the site that's being built is the site that's normally deployed at sst_site_root
17
- sst_is_root = False
18
- # This is the name that appears in the top left of the navbar
19
- sst_project_name = SunPy
20
- # The logo to go in the top navbar in place of the project name
21
- sst_logo =
22
- navbar_links =
23
- footer_links =
24
- ################################################################################
25
- # GoatCounter
26
- ################################################################################
27
- # Set this URL to something like https://MYCODE.goatcounter.com/count
28
- goatcounter_analytics_url =
29
- # If you only want to count visits to sst_site_root or subdomains there of then set this to False
30
- # otherwise set it to another (or the same) goat counter endpoint
31
- goatcounter_non_domain_endpoint = False
32
-
33
- # Override the default light pygment styles
34
- pygment_light_style = github-light
35
-
36
- ################################################################################
37
- # RTD Search
38
- ################################################################################
39
- # Enable project-wide search with RTD
40
- rtd_search = True
41
- rtd_search_projects =
42
- rtd_search_load_more_label = "Load more results"
43
- rtd_search_no_results_label = "There are no results for this search"