Add macros

This commit is contained in:
Xavier Bustamante Talavera 2018-10-03 15:30:34 +02:00
parent 77c96c5956
commit 3bd4168174
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
{% macro component_type(components, type) %}
<ul class="list-unstyled">
{% for c in components if c.t == type %}
<li>
<strong>{{ c.__format__('t') }}</strong>
<p>
<small>{{ c.__format__('s') }}</small>
</p>
</li>
{% endfor %}
</ul>
{% endmacro %}
{% macro rate(range) %}
<span class="label label-primary">
{{ range }}
</span>
{% endmacro %}