diff --git a/doc/_themes/sphinx13/layout.html b/doc/_themes/sphinx13/layout.html
index c6657365a09..5fe3884d7ec 100644
--- a/doc/_themes/sphinx13/layout.html
+++ b/doc/_themes/sphinx13/layout.html
@@ -6,6 +6,7 @@
{%- if not embedded and pagename == root_doc %}
{%- endif %}
+
{% endblock %}
{% block header %}
@@ -21,6 +22,9 @@
+
{% endblock %}
@@ -107,22 +111,28 @@
{{ _('On this page') }}
{% endmacro %}
diff --git a/doc/_themes/sphinx13/static/dark-mode.js b/doc/_themes/sphinx13/static/dark-mode.js
new file mode 100644
index 00000000000..fbb6b123310
--- /dev/null
+++ b/doc/_themes/sphinx13/static/dark-mode.js
@@ -0,0 +1,16 @@
+document.addEventListener('DOMContentLoaded', () => {
+ const toggleBtn = document.getElementById('toggle-theme');
+ const htmlTag = document.documentElement;
+
+ const savedTheme = localStorage.getItem('theme');
+ if (savedTheme === 'dark') {
+ htmlTag.classList.add('dark-mode');
+ toggleBtn.textContent = '☀️ Light Mode';
+ }
+
+ toggleBtn?.addEventListener('click', () => {
+ const isDark = htmlTag.classList.toggle('dark-mode');
+ localStorage.setItem('theme', isDark ? 'dark' : 'light');
+ toggleBtn.textContent = isDark ? '☀️ Light Mode' : '🌙 Dark Mode';
+ });
+});
diff --git a/doc/_themes/sphinx13/static/sphinx13.css b/doc/_themes/sphinx13/static/sphinx13.css
index 22bef884737..41ade4c4af0 100644
--- a/doc/_themes/sphinx13/static/sphinx13.css
+++ b/doc/_themes/sphinx13/static/sphinx13.css
@@ -785,3 +785,41 @@ ul.search li.kind-title {
ul.search li.kind-text {
list-style-type: "\1F4C4"; /* Unicode: Page Facing Up */
}
+/* --- Dark Mode Overrides --- */
+.dark-mode {
+ background-color: #121212;
+ color: #f0f0f0;
+}
+
+.dark-mode .pageheader,
+.dark-mode .sphinxsidebar,
+.dark-mode .footer,
+.dark-mode .related {
+ background-color: #1f1f1f;
+ color: #eee;
+}
+
+.dark-mode a {
+ color: #90caf9;
+}
+
+.dark-mode h1,
+.dark-mode h2,
+.dark-mode h3 {
+ color: #ffeb3b;
+}
+/* Feature card fix for dark mode */
+.dark-mode .sphinx-feature {
+ background-color: #1e1e1e !important;
+ border: 1px solid #444;
+ color: #e0e0e0;
+}
+
+.dark-mode .sphinx-feature a {
+ color: #90caf9;
+}
+
+.dark-mode .sphinx-feature > p.admonition-title {
+ background-color: #2a2a2a !important;
+ color: #ffeb3b;
+}
diff --git a/tests/roots/test-root/wrongenc.inc b/tests/roots/test-root/wrongenc.inc
index 700f61344ff..3a26a1aa5d7 100644
Binary files a/tests/roots/test-root/wrongenc.inc and b/tests/roots/test-root/wrongenc.inc differ
diff --git a/tests/roots/test-warnings/wrongenc.inc b/tests/roots/test-warnings/wrongenc.inc
index 700f61344ff..a2ace312564 100644
--- a/tests/roots/test-warnings/wrongenc.inc
+++ b/tests/roots/test-warnings/wrongenc.inc
@@ -1,3 +1,3 @@
This file is encoded in latin-1 but at first read as utf-8.
-Max Strau a in Mnchen eine Leberkssemmel.
+Max Strauß aß in München eine Leberkässemmel.