Skip to content

Commit

Permalink
Add badges for supported solvers (#1925)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
2 people authored and luisaFelixSalles committed Dec 19, 2024
1 parent d6ed508 commit bb6b859
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: normal;
}
/* Check https://www.w3schools.com/cssref/css_colors.php for colors */
/* Ansys gold for MAPDL with black text*/
.sd-bg-mapdl{background-color: #FFB71B}
.sd-bg-text-mapdl{color: Black}
/* Ansys orange accent color for Fluent with black text*/
.sd-bg-lsdyna{background-color: #FB471F}
.sd-bg-text-lsdyna{color: Black}
/* Ansys blue accent color #00629F for Fluent with black text*/
.sd-bg-fluent{background-color: #0081D0}
.sd-bg-text-fluent{color: Black}
.sd-bg-cfx{background-color: LightSeaGreen}
.sd-bg-text-cfx{color: Black}
14 changes: 14 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,17 @@ def reset_servers(gallery_conf, fname, when):

# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]

# Define custom docutils roles for solver badges
from sphinx_design.badges_buttons import BadgeRole

def setup(app):
badge_roles = {
"bdg-mapdl": "mapdl",
"bdg-cfx": "cfx",
"bdg-fluent": "fluent",
"bdg-lsdyna": "lsdyna"
}

for role_name, color in badge_roles.items():
app.add_role(name=role_name, role=BadgeRole(color=color))
2 changes: 2 additions & 0 deletions doc/source/user_guide/tutorials/animate/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ These tutorials demonstrate how to visualise the data in an animation.
:text-align: center

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

.. toctree::
:maxdepth: 2
Expand Down

0 comments on commit bb6b859

Please sign in to comment.