Skip to content

Commit f62b4bd

Browse files
fix: download icon with sphinx-gallery and nbsphinx (#471)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 95cd044 commit f62b4bd

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

doc/changelog.d/471.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: download icon with sphinx-gallery and nbsphinx

doc/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@
7676
"logo": "ansys",
7777
}
7878

79+
80+
nbsphinx_prolog = """
81+
Download this example as a :download:`Jupyter notebook </{{ env.docname }}.ipynb>`.
82+
83+
----
84+
"""
85+
7986
# Sphinx extensions
8087
extensions = [
8188
"ansys_sphinx_theme.extension.autoapi",

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,21 @@ div.sphx-glr-download a:hover {
3434
flex-direction: column;
3535
}
3636
div.sphx-glr-download code.download,
37-
a.reference.download:before {
37+
div.sphx-glr-download a.reference.download:before {
3838
color: var(--ast-sphinx-gallery-download-text);
3939
}
40+
41+
a.reference.download:before {
42+
color: var(--ast-color-text);
43+
}
44+
4045
div.sphx-glr-download a:hover {
4146
background-color: var(--ast-sphinx-gallery-download-background-hover);
4247
}
4348

4449
div.sphx-glr-download a {
4550
background-color: var(--ast-sphinx-gallery-download-background);
51+
color: var(--ast-sphinx-gallery-download-text);
4652
}
4753

4854
.docutils.container {

0 commit comments

Comments
 (0)