From cd7d10f5c96ca703f6e343d72f80b2f16080479e 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 | 39 +++++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 30 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..1a6128b 100644 --- a/templates/search.html +++ b/templates/search.html @@ -1,22 +1,25 @@ -{% if PLUGINS and 'tipue_search' in PLUGINS %} -{% extends 'base.html' %} -{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %} +{% if PLUGINS and 'tipue_search' in PLUGINS %} {% extends 'base.html' %} {% +block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %} {% block content %} -
-
-

{{ _('Search Results') }}

-
-
+
+

{{ _('Search Results') }}

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