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 %}
- {% if time or not servings == "" %}
{% if time %} -

{% 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 @@

Cookware

+ {% for section in sections %} + {% if section.title %} +

{{ section.title.content }}

+ {% endif %} +
    + {% for steps in section.content %} +
  1. + {% for items in steps %}{% if items.type == "ingredient" %}{% if items.reference %}{{items.content}}{% else %}{{items.content}}{% endif %} ({{items.quantity.value.value.value}}{% if items.quantity.unit %} {{items.quantity.unit}}{% endif %}){% else %}{{items.content}}{% endif %}{% endfor %} +
  2. + {% endfor %} +
+ {% endfor %} + {% set notesArr = notes.split('|') %} {% if notesArr.length > 1 %} +

Notes

{% endif %} - - - {% for step in steps %} -

- {% for stepDetail in step %}{{ stepDetail | safe }}{% endfor %} -

- {% endfor %} - + {% if source %}

Source

{% endif %}