From 6f0ec7e58f9c7c9d188561296546ec139e1f9118 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sun, 30 Jan 2022 09:39:21 +0100 Subject: [simple] introduce page_with_header.html template Previously the preferences & stats templates contained the markup:

SearXNG

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. --- searx/templates/simple/stats.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'searx/templates/simple/stats.html') 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 %} - -

SearXNG

- -

{% if selected_engine_name %}{% endif %}{{ _('Engine stats') }}{% if selected_engine_name %} - {{ selected_engine_name }}{% endif %}

+

{% if selected_engine_name %}{% endif %}{{ _('Engine stats') }}{% if selected_engine_name %} - {{ selected_engine_name }}{% endif %}

{% if not engine_stats.get('time') %} {{ _('There is currently no data available. ') }} -- cgit v1.2.3