Skip to content

Commit c8d5655

Browse files
fix: documentation html looks (#3918)
* style: update custom.css to remove background styles and add navbar element styles * style: update conf.py to modify sidebar and navbar configurations * style: refactor custom.css to improve navbar shadow handling and content centering * chore: adding changelog file 3918.fixed.md [dependabot-skip] * style: update custom.css and index.rst for navbar background and section header formatting * style: remove background style for back-to-top button in custom.css since it does not affect. Waiting for ansys-sphinx-theme release --------- Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 52ccf68 commit c8d5655

File tree

5 files changed

+34
-28
lines changed

5 files changed

+34
-28
lines changed

doc/changelog.d/3918.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fix: documentation html looks

doc/source/_static/custom.css

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,29 @@
2020
box-shadow: 0 0rem 0rem 0 rgb(255,172,0); /* var(--pst-color-shadow); */
2121
}
2222

23+
/* Navbar elements */
24+
.bd-navbar-elements {
25+
text-align: center;
26+
}
27+
28+
/* Centering the page content */
29+
.bd-main .bd-content {
30+
display: flex;
31+
justify-content: center;
32+
}
33+
34+
/* Removing navbar shadow */
35+
.sd-shadow-sm {
36+
box-shadow: 0 0rem 0rem rgba(250, 250, 250, 0.6) !important;
37+
}
38+
2339
/* anything related to the light theme */
2440
html[data-theme="light"] {
2541
/* whatever you want to change */
26-
background: rgb(245, 245, 245);
27-
--pst-color-on-background: rgb(35, 35, 35);
28-
--pst-color-background: rgb(245, 245, 245);
29-
--sd-color-card-border-hover: rgb(255,172,0);
30-
31-
.sd-shadow-sm {
32-
box-shadow: 0 0rem 0rem rgba(250, 250, 250, 0.6) !important
33-
}
3442
}
3543

3644
/* anything related to the dark theme */
3745
html[data-theme="dark"] {
3846
/* whatever you want to change */
39-
background: rgb(35, 35, 35);
40-
--pst-color-on-background: rgb(35, 35, 35);
41-
--pst-color-background: rgb(35, 35, 35);
42-
--sd-color-card-border-hover: rgb(255,172,0);
4347

44-
.sd-shadow-sm {
45-
box-shadow: 0 0rem 0rem rgba(250, 250, 250, 0.6) !important
46-
}
4748
}

doc/source/conf.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,23 @@
316316
"json_url": f"https://{cname}/versions.json",
317317
"version_match": switcher_version,
318318
},
319+
# Removing the secondary sidebar for the MAPDL commands
320+
"secondary_sidebar_items": {
321+
# "mapdl_commands/**/**": [],
322+
# "mapdl_commands/index": [],
323+
"**": [], # "page-toc", "edit-this-page", "sourcelink"]
324+
},
325+
"navbar_persistent": [],
326+
"primary_sidebar_end": ["edit-this-page", "sourcelink"],
327+
"navbar_end": [
328+
"search-button-field",
329+
"version-switcher",
330+
"theme-switcher",
331+
"navbar-icon-links",
332+
],
319333
}
320334

335+
321336
BUILD_CHEATSHEET = os.environ.get("BUILD_CHEATSHEET", "false").lower() == "true"
322337

323338
if BUILD_CHEATSHEET:
@@ -338,10 +353,6 @@
338353
}
339354
html_show_sourcelink = False
340355

341-
html_sidebars = {
342-
"mapdl_commands/**/**": [],
343-
"mapdl_commands/index": [],
344-
}
345356

346357
# -- Options for HTMLHelp output ---------------------------------------------
347358

doc/source/index.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@
3333

3434
.. vale off
3535
36-
.. let's hide the `Edit on GitHub` link in this page...
37-
.. and the whole sidebar with it.
38-
.. hideobject::
39-
:class: bd-sidebar-secondary bd-toc
40-
:remove: true
41-
:adjustmargin: true
42-
43-
4436
.. title is given using the
4537
4638
**What do you want to do? I want to...**

doc/source/user_guide/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ various advanced methods to visualize, script, and interact with MAPDL, see
129129

130130

131131
Calling MAPDL Pythonically
132-
~~~~~~~~~~~~~~~~~~~~~~~~~~
132+
==========================
133+
133134
MAPDL functions can be called directly from an instance of
134135
:class:`Mapdl <ansys.mapdl.core.mapdl.MapdlBase>` in a Pythonic manner. This is
135136
to simplify calling Ansys, especially when inputs are variables within

0 commit comments

Comments
 (0)