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/page_with_header.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 searx/templates/simple/page_with_header.html (limited to 'searx/templates/simple/page_with_header.html') diff --git a/searx/templates/simple/page_with_header.html b/searx/templates/simple/page_with_header.html new file mode 100644 index 000000000..d4466b612 --- /dev/null +++ b/searx/templates/simple/page_with_header.html @@ -0,0 +1,5 @@ +{% set body_class = "page_with_header" %} +{% extends "simple/base.html" %} +{% block header %} + +{% endblock %} -- cgit v1.2.3