From e5b1f7e5ef6763f74b5f08ee8bfc2e8524fe6fa2 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 1 Aug 2022 15:29:32 +0900 Subject: [PATCH] Add search.html --- src/doc/common/templates-furo/search.html | 70 +++++++++++++++++++ .../sidebar/brand.html | 4 +- src/sage_docbuild/conf.py | 43 ++++++------ 3 files changed, 93 insertions(+), 24 deletions(-) create mode 100644 src/doc/common/templates-furo/search.html rename src/doc/common/{templates => templates-furo}/sidebar/brand.html (90%) diff --git a/src/doc/common/templates-furo/search.html b/src/doc/common/templates-furo/search.html new file mode 100644 index 00000000000..c258a04389f --- /dev/null +++ b/src/doc/common/templates-furo/search.html @@ -0,0 +1,70 @@ +{#- + The search page template modified from theme/basic/search.html +-#} +{% extends "page.html" %} + +{%- block regular_scripts -%} +{{ super() }} + + +{%- endblock regular_scripts-%} + +{%- block htmltitle -%} +{{ _("Search") }} - {{ docstitle }} +{%- endblock htmltitle -%} + +{% block scripts -%} +{{ super() }} + +{%- endblock scripts %} + +{% block content %} +

{{ _('Search') }}

+{% block scriptwarning %} + +{% endblock %} +{% block searchtext %} +

+ {% trans %}Searching for multiple words only shows matches that contain + all words.{% endtrans %} +

+

+ {% trans %}Note also that you can also call "search_src(...)" + in Sage to search Sage's source code.{% endtrans %} +

+{% endblock %} +{% block searchbox %} +
+ + + +
+{% endblock %} +{% block searchresults %} + {% if search_performed %} +

{{ _('Search Results') }}

+ {% if not search_results %} +

{{ _('Your search did not match any documents.') }}

+ {% endif %} + {% endif %} +
+ {% if search_results %} + + {% endif %} +
+{% endblock %} +{% endblock %} + diff --git a/src/doc/common/templates/sidebar/brand.html b/src/doc/common/templates-furo/sidebar/brand.html similarity index 90% rename from src/doc/common/templates/sidebar/brand.html rename to src/doc/common/templates-furo/sidebar/brand.html index bbd7c8ad8c4..fd1d69324b2 100644 --- a/src/doc/common/templates/sidebar/brand.html +++ b/src/doc/common/templates-furo/sidebar/brand.html @@ -1,7 +1,5 @@ {#- - -This is a sidebar brand html modified from Furo's default theme/furo/sidebar/brand.html - + The sidebar brand template modified from theme/furo/sidebar/brand.html -#}