Skip to content

Commit d5ad6a1

Browse files
Add badges for supported solvers (#1925)
* Add custom badges for supported solvers * Test custom badges * Update conf.py * Update doc/source/conf.py Co-authored-by: Revathy Venugopal <[email protected]> --------- Co-authored-by: Revathy Venugopal <[email protected]>
1 parent 1dd2cdb commit d5ad6a1

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

doc/source/_static/custom.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,15 @@
22
.wy-table-responsive table td, .wy-table-responsive table th {
33
white-space: normal;
44
}
5+
/* Check https://www.w3schools.com/cssref/css_colors.php for colors */
6+
/* Ansys gold for MAPDL with black text*/
7+
.sd-bg-mapdl{background-color: #FFB71B}
8+
.sd-bg-text-mapdl{color: Black}
9+
/* Ansys orange accent color for Fluent with black text*/
10+
.sd-bg-lsdyna{background-color: #FB471F}
11+
.sd-bg-text-lsdyna{color: Black}
12+
/* Ansys blue accent color #00629F for Fluent with black text*/
13+
.sd-bg-fluent{background-color: #0081D0}
14+
.sd-bg-text-fluent{color: Black}
15+
.sd-bg-cfx{background-color: LightSeaGreen}
16+
.sd-bg-text-cfx{color: Black}

doc/source/conf.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,17 @@ def reset_servers(gallery_conf, fname, when):
324324

325325
# A list of files that should not be packed into the epub file.
326326
epub_exclude_files = ["search.html"]
327+
328+
# Define custom docutils roles for solver badges
329+
from sphinx_design.badges_buttons import BadgeRole
330+
331+
def setup(app):
332+
badge_roles = {
333+
"bdg-mapdl": "mapdl",
334+
"bdg-cfx": "cfx",
335+
"bdg-fluent": "fluent",
336+
"bdg-lsdyna": "lsdyna"
337+
}
338+
339+
for role_name, color in badge_roles.items():
340+
app.add_role(name=role_name, role=BadgeRole(color=color))

doc/source/user_guide/tutorials/animate/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ These tutorials demonstrate how to visualise the data in an animation.
1717
:text-align: center
1818

1919
This tutorial
20+
+++
21+
:bdg-mapdl:`MAPDL` :bdg-lsdyna:`LS-DYNA` :bdg-fluent:`FLUENT` :bdg-cfx:`CFX`
2022

2123
.. toctree::
2224
:maxdepth: 2

0 commit comments

Comments
 (0)