diff options
author | Alexandre Flament <alex@al-f.net> | 2022-01-25 20:12:11 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2022-01-25 22:03:21 +0100 |
commit | dfb9ca527ddc7a0f85f158f056d3464d92509a4b (patch) | |
tree | bae0e0b27aecf37ea24a487447f6dacdc0f50c5d /searx/templates/simple/macros.html | |
parent | 81453a0ebab2b4b041828efc3653576f909d2768 (diff) | |
download | searxng-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.html | 2 |
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 }}"> |