From be893ef08c4bad048a88a202d16881ee37fc5514 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 14 Mar 2024 21:57:44 -0400 Subject: [PATCH 01/30] Switch the manual theme to Furo Since moving from the Wiki we have used the `sphinx_rtd_theme` which has worked well but has become a little dated and has had slow development. This changes to use "Furo" instead. Furo is a lightweight theme that is responsive and has native dark mode support. Dark mode is one of the major enhancements but this change also brings: - Content is slightly larger making text and images easier to view - Site navigation and page navigation is split into two navigation trees. The site navigation is on the left and page on the right if the page has multiple headings. - Return to top button - Content is centered on the screen which helps with wide monitors - No more breadcrumbs So far the caveat that I have noticed with this is slower compile times and larger pages, this is due to the better sidebar navigation. This change also brings a lot of simplifications to customizations that we made to the `sphinx_rtd_theme`. There is still likely room for improvement in the future. --- build_files/templates/base.html | 11 + .../templates/components/analytics.html | 13 + .../footer_contribute.html} | 19 +- .../{layout.html => components/linktags.html} | 6 +- build_files/templates/page.html | 6 + .../variant-selector.html} | 18 +- build_files/theme/css/theme_overrides.css | 376 +++--------------- build_files/theme/css/version_switch.css | 66 ++- manual/conf.py | 35 +- requirements.txt | 2 +- 10 files changed, 148 insertions(+), 404 deletions(-) create mode 100644 build_files/templates/base.html create mode 100644 build_files/templates/components/analytics.html rename build_files/templates/{footer.html => components/footer_contribute.html} (79%) rename build_files/templates/{layout.html => components/linktags.html} (94%) create mode 100644 build_files/templates/page.html rename build_files/templates/{versions.html => sidebar/variant-selector.html} (71%) diff --git a/build_files/templates/base.html b/build_files/templates/base.html new file mode 100644 index 000000000..f959cab35 --- /dev/null +++ b/build_files/templates/base.html @@ -0,0 +1,11 @@ +{%- extends "!base.html" -%} + +{%- block linktags -%} +{{ super() }} +{%- include "components/linktags.html" -%} +{%- endblock -%} + +{%- block theme_scripts -%} +{{ super() }} +{%- include "components/analytics.html" -%} +{%- endblock -%} \ No newline at end of file diff --git a/build_files/templates/components/analytics.html b/build_files/templates/components/analytics.html new file mode 100644 index 000000000..804052199 --- /dev/null +++ b/build_files/templates/components/analytics.html @@ -0,0 +1,13 @@ +{%- if analytics_id %} + + + +{%- endif %} \ No newline at end of file diff --git a/build_files/templates/footer.html b/build_files/templates/components/footer_contribute.html similarity index 79% rename from build_files/templates/footer.html rename to build_files/templates/components/footer_contribute.html index 71f07a1e8..530fdcfaf 100644 --- a/build_files/templates/footer.html +++ b/build_files/templates/components/footer_contribute.html @@ -1,21 +1,19 @@ -{%- extends "!footer.html" %} -{%- block extrafooter %} {%- if not pagename in ("search", "404", "genindex", "advanced/command_line/arguments") and hasdoc(pagename) %} -{%- endif %} -{% endblock %} +{%- endif %} \ No newline at end of file diff --git a/build_files/templates/layout.html b/build_files/templates/components/linktags.html similarity index 94% rename from build_files/templates/layout.html rename to build_files/templates/components/linktags.html index 1d7fa8ba1..747a8bf22 100644 --- a/build_files/templates/layout.html +++ b/build_files/templates/components/linktags.html @@ -1,5 +1,3 @@ -{%- extends "!layout.html" %} -{%- block linktags %} @@ -20,6 +18,4 @@ - -{{ super() }} -{%- endblock %} + \ No newline at end of file diff --git a/build_files/templates/page.html b/build_files/templates/page.html new file mode 100644 index 000000000..f220bfeee --- /dev/null +++ b/build_files/templates/page.html @@ -0,0 +1,6 @@ +{%- extends "!page.html" -%} + +{%- block footer -%} +{{ super() }} +{%- include "components/footer_contribute.html" -%} +{%- endblock footer -%} \ No newline at end of file diff --git a/build_files/templates/versions.html b/build_files/templates/sidebar/variant-selector.html similarity index 71% rename from build_files/templates/versions.html rename to build_files/templates/sidebar/variant-selector.html index ec4e3ea94..9bf23d3b6 100644 --- a/build_files/templates/versions.html +++ b/build_files/templates/sidebar/variant-selector.html @@ -2,28 +2,24 @@