From b30a2503be3b263e5599d5733dbaf9b72f18b796 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Mon, 24 Mar 2025 11:37:18 -0600 Subject: [PATCH 01/10] Move RTD ads to the sidebar --- doc/OnlineDocs/_templates/ethicalads.html | 1 + doc/OnlineDocs/conf.py | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 doc/OnlineDocs/_templates/ethicalads.html diff --git a/doc/OnlineDocs/_templates/ethicalads.html b/doc/OnlineDocs/_templates/ethicalads.html new file mode 100644 index 00000000000..e8e8f9241cc --- /dev/null +++ b/doc/OnlineDocs/_templates/ethicalads.html @@ -0,0 +1 @@ +
diff --git a/doc/OnlineDocs/conf.py b/doc/OnlineDocs/conf.py index d4deca77508..789c8f588e9 100644 --- a/doc/OnlineDocs/conf.py +++ b/doc/OnlineDocs/conf.py @@ -183,6 +183,15 @@ # html_theme_options = {'navigation_depth': 6, 'titles_only': True} +html_sidebars = { + "**": [ + "localtoc.html", + "relations.html", + "ethicalads.html", # Put the ad below the navigation and previous/next + "sourcelink.html", + "searchbox.html", + ] +} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". From 7b6a1935029a059997dbf86c2c61ee222e0341e7 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Wed, 26 Mar 2025 23:50:31 -0600 Subject: [PATCH 02/10] Another attempt to move the ad content --- doc/OnlineDocs/_templates/footer.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/OnlineDocs/_templates/footer.html diff --git a/doc/OnlineDocs/_templates/footer.html b/doc/OnlineDocs/_templates/footer.html new file mode 100644 index 00000000000..d5d50c3f9d6 --- /dev/null +++ b/doc/OnlineDocs/_templates/footer.html @@ -0,0 +1,5 @@ +{% extends "!footer.html" %} +{%- block contentinfo %} +{{ super }} +
+{% endblock %} From 2697cf16860fe05f7e475e191b94c898348a8a19 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Fri, 11 Apr 2025 11:10:05 -0600 Subject: [PATCH 03/10] Remove previous attempt, move from footer to sidebar --- doc/OnlineDocs/_templates/ethicalads.html | 1 - doc/OnlineDocs/_templates/{footer.html => layout.html} | 0 2 files changed, 1 deletion(-) delete mode 100644 doc/OnlineDocs/_templates/ethicalads.html rename doc/OnlineDocs/_templates/{footer.html => layout.html} (100%) diff --git a/doc/OnlineDocs/_templates/ethicalads.html b/doc/OnlineDocs/_templates/ethicalads.html deleted file mode 100644 index e8e8f9241cc..00000000000 --- a/doc/OnlineDocs/_templates/ethicalads.html +++ /dev/null @@ -1 +0,0 @@ -
diff --git a/doc/OnlineDocs/_templates/footer.html b/doc/OnlineDocs/_templates/layout.html similarity index 100% rename from doc/OnlineDocs/_templates/footer.html rename to doc/OnlineDocs/_templates/layout.html From b7102098098c7aef7ffda832f648f8477e7eccd9 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Fri, 11 Apr 2025 11:12:27 -0600 Subject: [PATCH 04/10] Update layout template --- doc/OnlineDocs/_templates/layout.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/OnlineDocs/_templates/layout.html b/doc/OnlineDocs/_templates/layout.html index d5d50c3f9d6..e9206462411 100644 --- a/doc/OnlineDocs/_templates/layout.html +++ b/doc/OnlineDocs/_templates/layout.html @@ -1,5 +1,6 @@ -{% extends "!footer.html" %} -{%- block contentinfo %} -{{ super }} +{% extends "!layout.html" %} +{%- block navigation %} +{{ super() }} +
{% endblock %} From 9bb72172ae0d4b0d12de90fdca1145b137c09040 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Fri, 11 Apr 2025 11:12:38 -0600 Subject: [PATCH 05/10] Remove unneeded configuration --- doc/OnlineDocs/conf.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/doc/OnlineDocs/conf.py b/doc/OnlineDocs/conf.py index 789c8f588e9..d4deca77508 100644 --- a/doc/OnlineDocs/conf.py +++ b/doc/OnlineDocs/conf.py @@ -183,15 +183,6 @@ # html_theme_options = {'navigation_depth': 6, 'titles_only': True} -html_sidebars = { - "**": [ - "localtoc.html", - "relations.html", - "ethicalads.html", # Put the ad below the navigation and previous/next - "sourcelink.html", - "searchbox.html", - ] -} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". From 29774ada4eb96e13746b5b9a594f7dde6a928ec0 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Fri, 11 Apr 2025 11:30:49 -0600 Subject: [PATCH 06/10] Try shrinking the ads just a bit --- doc/OnlineDocs/_templates/layout.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/OnlineDocs/_templates/layout.html b/doc/OnlineDocs/_templates/layout.html index e9206462411..474a0affaae 100644 --- a/doc/OnlineDocs/_templates/layout.html +++ b/doc/OnlineDocs/_templates/layout.html @@ -1,6 +1,8 @@ {% extends "!layout.html" %} {%- block navigation %} {{ super() }} -
-
+
+
+
+
{% endblock %} From a1f91e617e7f3ce29d2267bd283f16e3faa58048 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Fri, 11 Apr 2025 11:39:38 -0600 Subject: [PATCH 07/10] Shrink the ad box slightly, and center --- doc/OnlineDocs/_templates/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/OnlineDocs/_templates/layout.html b/doc/OnlineDocs/_templates/layout.html index 474a0affaae..35ef12c8665 100644 --- a/doc/OnlineDocs/_templates/layout.html +++ b/doc/OnlineDocs/_templates/layout.html @@ -1,7 +1,7 @@ {% extends "!layout.html" %} {%- block navigation %} {{ super() }} -
+

From 27b1dd62b468970b3278aa3c022f4335668f01c8 Mon Sep 17 00:00:00 2001 From: John Siirola Date: Fri, 11 Apr 2025 11:41:05 -0600 Subject: [PATCH 08/10] Fix typo in PyROS docs (output line numbering) --- doc/OnlineDocs/explanation/solvers/pyros.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/OnlineDocs/explanation/solvers/pyros.rst b/doc/OnlineDocs/explanation/solvers/pyros.rst index 93c1b8aeefc..241a140060a 100644 --- a/doc/OnlineDocs/explanation/solvers/pyros.rst +++ b/doc/OnlineDocs/explanation/solvers/pyros.rst @@ -959,7 +959,6 @@ Observe that the log contains the following information: .. _solver-log-snippet: .. code-block:: text - :caption: PyROS solver output log for the :ref:`two-stage problem example `. :linenos: From e80b774dc56b1afa2288f3a3899e2860cc86009e Mon Sep 17 00:00:00 2001 From: John Siirola Date: Fri, 11 Apr 2025 11:59:10 -0600 Subject: [PATCH 09/10] Try to get the ads to render in dark mode --- doc/OnlineDocs/_templates/layout.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/OnlineDocs/_templates/layout.html b/doc/OnlineDocs/_templates/layout.html index 35ef12c8665..cea68a8e56f 100644 --- a/doc/OnlineDocs/_templates/layout.html +++ b/doc/OnlineDocs/_templates/layout.html @@ -1,8 +1,10 @@ {% extends "!layout.html" %} {%- block navigation %} {{ super() }} -
+

-
+
+
+
{% endblock %} From 0c741685c2c0ec77c8b5b65d98b5f54340fd400a Mon Sep 17 00:00:00 2001 From: John Siirola Date: Mon, 14 Apr 2025 08:43:46 -0600 Subject: [PATCH 10/10] Address review comment: explain why we are placing the ads --- doc/OnlineDocs/_templates/layout.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/OnlineDocs/_templates/layout.html b/doc/OnlineDocs/_templates/layout.html index cea68a8e56f..777a884bfe5 100644 --- a/doc/OnlineDocs/_templates/layout.html +++ b/doc/OnlineDocs/_templates/layout.html @@ -1,4 +1,9 @@ {% extends "!layout.html" %} +{# Explicitly put RTD's ads in the sidebar. If we don't specify a + location, RTD puts them at the bottom of the page content in a + style that is easily visually confused with the documentation + content. +#} {%- block navigation %} {{ super() }}