diff options
Diffstat (limited to 'searx/templates/oscar/base.html')
-rw-r--r-- | searx/templates/oscar/base.html | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index 66a9e60..6134bd7 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -1,16 +1,14 @@ {% from 'oscar/macros.html' import icon %} <!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}> +<html lang="{{ preferences.get_value('locale') }}" xml:lang="{{ preferences.get_value('locale') }}"{% if rtl %} dir="rtl"{% endif %} class="nojs"> <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=1.0, user-scalable=1" /> + <meta name="viewport" content="width=device-width, initial-scale=1 , maximum-scale=2.0, user-scalable=1" /> {% block meta %}{% endblock %} - <title>{% block title %}{% endblock %}{{ instance_name }}</title> <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" /> {% if preferences.get_value('oscar-style') -%} @@ -19,17 +17,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 %} @@ -37,17 +34,17 @@ {% block head %} {% endblock %} - <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ url_for('opensearch') }}"/> + <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ opensearch_url }}"/> <noscript> <style type="text/css"> .tab-content > .active_if_nojs, .active_if_nojs {display: block !important; visibility: visible !important;} .margin_top_if_nojs {margin-top: 20px;} - .hide_if_nojs {display: none !important;overflow:none !important;} + .hide_if_nojs {display: none !important;overflow: hidden !important;} .disabled_if_nojs {pointer-events: none; cursor: default; text-decoration: line-through;} </style> </noscript> </head> -<body> +<body class="{{ endpoint }}_endpoint" > {% include 'oscar/navbar.html' %} <div class="container"> @@ -85,22 +82,24 @@ {% endblock %} <p class="text-muted"> <small> - {{ _('Powered by') }} <a href="https://asciimoo.github.io/searx/">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/> - <a href="https://github.com/asciimoo/searx">{{ _('Source code') }}</a> | - <a href="https://github.com/asciimoo/searx/issues">{{ _('Issue tracker') }}</a> | - <a href="https://github.com/asciimoo/searx/wiki/Searx-instances">{{ _('Public instances') }}</a> + {{ _('Powered by') }} <a href="{{ brand.DOCS_URL }}">searx</a> - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}<br/> + <a href="{{ brand.GIT_URL }}">{{ _('Source code') }}</a> | + <a href="{{ brand.ISSUE_URL }}">{{ _('Issue tracker') }}</a> | + <a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a>{% if brand.CONTACT_URL %} | + <a href="{{ brand.CONTACT_URL }}">{{ _('Contact instance maintainer') }}</a>{% endif %} </small> </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> + data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}" + data-translations="{{ translations }}"></script> {% for script in scripts %} {{""}}<script src="{{ url_for('static', filename=script) }}"></script> {% endfor %} |