1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-19 02:40:11 +01:00

[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
This commit is contained in:
Alexandre Flament 2022-01-25 20:12:11 +01:00
parent 81453a0eba
commit dfb9ca527d

View File

@ -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 }}">