Don't show Ingredients/Steps h3 when there are none

This commit is contained in:
Emi Vasilek 2023-11-06 23:32:24 +01:00
parent 347231f013
commit dcb566275c

View file

@ -17,14 +17,18 @@
{{getrecipe(subrecipe)}}
{% endfor %}
<h1>{{rec.title}}</h1>
{% if rec.ingredients|length != 0 %}
<h3>Ingredients</h3>
{% for ing in rec.ingredients %}
<li>{{ingredient(ing)}}</li>
{% endfor %}
{% endif %}
{% if rec.steps|length != 0 %}
<h3>Steps</h3>
{% for step in rec.steps %}
<li>{{ step }}</li>
{% endfor %}
{% endif %}
<hr>
{%- endmacro %}