diff options
author | Martin Fischer <martin@push-f.com> | 2022-01-30 09:39:21 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-01-30 17:29:21 +0100 |
commit | 6f0ec7e58f9c7c9d188561296546ec139e1f9118 (patch) | |
tree | 86c03106e50bd690a6fe50657ddae1706e29ff21 /searx/templates/simple/stats.html | |
parent | 2a6d84dab5fa22a98718afa7450c7a35b987e9c1 (diff) | |
download | searxng-6f0ec7e58f9c7c9d188561296546ec139e1f9118.tar.gz searxng-6f0ec7e58f9c7c9d188561296546ec139e1f9118.zip |
[simple] introduce page_with_header.html template
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.
Diffstat (limited to 'searx/templates/simple/stats.html')
-rw-r--r-- | searx/templates/simple/stats.html | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/searx/templates/simple/stats.html b/searx/templates/simple/stats.html index 1e905790a..f45f5b260 100644 --- a/searx/templates/simple/stats.html +++ b/searx/templates/simple/stats.html @@ -1,7 +1,7 @@ {% from 'simple/icons.html' import icon_big %} {% from '__common__/new_issue.html' import new_issue with context %} -{% extends "simple/base.html" %} +{% extends "simple/page_with_header.html" %} {%- macro th_sort(column_order, column_name) -%} {% if selected_engine_name %} @@ -15,10 +15,7 @@ {% block head %} {% endblock %} {% block content %} - -<a href="{{ url_for('index') }}"><h1><span>SearXNG</span></h1></a> - -<h2>{% if selected_engine_name %}<a href="{{ url_for('stats') }}">{% endif %}{{ _('Engine stats') }}{% if selected_engine_name %}</a> - {{ selected_engine_name }}{% endif %}</h2> +<h1>{% if selected_engine_name %}<a href="{{ url_for('stats') }}">{% endif %}{{ _('Engine stats') }}{% if selected_engine_name %}</a> - {{ selected_engine_name }}{% endif %}</h1> {% if not engine_stats.get('time') %} {{ _('There is currently no data available. ') }} |