Browse Source

[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
Alexandre Flament 3 years ago
parent
commit
dfb9ca527d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      searx/templates/simple/macros.html

+ 2 - 0
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 }}">