logo

searx

My custom branche(s) on searx, a meta-search engine git clone https://hacktivis.me/git/searx.git

results.html (6633B)


  1. {% extends "lanodan/base.html" %}
  2. {% block title %}{{ q|e }} - {% endblock %}
  3. {% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('index') }}?q={{ q|urlencode }}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}&amp;pageno={{ pageno }}&amp;time_range={{ time_range }}&amp;language={{ current_language }}&amp;safesearch={{ safesearch }}&amp;format=rss">{% endblock %}
  4. {% block content %}
  5. {% include 'lanodan/search.html' %}
  6. <div id="results">
  7. {% if answers %}
  8. <div id="answers"><h4 class="title">{{ _('Answers') }} : </h4>
  9. {% for answer in answers -%}
  10. <div class="answer">{{ answer }}</div>
  11. {%- endfor %}
  12. </div>
  13. {% endif %}
  14. <div id="sidebar">
  15. {% if number_of_results != '0' -%}
  16. <p id="result_count">{{ _('Number of results') }}: {{ number_of_results }}</p>
  17. {%- endif %}
  18. {% if unresponsive_engines and results|length >= 1 %}
  19. <div class="dialog-error" role="alert">
  20. <p><strong>{{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results') }}:</p>
  21. <p>{% for engine_name, error_type in unresponsive_engines %}
  22. {{ engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}
  23. {% endfor %}</p>
  24. </div>
  25. {% endif %}
  26. {% if infoboxes %}
  27. <div id="infoboxes">
  28. {% for infobox in infoboxes %}
  29. {% include 'lanodan/infobox.html' %}
  30. {% endfor %}
  31. </div>
  32. {% endif %}
  33. {% if suggestions %}
  34. <div id="suggestions">
  35. <h4 class="title">{{ _('Suggestions') }} : </h4>
  36. <div class="wrapper">
  37. {% for suggestion in suggestions %}
  38. <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
  39. <input type="hidden" name="q" value="{{ suggestion }}">
  40. <input type="hidden" name="language" value="{{ current_language }}">
  41. <input type="hidden" name="safesearch" value="{{ safesearch }}">
  42. <input type="hidden" name="theme" value="{{ theme }}">
  43. <input type="submit" class="suggestion" value="{{ suggestion }}">
  44. </form>
  45. {% endfor %}
  46. </div>
  47. </div>
  48. {% endif %}
  49. <div id="search_url">
  50. <h4 class="title"><a href="{{ base_url }}?q={{ q|urlencode }}&amp;language={{ current_language }}&amp;time_range={{ time_range }}&amp;safesearch={{ safesearch }}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}">search url</a></h4>
  51. </div>
  52. <div id="apis">
  53. <h4 class="title">{{ _('Download results') }}</h4>
  54. {% for output_type in ('csv', 'json', 'rss') %}
  55. <div class="left">
  56. <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
  57. <input type="hidden" name="q" value="{{ q|e }}">
  58. {% for category in selected_categories %}
  59. <input type="hidden" name="category_{{ category }}" value="1">
  60. {% endfor %}
  61. <input type="hidden" name="pageno" value="{{ pageno }}">
  62. <input type="hidden" name="time_range" value="{{ time_range }}">
  63. <input type="hidden" name="language" value="{{ current_language }}">
  64. <input type="hidden" name="safesearch" value="{{ safesearch }}">
  65. <input type="hidden" name="format" value="{{ output_type }}">
  66. <input type="submit" value="{{ output_type }}">
  67. </form>
  68. </div>
  69. {% endfor %}
  70. </div>
  71. </div>
  72. {% if corrections %}
  73. <div id="corrections">
  74. <h4>{{ _('Try searching for:') }}</h4>
  75. {% for correction in corrections %}
  76. <div class="left">
  77. <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation">
  78. <input type="hidden" name="q" value="{{ correction }}">
  79. <input type="hidden" name="time_range" value="{{ time_range }}">
  80. <input type="hidden" name="language" value="{{ current_language }}">
  81. <input type="hidden" name="safesearch" value="{{ safesearch }}">
  82. <input type="hidden" name="theme" value="{{ theme }}">
  83. <input type="submit" value="{{ correction }}">
  84. </form>
  85. </div>
  86. {% endfor %}
  87. </div>
  88. {% endif %}
  89. {% for result in results %}
  90. {% set index = loop.index %}
  91. {% if result['template'] %}
  92. {% include get_result_template('lanodan', result['template']) %}
  93. {% else %}
  94. {% include 'lanodan/result_templates/default.html' %}
  95. {% endif %}
  96. {% endfor %}
  97. {% if not results and not answers %}
  98. {% include 'lanodan/messages/no_results.html' %}
  99. {% endif %}
  100. <div id="backToTop">
  101. <a href="#">{{ _('Back to Top') }} ⏫</a>
  102. </div>
  103. {% if paging %}
  104. <nav id="pagination">
  105. {% if pageno > 1 %}
  106. <form id="pagination_previous" method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
  107. <input type="hidden" name="q" value="{{ q|e }}" >
  108. {% for category in selected_categories %}
  109. <input type="hidden" name="category_{{ category }}" value="1" >
  110. {% endfor %}
  111. <input type="hidden" name="pageno" value="{{ pageno-1 }}" >
  112. <input type="hidden" name="time_range" value="{{ time_range }}" >
  113. <input type="hidden" name="language" value="{{ current_language }}" >
  114. <input type="hidden" name="safesearch" value="{{ safesearch }}" >
  115. <input type="hidden" name="theme" value="{{ theme }}" >
  116. <button type="submit">⏮️ {{ _('previous page') }}</button>
  117. </form>
  118. {% endif %}
  119. <form id="pagination_next" method="{{ method or 'POST' }}" action="{{ url_for('index') }}">
  120. <input type="hidden" name="q" value="{{ q|e }}" >
  121. {% for category in selected_categories %}
  122. <input type="hidden" name="category_{{ category }}" value="1" >
  123. {% endfor %}
  124. <input type="hidden" name="pageno" value="{{ pageno+1 }}" >
  125. <input type="hidden" name="time_range" value="{{ time_range }}" >
  126. <input type="hidden" name="language" value="{{ current_language }}" >
  127. <input type="hidden" name="safesearch" value="{{ safesearch }}" >
  128. <input type="hidden" name="theme" value="{{ theme }}" >
  129. <button type="submit">{{ _('next page') }} ⏭️</button>
  130. </form>
  131. </nav>
  132. {% endif %}
  133. </div>
  134. {% endblock %}