From 4051e3f9dd68d653391574a9ffae75e4447c6aea Mon Sep 17 00:00:00 2001 From: Haowei Hsu Date: Tue, 12 May 2026 15:12:36 +0800 Subject: [PATCH] [Docs] adjust sphinx theme templates for gettext builder - Add `_()` and `{% trans %}{% endtrans %}` for gettext builder. - Adjust the indentation of the sphinx theme templates. - Trim trailing spaces and replace tabs with spaces. --- .../breadcrumbs.html | 12 +- .../emscripten_sphinx_rtd_theme/footer.html | 138 +++++------ .../emscripten_sphinx_rtd_theme/layout.html | 234 +++++++++--------- 3 files changed, 180 insertions(+), 204 deletions(-) diff --git a/site/source/_themes/emscripten_sphinx_rtd_theme/breadcrumbs.html b/site/source/_themes/emscripten_sphinx_rtd_theme/breadcrumbs.html index 605cb9d2f5848..994d7f0d72b16 100644 --- a/site/source/_themes/emscripten_sphinx_rtd_theme/breadcrumbs.html +++ b/site/source/_themes/emscripten_sphinx_rtd_theme/breadcrumbs.html @@ -1,11 +1,9 @@
- - -
\ No newline at end of file + diff --git a/site/source/_themes/emscripten_sphinx_rtd_theme/footer.html b/site/source/_themes/emscripten_sphinx_rtd_theme/footer.html index fc81b4d75ca9e..cf1b0c639127a 100644 --- a/site/source/_themes/emscripten_sphinx_rtd_theme/footer.html +++ b/site/source/_themes/emscripten_sphinx_rtd_theme/footer.html @@ -1,106 +1,88 @@ diff --git a/site/source/_themes/emscripten_sphinx_rtd_theme/layout.html b/site/source/_themes/emscripten_sphinx_rtd_theme/layout.html index 1eac43b058f78..7a7f09d728bcd 100644 --- a/site/source/_themes/emscripten_sphinx_rtd_theme/layout.html +++ b/site/source/_themes/emscripten_sphinx_rtd_theme/layout.html @@ -104,143 +104,139 @@ +
+ {%- block extrabody %} {% endblock %} +
+ {#- SIDE NAV, TOGGLES ON MOBILE #} + +
-
+ {#- MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #} + {#- Translators: This is an ARIA section label for the navigation menu that is visible when viewing the page on mobile devices -#} + - {#- MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #} - {#- Translators: This is an ARIA section label for the navigation menu that is visible when viewing the page on mobile devices -#} - +
+ {%- block content %} + {%- if theme_style_external_links|tobool %} +
-
- {% include "versions.html" -%} + +
+ {% include "versions.html" -%} - + - {#- Do not conflict with RTD insertion of analytics script #} - {%- if not READTHEDOCS %} - {%- if theme_analytics_id %} + {#- Do not conflict with RTD insertion of analytics script #} + {%- if not READTHEDOCS %} + {%- if theme_analytics_id %} + {%- endif %} {%- endif %} - {%- endif %} - {%- block footer %} {% endblock %} - + {%- block footer %}{% endblock %} +