search.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/tipuesearch/tipuesearch.css">
  9. {% endblock head_links %}
  10. {% block head_description %}
  11. Search results for {{ SITENAME|striptags }} blog.
  12. {% endblock head_description %}
  13. {% block script %}
  14. <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  15. <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
  16. <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
  17. <script>
  18. $(document).ready(function() {
  19. $('#tipue_search_input').tipuesearch({
  20. {% if 'tipue_search' in PLUGINS %}
  21. 'mode' : 'json',
  22. {% else %}
  23. 'mode': 'live',
  24. {% endif %}
  25. 'show': 10,
  26. 'newWindow': true,
  27. {# I cannot place following statements in the conditionals above because then Tipue Search fails to work. Possibly a bug in Tipue Search. #}
  28. {% if 'tipue_search' in PLUGINS %}
  29. 'contentLocation': '{{ SITEURL }}/tipuesearch_content.json'
  30. {% else %}
  31. 'liveDescription': '.article-content'
  32. {% endif %}
  33. });
  34. });
  35. </script>
  36. {% endblock script %}
  37. {% block content %}
  38. <article>
  39. <div class="span8 offset2">
  40. <div id="tipue_search_content"><div id="tipue_search_loading"></div></div>
  41. </div>
  42. </article>
  43. {% endblock content %}