A semantic search engine for source code https://bitshift.benkurtovic.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

118 lines
3.3 KiB

  1. = extends "layout.html"
  2. = block title
  3. Home
  4. = endblock
  5. = block head
  6. {{ assets.tag("jqueryui.custom.min.css") }}
  7. {{ assets.tag("jquery.min.js") }}
  8. {{ assets.tag("jquery-ui.min.js") }}
  9. {{ assets.tag("typeahead.bundle.min.js") }}
  10. {{ assets.tag("index.css") }}
  11. = endblock
  12. = block body
  13. <div id="search-field" class="partly-visible">
  14. <div id="title">
  15. <span id="title-bit">bit</span
  16. ><span id="title-angle">&laquo;</span
  17. ><span id="title-shift">shift</span>
  18. </div>
  19. <form id="search-bar">
  20. <input type="text" name="query">
  21. <div id="advanced-search">
  22. <!-- Tags are closed on the following line to remove whitespace between divs. -->
  23. <div id="col1">
  24. + Add group <!-- Placeholder. -->
  25. </div><div id="col2">
  26. <div id="upper-half">
  27. <div id="col1">
  28. <ul>
  29. <li>
  30. <label for="languages">Languages</label>
  31. <input class="typeahead" type="text" name="languages" id="languages"><br>
  32. </li>
  33. <li>
  34. <label for="authors">Authors</label>
  35. <input type="text" name="authors" id="authors"><br>
  36. </li>
  37. </ul>
  38. </div><div id="col2">
  39. <ul>
  40. <li>
  41. <label for="date-last-modified">Date last modified</label>
  42. <input type="text" name="date-last-modified" id="date-last-modified">
  43. </li>
  44. <li>
  45. <label for="date-created">Date created</label>
  46. <input type="text" name="date-created" id="date-created">
  47. </li>
  48. </ul>
  49. </div>
  50. </div>
  51. <div id="lower-half">
  52. <ul>
  53. <li>
  54. <label for="symbols">Symbols</label>
  55. <input type="text" name="symbols" id="symbols"><br>
  56. </li>
  57. <li>
  58. <label for="functions">Functions</label>
  59. <input type="text" name="functions" id="functions"><br>
  60. </li>
  61. <li>
  62. <label for="classes">Classes</label>
  63. <input type="text" name="classes" id="classes"><br>
  64. </li>
  65. <li>
  66. <label for="variables">Variables</label>
  67. <input type="text" name="variables" id="variables"><br>
  68. </li>
  69. </ul>
  70. </div>
  71. </div>
  72. </div>
  73. </form>
  74. </div>
  75. <div id="results"></div>
  76. {{ assets.tag("index.js") }}
  77. <script>
  78. TYPEAHEAD_LANGUAGES = {{ typeahead_languages | safe }};
  79. $(function() {
  80. $("#date-last-modified").datepicker();
  81. $("#date-created").datepicker();
  82. });
  83. var languages = new Bloodhound({
  84. datumTokenizer: Bloodhound.tokenizers.obj.whitespace("value"),
  85. queryTokenizer: Bloodhound.tokenizers.whitespace,
  86. local: $.map(TYPEAHEAD_LANGUAGES, function(state){
  87. return {value : state};
  88. })
  89. });
  90. languages.initialize();
  91. $(".typeahead").typeahead({
  92. hint: true,
  93. highlight: true,
  94. minLength: 1
  95. },
  96. {
  97. name: "languages",
  98. displayKey: 'value',
  99. source: languages.ttAdapter()
  100. });
  101. </script>
  102. = endblock