flex/templates/search.html
lioman cd7d10f5c9 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
2021-03-11 18:32:54 +01:00

25 lines
951 B
HTML

{% if PLUGINS and 'tipue_search' in PLUGINS %} {% extends 'base.html' %} {%
block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
{% block content %}
<article class="single">
<header>
<h1 id="categories">{{ _('Search Results') }}</h1>
</header>
<div id="tipue_search_content"></div>
</article>
{% endblock content %} {% block additional_js %}
<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({
show: 10,
mode: "json",
contentLocation: "{{ SITEURL }}/tipuesearch_content.js",
});
});
</script>
{% endblock %} {% endif %}