search.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 meta_tags_in_head %}
  9. {{ super() }}
  10. <meta property="og:title" content="Search · {{ SITENAME|striptags|e }}"/>
  11. <meta name="twitter:title" content="Search · {{ SITENAME|striptags|e }}">
  12. <meta property="og:url" content="{{ SITEURL }}/search.html" />
  13. <meta property="og:description" content="Search results for {{ SITENAME|striptags|e }} blog" />
  14. <meta name="twitter:description" content="Search results for {{ SITENAME|striptags|e }} blog">
  15. <meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
  16. <meta property="og:article:author" content="{{ AUTHOR }}" />
  17. {% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
  18. {% if FEATURED_IMAGE %}
  19. <meta property="og:image" content="{{FEATURED_IMAGE}}" />
  20. <meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
  21. {% endif %}
  22. {% endblock meta_tags_in_head %}
  23. {% block script %}
  24. <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
  25. {% if 'assets' in PLUGINS %}
  26. {% include '_includes/minify_tipuesearch.html' with context %}
  27. {% else %}
  28. <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
  29. <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
  30. {% endif %}
  31. <script>
  32. $(document).ready(function() {
  33. $('#tipue_search_input').tipuesearch({
  34. {% if 'tipue_search' in PLUGINS %}
  35. 'mode' : 'json',
  36. {% else %}
  37. 'mode': 'live',
  38. {% endif %}
  39. 'show': 10,
  40. 'newWindow': false,
  41. {# I cannot place following statements in the conditionals above because then Tipue Search fails to work. Possibly a bug in Tipue Search. #}
  42. {% if 'tipue_search' in PLUGINS %}
  43. 'contentLocation': 'tipuesearch_content.json'
  44. {% else %}
  45. 'liveDescription': '.article-content'
  46. {% endif %}
  47. });
  48. });
  49. </script>
  50. {% endblock script %}
  51. {% block content %}
  52. <article>
  53. <div class="col-md-8 col-md-offset-2">
  54. <div id="tipue_search_content"><div id="tipue_search_loading"></div></div>
  55. </div>
  56. </article>
  57. {% endblock content %}