summaryrefslogtreecommitdiff
path: root/searx/templates/simple/base.html
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2022-01-30 09:39:21 +0100
committerMartin Fischer <martin@push-f.com>2022-01-30 17:29:21 +0100
commit6f0ec7e58f9c7c9d188561296546ec139e1f9118 (patch)
tree86c03106e50bd690a6fe50657ddae1706e29ff21 /searx/templates/simple/base.html
parent2a6d84dab5fa22a98718afa7450c7a35b987e9c1 (diff)
[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/base.html')
-rw-r--r--searx/templates/simple/base.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html
index bb1f51cad..548710310 100644
--- a/searx/templates/simple/base.html
+++ b/searx/templates/simple/base.html
@@ -35,7 +35,7 @@
<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", "") }}">
+ <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>
@@ -47,6 +47,8 @@
</div>
{% endif %}
+ {% block header %}
+ {% endblock %}
{% block content %}
{% endblock %}
</main>