search.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% extends 'base.html' %}
  2. {% block title %}
  3. Search · {{ super() }}
  4. {% endblock title %}
  5. {% block head_description %}
  6. Search results for {{ SITENAME|striptags|e }} blog.
  7. {% endblock head_description %}
  8. {% block script %}
  9. <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  10. {% if 'assets' in PLUGINS %}
  11. {% include '_includes/minify_tipuesearch.html' with context %}
  12. {% else %}
  13. <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
  14. <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
  15. {% endif %}
  16. <script>
  17. $(document).ready(function() {
  18. $('#tipue_search_input').tipuesearch({
  19. {% if 'tipue_search' in PLUGINS %}
  20. 'mode' : 'json',
  21. {% else %}
  22. 'mode': 'live',
  23. {% endif %}
  24. 'show': 10,
  25. 'newWindow': false,
  26. {# I cannot place following statements in the conditionals above because then Tipue Search fails to work. Possibly a bug in Tipue Search. #}
  27. {% if 'tipue_search' in PLUGINS %}
  28. 'contentLocation': 'tipuesearch_content.json'
  29. {% else %}
  30. 'liveDescription': '.article-content'
  31. {% endif %}
  32. });
  33. });
  34. </script>
  35. {% endblock script %}
  36. {% block content %}
  37. <article>
  38. <div class="span8 offset2">
  39. <div id="tipue_search_content"><div id="tipue_search_loading"></div></div>
  40. </div>
  41. </article>
  42. {% endblock content %}