Skip to content

Commit 563094a

Browse files
release: bump version 0.16.6
1 parent 39ed278 commit 563094a

File tree

4 files changed

+23
-42
lines changed

4 files changed

+23
-42
lines changed

doc/changelog.d/401.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: update the github icon

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
55
[project]
66
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
77
name = "ansys-sphinx-theme"
8-
version = "0.16.5"
8+
version = "0.16.6"
99
description = "A theme devised by ANSYS, Inc. for Sphinx documentation."
1010
readme = "README.rst"
1111
requires-python = ">=3.9,<4"

src/ansys_sphinx_theme/__init__.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,25 @@ def setup_default_html_theme_options(app):
167167
168168
"""
169169
# Place all switchers and icons at the end of the navigation bar
170-
if app.config.html_theme_options.get("switcher"):
171-
app.config.html_theme_options.setdefault(
170+
theme_options = app.config.html_theme_options
171+
# Place all switchers and icons at the end of the navigation bar
172+
if theme_options.get("switcher"):
173+
theme_options.setdefault(
172174
"navbar_end", ["version-switcher", "theme-switcher", "navbar-icon-links"]
173175
)
174-
app.config.html_theme_options.setdefault("collapse_navigation", True)
175-
app.config.html_theme_options.setdefault("navigation_with_keys", True)
176+
theme_options.setdefault("collapse_navigation", True)
177+
theme_options.setdefault("navigation_with_keys", True)
178+
179+
# Update the icon links. If not given, add a default GitHub icon.
180+
if not theme_options.get("icon_links") and theme_options.get("github_url"):
181+
theme_options["icon_links"] = [
182+
{
183+
"name": "GitHub",
184+
"url": theme_options["github_url"],
185+
"icon": "fa-brands fa-github",
186+
}
187+
]
188+
theme_options["github_url"] = None
176189

177190

178191
def fix_edit_html_page_context(

src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,10 @@ Navigation column (according to side column)
600600
display: unset;
601601
}
602602

603+
.theme-switch-button span {
604+
color: #fff;
605+
}
606+
603607
/*
604608
#################################
605609
Syntax highlighting in code block
@@ -677,28 +681,11 @@ icon, button, logo
677681
##################
678682
*/
679683

680-
button,
681-
input,
682-
optgroup,
683-
select,
684-
textarea,
685-
button:hover {
686-
color: #ddd;
687-
}
688-
689-
.theme-switch-button {
690-
border-color: #f8f9fa;
691-
}
692-
693684
button.btn.version-switcher__button {
694685
border-color: var(--pst-color-border);
695686
color: #ddd;
696687
}
697688

698-
button.version-switcher__button:hover {
699-
color: #f8f8f2;
700-
}
701-
702689
button.version-switcher__button {
703690
color: #f8f9fa;
704691
}
@@ -748,15 +735,6 @@ icon, button, logo for small screen
748735
}
749736
}
750737

751-
.theme-switch-button span {
752-
color: #f8f9fa;
753-
}
754-
755-
.theme-switch-button span:hover {
756-
color: var(--ansysGold);
757-
border-color: white;
758-
}
759-
760738
.navbar-icon-links {
761739
column-gap: 0.2rem;
762740
}
@@ -772,12 +750,6 @@ icon, button, logo for small screen
772750

773751
/* make the github logo white */
774752

775-
i.fa-github-square:before,
776-
i.fa-square-github:before {
777-
color: white;
778-
font-size: 1rem;
779-
}
780-
781753
.version-switcher__menu a.list-group-item:hover {
782754
background-color: #d09735 !important;
783755
border-color: var(--pst-color-text-base) !important;
@@ -795,11 +767,6 @@ i.fa-square-github:before {
795767
color: white;
796768
}
797769

798-
.navbar-icon-links {
799-
font-size: 1.5rem;
800-
color: white;
801-
}
802-
803770
html[data-theme="light"] #pst-back-to-top {
804771
background-color: var(--pst-color-link);
805772
}

0 commit comments

Comments
 (0)