summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-03-13 09:29:13 +0100
committerGitHub <noreply@github.com>2021-03-13 09:29:13 +0100
commit9292571304376c2c463fb26ee0db89298bb00e6c (patch)
tree8a2dba56227f67aa52b091d1674190cd40e1411e /searx/templates
parent22a2e544551e87fb9ea74d2fe07b59bfa0815368 (diff)
parentcb04d4280642164bddd37e39151bf22799ef3792 (diff)
downloadsearxng-9292571304376c2c463fb26ee0db89298bb00e6c.tar.gz
searxng-9292571304376c2c463fb26ee0db89298bb00e6c.zip
Merge pull request #2346 from dalf/upgrade-oscar
[mod] oscar: upgrade dependencies
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/oscar/base.html22
1 files changed, 10 insertions, 12 deletions
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html
index 2205eb952..f8345d9a7 100644
--- a/searx/templates/oscar/base.html
+++ b/searx/templates/oscar/base.html
@@ -1,11 +1,10 @@
{% from 'oscar/macros.html' import icon %}
<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ preferences.get_value('locale') }}" xml:lang="{{ preferences.get_value('locale') }}"{% if rtl %} dir="rtl"{% endif %}>
+<html lang="{{ preferences.get_value('locale') }}" xml:lang="{{ preferences.get_value('locale') }}"{% if rtl %} dir="rtl"{% endif %}>
<head>
<meta charset="UTF-8" />
<meta name="description" content="searx - a privacy-respecting, hackable metasearch engine" />
<meta name="keywords" content="searx, search, search engine, metasearch, meta search" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="searx/{{ searx_version }}">
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=2.0, user-scalable=1" />
@@ -19,17 +18,16 @@
{{' '}}<link rel="stylesheet" href="{{ url_for('static', filename='css/logicodev.min.css') }}" type="text/css" />
{%- endif %}
- <link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.min.css') }}" type="text/css" />
+ {% set templates = results|map(attribute='template')|unique|list -%}
+ {%- set load_leaflet = 'map.html' in templates -%}
+ {%- if load_leaflet -%}
+ {{' '}}<link rel="stylesheet" href="{{ url_for('static', filename='css/leaflet.min.css') }}" type="text/css" />
+ {%- endif %}
+
{%- for css in styles %}
<link rel="stylesheet" href="{{ url_for('static', filename=css) }}" type="text/css" />
{% endfor %}
- <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="{{ url_for('static', filename='js/html5shiv.min.js') }}"></script>
- <script src="{{ url_for('static', filename='js/respond.min.js') }}"></script>
- <![endif]-->
-
<link rel="shortcut icon" href="{{ url_for('static', filename='img/favicon.png') }}" />
{% block styles %}
@@ -94,11 +92,11 @@
</p>
</div>
</div>
- <script src="{{ url_for('static', filename='js/jquery-1.11.1.min.js') }}"></script>
+ <script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
- {% if autocomplete %} <script src="{{ url_for('static', filename='js/typeahead.bundle.min.js') }}"></script>{% endif %}
+ {% if load_leaflet %}{{" "}}<script src="{{ url_for('static', filename='js/leaflet.js') }}"></script>{{ "\n" }}{% endif %}
+ {% if autocomplete %}{{" "}}<script src="{{ url_for('static', filename='js/typeahead.bundle.min.js') }}"></script>{{ "\n" }}{% endif %}
- <script src="{{ url_for('static', filename='js/require-2.1.15.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/searx.min.js') }}"
data-method="{{ method or 'POST' }}"
data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"></script>