Skip to content

Commit d134899

Browse files
committed
Add custom badges for supported solvers
1 parent 97f32dc commit d134899

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

doc/source/_static/custom.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,16 @@
1616
.sd-sphinx-override .code {
1717
background-color: var(--pst-color-surface);
1818
}
19+
20+
/* Check https://www.w3schools.com/cssref/css_colors.php for colors */
21+
/* Ansys gold for MAPDL with black text*/
22+
.sd-bg-mapdl{background-color: #FFB71B}
23+
.sd-bg-text-mapdl{color: Black}
24+
/* Ansys orange accent color for Fluent with black text*/
25+
.sd-bg-lsdyna{background-color: #FB471F}
26+
.sd-bg-text-lsdyna{color: Black}
27+
/* Ansys blue accent color #00629F for Fluent with black text*/
28+
.sd-bg-fluent{background-color: #0081D0}
29+
.sd-bg-text-fluent{color: Black}
30+
.sd-bg-cfx{background-color: LightSeaGreen}
31+
.sd-bg-text-cfx{color: Black}

doc/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,5 +332,12 @@ def verify_meilisearch_is_active(app):
332332
# sys.exit(1)
333333

334334

335+
# Define custom docutils roles for solver badges
336+
from sphinx_design.badges_buttons import BadgeRole
337+
335338
def setup(app):
336339
app.connect("builder-inited", verify_meilisearch_is_active)
340+
app.add_role(name="bdg-mapdl", role=BadgeRole(color="mapdl"))
341+
app.add_role(name="bdg-cfx", role=BadgeRole(color="cfx"))
342+
app.add_role(name="bdg-fluent", role=BadgeRole(color="fluent"))
343+
app.add_role(name="bdg-lsdyna", role=BadgeRole(color="lsdyna"))

0 commit comments

Comments
 (0)