diff --git a/src/_includes/layouts/recipe-cook.njk b/src/_includes/layouts/recipe-cook.njk index c6f3844..2231c3b 100644 --- a/src/_includes/layouts/recipe-cook.njk +++ b/src/_includes/layouts/recipe-cook.njk @@ -13,15 +13,29 @@ {% set ingredientsArray = [] %} {% for ingredient in ingredients %} - {% set value = [ingredient.quantity, ingredient.units, " ", ingredient.name] | join %} + {% set notes = "" %} + {% if ingredient.note %} + {% set notes = [" (", ingredient.note, ")"] | join %} + {% endif %} + {% set value = [ingredient.quantity.value.value.value, ingredient.quantity.unit, " ", ingredient.name, notes] | join %} {% set ingredientsArray = (ingredientsArray.push(value), ingredientsArray) %} {% endfor %}
{% include "icons/time.svg" %}{{ time }}
+ {% if time.prep %} +{% include "icons/time.svg" %}Prep: {{ time.prep }}
+ {% endif %} + {% if time.cook %} +{% include "icons/time.svg" %}Cook: {{ time.cook }}
+ {% endif %} + {% if not time.cook and not time.prep %} +{% include "icons/time.svg" %}Total: {{ time }}
+ {% endif %} + {% endif %} + {% if duration %} +{% include "icons/time.svg" %}Total: {{ duration }}
{% endif %} {% if not servings == "" %}@@ -62,38 +76,39 @@
- {% for stepDetail in step %}{{ stepDetail | safe }}{% endfor %} -
- {% endfor %} - + {% if source %} {% endif %}