[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 --> <!-- Draw favicon -->
{% macro draw_favicon(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 }}"> <img width="14" height="14" class="favicon" src="{{ url_for('static', filename='themes/simple/img/icons/' + favicon + '.png') }}" alt="{{ favicon }}">