From ed477b8f1b383eeaf33dfb9061850198447a4c9c Mon Sep 17 00:00:00 2001 From: Tom Whitwell Date: Tue, 15 Jan 2019 14:38:42 +0000 Subject: [PATCH 1/2] imo .scss files should not be executable --- css/main.scss | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 css/main.scss diff --git a/css/main.scss b/css/main.scss old mode 100755 new mode 100644 From 07a87a043ebf08c2cf38f87ff0ff67cf6e3a9a33 Mon Sep 17 00:00:00 2001 From: Tom Whitwell Date: Tue, 15 Jan 2019 14:36:27 +0000 Subject: [PATCH 2/2] Add Nested direction / ingredient groups These are pretty useful - they allow sections to make the recipe easier to follow. eg: ```yaml ingredients: - Meatballs: - 600 g minced pork - 1 onion grated - 1 medium free-range eggs lightly beaten - 50 g fresh white breadcrumbs - 1 long red chilli deseeded and finely chopped - 2 tsp root ginger freshly grated - 1 tsp garam masala - 2 tbsp fresh coriander freshly chopped - 1 tbsp oil - Curry Sauce: - 3 tbsp massaman curry paste - 2 tsp root ginger freshly grated - 4 tomatoes roughly chopped - 200 ml coconut milk - 200 ml chicken stock - 1 tbsp lemon juice - 2 tsp brown sugar - chopped cashew nuts to garnish - fresh coriander to garnish ``` --- _layouts/recipe.html | 80 ++++++++++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/_layouts/recipe.html b/_layouts/recipe.html index 15822c5d9..dba8485a7 100644 --- a/_layouts/recipe.html +++ b/_layouts/recipe.html @@ -2,7 +2,7 @@ layout: default ---
- + {% for image in page.image %}
@@ -27,10 +27,10 @@

{{ page.title }}

{{page.content}}
- +
- +
{% if page.components %} @@ -48,38 +48,56 @@

Ingredients

    {% for ingredient in page.ingredients %} -
  • {{ ingredient | markdownify }}
  • + {% if ingredient.first %} +

    {{ ingredient.first[0] }}

    +
      + {% for i in ingredient.first[1] %} +
    • {{ i | markdownify }}
    • + {% endfor %} +
    + {% else %} +
  • {{ ingredient | markdownify }}
  • + {% endif %} {% endfor %}
{% endif %}
- +

Directions

    {% for direction in page.directions %} -
  • {{ direction | markdownify }}
  • + {% if direction.first %} +

    {{ direction.first[0] }}

    +
      + {% for d in direction.first[1] %} +
    • {{ d | markdownify }}
    • + {% endfor %} +
    + {% else %} +
  • {{ direction | markdownify }}
  • + {% endif %} {% endfor %}
- +
{% if page.components %} - +
↓ This is a component-based recipe (fancy talk for making the dish in pieces, then assembling). ↓
- +
{% for component in page.components %}
{% for recipe in site.components %} {% if recipe.title == component %}

{{recipe.title}}

- + {% for image in recipe.image %}
@@ -92,30 +110,48 @@

{{recipe.title}}

{% endfor %} {% endif %} {% endfor %} - +

Ingredients

    - {% for item in recipe.ingredients %} -
  • {{ item | markdownify }}
  • - {% endfor %} + {% for ingredient in recipe.ingredients %} + {% if ingredient.first %} +

    {{ ingredient.first[0] }}

    +
      + {% for i in ingredient.first[1] %} +
    • {{ i | markdownify }}
    • + {% endfor %} +
    + {% else %} +
  • {{ ingredient | markdownify }}
  • + {% endif %} + {% endfor %}
- +

Steps

    - {% for item in recipe.directions %} -
  • {{ item | markdownify }}
  • + {% for direction in recipe.directions %} + {% if direction.first %} +

    {{ direction.first[0] }}

    +
      + {% for d in direction.first[1] %} +
    • {{ d | markdownify }}
    • + {% endfor %} +
    + {% else %} +
  • {{ direction | markdownify }}
  • + {% endif %} {% endfor %}
- + {% endif %} {% endfor %}
{% endfor %}
- + {% endif %} - + {% for category in page.categories %}

Category: {{ category }}

{% endfor %} @@ -148,5 +184,5 @@

Steps

}); }); - - \ No newline at end of file + +