Merge pull request #266 from lioman/master
improve loading time by moving tipue search to appropriate place
This commit is contained in:
commit
2fc69e12ef
2 changed files with 19 additions and 27 deletions
|
@ -70,11 +70,6 @@
|
|||
{% 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.min.js"></script>
|
||||
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.min.js"></script>
|
||||
<script src="{{ SITEURL }}/tipuesearch_content.js"></script>
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.css" />
|
||||
{% endif %}
|
||||
|
||||
|
@ -300,14 +295,6 @@
|
|||
{% include 'partial/github.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% if PLUGINS and 'tipue_search' in PLUGINS %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tipue_search_input').tipuesearch();
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{% block additional_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2,16 +2,6 @@
|
|||
{% extends 'base.html' %}
|
||||
{% block title %}{{ _('Search') }} - {{ SITENAME|striptags }}{% endblock title %}
|
||||
{% block content %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tipue_search_input').tipuesearch({
|
||||
'show': 10,
|
||||
'mode': 'json',
|
||||
'contentLocation': '{{ SITEURL }}/tipuesearch_content.js'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<article class="single">
|
||||
<header>
|
||||
<h1 id="categories">{{ _('Search Results') }}</h1>
|
||||
|
@ -19,4 +9,19 @@
|
|||
<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 additional_js %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue