base.html 5.4 KB

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