search.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {% extends 'base.html' %}
  2. {% block title %}
  3. Search · {{ super() }}
  4. {% endblock title %}
  5. {% block head_links %}
  6. {{ super() }}
  7. <link href="http://fonts.googleapis.com/css?family=Lato:300,400|Open+Sans:300,400" rel="stylesheet" type="text/css">
  8. {% endblock head_links %}
  9. {% block head_description %}
  10. Search results for {{ SITENAME|striptags }} blog.
  11. {% endblock head_description %}
  12. {% block script %}
  13. <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  14. <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
  15. <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
  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': '{{ SITEURL }}/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 %}