base.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {% from 'oscar/macros.html' import icon %}
  2. <!DOCTYPE html>
  3. <html lang="{{ preferences.get_value('locale') }}" xml:lang="{{ preferences.get_value('locale') }}"{% if rtl %} dir="rtl"{% endif %} class="nojs">
  4. <head>
  5. <meta charset="UTF-8" />
  6. <meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" />
  7. <meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
  8. <meta name="generator" content="searx/{{ searx_version }}">
  9. <meta name="referrer" content="no-referrer">
  10. <meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=2.0, user-scalable=1" />
  11. {% block meta %}{% endblock %}
  12. <title>{% block title %}{% endblock %}{{ instance_name }}</title>
  13. <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" />
  14. {% if preferences.get_value('oscar-style') -%}
  15. {{' '}}<link rel="stylesheet" href="{{ url_for('static', filename='css/'+preferences.get_value('oscar-style')+'.min.css') }}" type="text/css" />
  16. {%- else -%}
  17. {{' '}}<link rel="stylesheet" href="{{ url_for('static', filename='css/logicodev.min.css') }}" type="text/css" />
  18. {%- endif %}
  19. {% set templates = results|map(attribute='template')|unique|list -%}
  20. {%- set load_leaflet = 'map.html' in templates -%}
  21. {%- if load_leaflet -%}
  22. {{' '}}<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.min.css') }}" type="text/css" />
  23. {%- endif %}
  24. {%- for css in styles %}
  25. <link rel="stylesheet" href="{{ url_for('static', filename=css) }}" type="text/css" />
  26. {% endfor %}
  27. <link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}" />
  28. {% block styles %}
  29. {% endblock %}
  30. {% block head %}
  31. {% endblock %}
  32. <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ opensearch_url }}"/>
  33. <noscript>
  34. <style type="text/css">
  35. .tab-content > .active_if_nojs, .active_if_nojs {display: block !important; visibility: visible !important;}
  36. .margin_top_if_nojs {margin-top: 20px;}
  37. .hide_if_nojs {display: none !important;overflow: hidden !important;}
  38. .disabled_if_nojs {pointer-events: none; cursor: default; text-decoration: line-through;}
  39. </style>
  40. </noscript>
  41. </head>
  42. <body class="{{ endpoint }}_endpoint" >
  43. {% include 'oscar/navbar.html' %}
  44. <div class="container">
  45. {% if errors %}
  46. <div class="alert alert-danger fade in" role="alert">
  47. <button class="close" data-dismiss="alert" type="button">
  48. <span aria-hidden="true">×</span>
  49. <span class="sr-only">{{ _('Close') }}</span>
  50. </button>
  51. <strong class="lead">{{ icon('info-sign') }} {{ _('Error!') }}</strong>
  52. <ul>
  53. {% for message in errors %}
  54. <li>{{ message }}</li>
  55. {% endfor %}
  56. </ul>
  57. </div>
  58. {% endif %}
  59. {% block site_alert_error %}
  60. {% endblock %}
  61. {% block site_alert_warning %}
  62. {% endblock %}
  63. {% block site_alert_info %}
  64. {% endblock %}
  65. {% block site_alert_success %}
  66. {% endblock %}
  67. {% block content %}
  68. {% endblock %}
  69. </div>
  70. <div class="footer">
  71. <div class="container">
  72. {% block footer %}
  73. {% endblock %}
  74. <p class="text-muted">
  75. <small>
  76. {{ _('Powered by') }} <a href="{{ brand.DOCS_URL }}">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/>
  77. <a href="{{ brand.GIT_URL }}">{{ _('Source code') }}</a> |
  78. <a href="{{ brand.ISSUE_URL }}">{{ _('Issue tracker') }}</a> |
  79. <a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a>{% if brand.CONTACT_URL %} |
  80. <a href="{{ brand.CONTACT_URL }}">{{ _('Contact instance maintainer') }}</a>{% endif %}
  81. </small>
  82. </p>
  83. </div>
  84. </div>
  85. <script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
  86. <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
  87. {% if load_leaflet %}{{" "}}<script src="{{ url_for('static', filename='js/leaflet.js') }}"></script>{{ "\n" }}{% endif %}
  88. {% if autocomplete %}{{" "}}<script src="{{ url_for('static', filename='js/typeahead.bundle.min.js') }}"></script>{{ "\n" }}{% endif %}
  89. <script src="{{ url_for('static', filename='js/searx.min.js') }}"
  90. data-method="{{ method or 'POST' }}"
  91. data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"
  92. data-translations="{{ translations }}"></script>
  93. {% for script in scripts %}
  94. {{""}}<script src="{{ url_for('static', filename=script) }}"></script>
  95. {% endfor %}
  96. <noscript>
  97. <style>
  98. .glyphicon { display: none; }
  99. </style>
  100. </noscript>
  101. </body>
  102. </html>