mirror of
https://github.com/searxng/searxng.git
synced 2024-11-23 04:27:46 +01:00
6f0ec7e58f
Previously the preferences & stats templates contained the markup: <a href="{{ url_for('index') }}"><h1><span>SearXNG</span></h1></a> There are many things wrong with this: 1. the markup was duplicated 2. the CSS needed to be changed whenever a new page wanted to use this header (since the CSS used page-specific selectors) 3. h1 should be reserved for the actual page title (e.g. Preferences or Engine stats) 4. the image was set via CSS which also set: span { visibility: hidden; } which however removes the alternative text from the accessibility tree (meaning screen readers will ignore it). This commit fixes all these problems.
70 lines
3.5 KiB
HTML
70 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
||
<html class="no-js theme-{{ preferences.get_value('simple_style') or 'auto' }}" lang="{{ locale_rfc5646 }}" {% if rtl %} dir="rtl"{% endif %}>
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="description" content="SearXNG — a privacy-respecting, hackable metasearch engine">
|
||
<meta name="keywords" content="SearXNG, search, search engine, metasearch, meta search">
|
||
<meta name="generator" content="searxng/{{ searx_version }}">
|
||
<meta name="referrer" content="no-referrer">
|
||
<meta name="robots" content="noarchive">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta name="HandheldFriendly" content="True">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||
<title>{% block title %}{% endblock %}{{ instance_name }}</title>
|
||
{% block meta %}{% endblock %}
|
||
{% if rtl %}
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng-rtl.min.css') }}" type="text/css" media="screen" />
|
||
{% else %}
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='css/searxng.min.css') }}" type="text/css" media="screen" />
|
||
{% endif %}
|
||
{% block styles %}{% endblock %}
|
||
<!--[if gte IE 9]>-->
|
||
<script src="{{ url_for('static', filename='js/searxng.head.min.js') }}"
|
||
data-method="{{ method or 'POST' }}"
|
||
data-autocompleter="{% if autocomplete %}true{% else %}false{% endif %}"
|
||
data-search-on-category-select="{{ 'true' if 'plugins/js/search_on_category_select.js' in scripts else 'false'}}"
|
||
data-infinite-scroll="{{ 'true' if 'plugins/js/infinite_scroll.js' in scripts else 'false' }}"
|
||
data-hotkeys="{{ 'true' if 'plugins/js/vim_hotkeys.js' in scripts else 'false' }}"
|
||
data-static-path="{{ url_for('static', filename='themes/simple') }}/"
|
||
data-translations="{{ translations }}"></script>
|
||
<!--<![endif]-->
|
||
{% block head %}
|
||
<link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ opensearch_url }}"/>
|
||
{% endblock %}
|
||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}" sizes="any">
|
||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.svg') }}" type="image/svg+xml">
|
||
</head>
|
||
<body class="{{ endpoint }}_endpoint" >
|
||
<main id="main_{{ self._TemplateReference__context.name|replace("simple/", "")|replace(".html", "") }}" class="{{body_class}}">
|
||
{% if errors %}
|
||
<div class="dialog-error" role="alert">
|
||
<a href="#" class="close" aria-label="close" title="close">×</a>
|
||
<ul>
|
||
{% for message in errors %}
|
||
<li>{{ message }}</li>
|
||
{% endfor %}
|
||
</ul>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% block header %}
|
||
{% endblock %}
|
||
{% block content %}
|
||
{% endblock %}
|
||
</main>
|
||
<footer>
|
||
<p>
|
||
{{ _('Powered by') }} <a href="{{ url_for('about') }}">searxng</a> - {{ searx_version }} — {{ _('a privacy-respecting, hackable metasearch engine') }}<br/>
|
||
<a href="{{ searx_git_url }}">{{ _('Source code') }}</a> |
|
||
<a href="{{ get_setting('brand.issue_url') }}">{{ _('Issue tracker') }}</a> |
|
||
<a href="{{ url_for('stats') }}">{{ _('Engine stats') }}</a> |
|
||
<a href="{{ get_setting('brand.public_instances') }}">{{ _('Public instances') }}</a>{% if get_setting('general.contact_url') %} |
|
||
<a href="{{ get_setting('general.contact_url') }}">{{ _('Contact instance maintainer') }}</a>{% endif %}
|
||
</p>
|
||
</footer>
|
||
<!--[if gte IE 9]>-->
|
||
<script src="{{ url_for('static', filename='js/searxng.min.js') }}"></script>
|
||
<!--<![endif]-->
|
||
</body>
|
||
</html>
|