summaryrefslogtreecommitdiff
path: root/searx/templates/simple/macros.html
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2022-01-25 20:12:11 +0100
committerAlexandre Flament <alex@al-f.net>2022-01-25 22:03:21 +0100
commitdfb9ca527ddc7a0f85f158f056d3464d92509a4b (patch)
treebae0e0b27aecf37ea24a487447f6dacdc0f50c5d /searx/templates/simple/macros.html
parent81453a0ebab2b4b041828efc3653576f909d2768 (diff)
downloadsearxng-dfb9ca527ddc7a0f85f158f056d3464d92509a4b.tar.gz
searxng-dfb9ca527ddc7a0f85f158f056d3464d92509a4b.zip
[fix] simple theme: don't crash when the checker is enabled
The macro "checkbox" in macros.html uses the macro "icon_small" from icons.html The commit imports icon_small in macros.html to fix the issue. It works because the macros in macros.html are imported with the Jinja2 context. See https://jinja.palletsprojects.com/en/3.0.x/templates/#import-visibility close #819
Diffstat (limited to 'searx/templates/simple/macros.html')
-rw-r--r--searx/templates/simple/macros.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html
index c1c421ab1..6c64c23ea 100644
--- a/searx/templates/simple/macros.html
+++ b/searx/templates/simple/macros.html
@@ -1,3 +1,5 @@
+{% from 'simple/icons.html' import icon_small %}
+
<!-- Draw favicon -->
{% macro draw_favicon(favicon) -%}
<img width="14" height="14" class="favicon" src="{{ url_for('static', filename='themes/simple/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}">