From 4b76663ae181518af0134cfd0f45573362fad753 Mon Sep 17 00:00:00 2001 From: lioman Date: Tue, 9 Mar 2021 08:57:48 +0100 Subject: [PATCH] move search files to search page - To speed up page load the js files should be loaded on bottom of page. - search files are only needed if you search. Move them to search page - instantiate tipue search only on search page --- templates/base.html | 12 ------------ templates/search.html | 33 +++++++++++++++++++-------------- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/templates/base.html b/templates/base.html index 5ff35dc..0da863e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -295,18 +295,6 @@ {% include 'partial/github.html' %} {% endif %} - {% if PLUGINS and 'tipue_search' in PLUGINS %} - - - - - - {% endif %} - {% block additional_js %}{% endblock %} diff --git a/templates/search.html b/templates/search.html index 1252834..2af8292 100644 --- a/templates/search.html +++ b/templates/search.html @@ -2,21 +2,26 @@ {% extends 'base.html' %} {% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %} {% block content %} - -
-
-

{{ _('Search Results') }}

-
-
+
+

{{ _('Search Results') }}

+
+
{% endblock content %} +{% block additional_js %} + + + + + +{% endblock additional_js %} {% endif %}