Skip to content

Commit 59aac63

Browse files
authored
Dark mode support on serverless ADR (#369)
Adding documentation on using JavaScript to toggle dark/light mode theme in serverless ADR. (Besides report templates also supports MathJax & Plotly 2D/3D Plots theme changes.)
1 parent a4f0eac commit 59aac63

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/source/serverless/configuration.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@ Advanced / Optional Variables
125125
- **CEI_NEXUS_ENABLE_ACLS**
126126
Enables per-category Access Control Lists (ACLs). Experimental and not recommended for general use.
127127

128+
Client-Side Interactions
129+
------------------------
130+
131+
Serverless ADR also allows modifying the configuration setup from the client-side interactions using JavaScript.
132+
133+
- Dark mode modification: Users can change the value of ``<html></html>`` element's attribute ``data-bs-theme`` to toggle between light/dark mode themes.
134+
135+
.. code-block:: javascript
136+
137+
// toggle light mode (default)
138+
document.documentElement.setAttribute('data-bs-theme','light');
139+
140+
// toggle dark mode
141+
document.documentElement.setAttribute('data-bs-theme','dark');
142+
128143
Usage Notes
129144
-----------
130145

0 commit comments

Comments
 (0)