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
This commit is contained in:
lioman 2021-03-09 08:57:48 +01:00 committed by Lioman
parent 6fe38c6986
commit 4b76663ae1
2 changed files with 19 additions and 26 deletions

View file

@ -295,18 +295,6 @@
{% include 'partial/github.html' %}
{% endif %}
{% if PLUGINS and 'tipue_search' in PLUGINS %}
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/jquery.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script>
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.min.js"></script>
<script src="{{ SITEURL }}/tipuesearch_content.js"></script>
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch();
});
</script>
{% endif %}
{% block additional_js %}{% endblock %}
</body>
</html>