mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[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.
This commit is contained in:
parent
2a6d84dab5
commit
6f0ec7e58f
6 changed files with 17 additions and 28 deletions
5
searx/templates/simple/page_with_header.html
Normal file
5
searx/templates/simple/page_with_header.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% set body_class = "page_with_header" %}
|
||||
{% extends "simple/base.html" %}
|
||||
{% block header %}
|
||||
<a href="{{ url_for('index') }}"><img class="logo" src="{{ url_for('static', filename='img/searxng.png') }}" alt="SearXNG"></a>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue