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