recipe-site/_includes/ingredients.html
Lynne 65e22291ea
All checks were successful
continuous-integration/drone/push Build is passing
add support for 'to taste' specifier as recommended by peebus =u=
2020-03-01 18:49:48 +10:00

10 lines
503 B
HTML

{%- assign tag = "h2" -%}
{%- if page.collection == "subrecipes" -%}
{%- assign tag = "h4" -%}
{%- endif -%}
<{{tag}}>Ingredients</{{tag}}>
<ul class='ingredients'>
{% for item in page.ingredients -%}
<li class='{% if item[3] %}optional{% endif %}'>{% if item[0] != 0 %}{% if item[0][0] %}{{ item[0][0] }} to {{ item[0][1] }}{% else %}{{ item[0] }}{% endif %}{% endif %} {%- if item[2] %} {{ item[2] }} of {%- endif %} {{ item[1] }}{% if item[0] == 0 %} to taste{% endif %}</li>
{% endfor -%}
</ul>