35 lines
997 B
HTML
35 lines
997 B
HTML
{%- assign tag = "h2" -%}
|
|
{%- if page.collection == "subrecipes" -%}
|
|
{%- assign tag = "h4" -%}
|
|
{%- endif -%}
|
|
<{{tag}}>Ingredients</{{tag}}>
|
|
<ul class='ingredients'>
|
|
{% for item in page.ingredients -%}
|
|
{%- assign tag = "li" -%}
|
|
{%- if item[3] -%}
|
|
{%- assign tag = tag | append: " class='optional'" -%}
|
|
{%- endif -%}
|
|
|
|
{%- assign input = item[0] -%}
|
|
{%- include fractionalise.html -%}
|
|
|
|
{%- assign amount = output | append: " " -%}
|
|
{%- assign end = "" -%}
|
|
{%- if item[0][0] -%}
|
|
{%- assign input = item[0][0] -%}
|
|
{%- include fractionalise.html -%}
|
|
{%- assign from = output -%}
|
|
|
|
{%- assign input = item[0][1] -%}
|
|
{%- include fractionalise.html -%}
|
|
{%- assign to = output -%}
|
|
|
|
{%- assign amount = from | append: " to " | append: to | append: " " -%}
|
|
{%- elsif item[0] == 0 -%}
|
|
{%- assign amount = "" -%}
|
|
{%- assign end = " to taste" -%}
|
|
{%- endif -%}
|
|
|
|
<{{ tag }}>{{ amount }} {%- if item[2] %}{{ item[2] }} of {% endif -%} {{ item[1] }}{{ end }}</li>
|
|
{% endfor %}
|
|
</ul>
|