From 217a709714cb55e515fc1e4d4974ade24ede3ea8 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Fri, 14 Feb 2020 15:23:28 +0000 Subject: [PATCH 01/15] Add various tagging meta data vocabularies according to Schema.org/Recipe adds them to search --- _data/diets.yml | 34 +++++++++++++++++++ _includes/category.html | 12 +++++++ _includes/cuisine.html | 10 ++++++ _includes/diet.html | 13 +++++++ _includes/nutritional-information.html | 6 ++-- _includes/tag.html | 10 ++++++ _layouts/recipe.html | 47 +++++++++++++++----------- css/main.scss | 5 +++ search.json | 8 +++-- 9 files changed, 120 insertions(+), 25 deletions(-) create mode 100644 _data/diets.yml create mode 100644 _includes/category.html create mode 100644 _includes/cuisine.html create mode 100644 _includes/diet.html create mode 100644 _includes/tag.html diff --git a/_data/diets.yml b/_data/diets.yml new file mode 100644 index 000000000..2deb96f62 --- /dev/null +++ b/_data/diets.yml @@ -0,0 +1,34 @@ +# See https://schema.org/RestrictedDiet#enumbers +DiabeticDiet: + name: diabetic + description: A diet appropriate for people with diabetes. +GlutenFreeDiet: + name: gluten free + description: A diet exclusive of gluten. +HalalDiet: + name: halal + description: A diet conforming to Islamic dietary practices. +HinduDiet: + name: hindu + description: A diet conforming to Hindu dietary practices, in particular, beef-free. +KosherDiet: + name: kosher + description: A diet conforming to Jewish dietary practices. +LowCalorieDiet: + name: low-calorie + description: A diet focused on reduced calorie intake. +LowFatDiet: + name: low-fat + description: A diet focused on reduced fat and cholesterol intake. +LowLactoseDiet: + name: low-lactose + description: A diet appropriate for people with lactose intolerance. +LowSaltDiet: + name: low-salt + description: A diet focused on reduced sodium intake. +VeganDiet: + name: vegan + description: A diet exclusive of all animal products. +VegetarianDiet: + name: vegetarian + description: A diet exclusive of animal meat. diff --git a/_includes/category.html b/_includes/category.html new file mode 100644 index 000000000..7e9c57a5a --- /dev/null +++ b/_includes/category.html @@ -0,0 +1,12 @@ +{% if page.categories %} +{% for cat in page.categories %} + + + + + + + {{ cat }} + +{% endfor %} +{% endif %} diff --git a/_includes/cuisine.html b/_includes/cuisine.html new file mode 100644 index 000000000..1a91fa9ea --- /dev/null +++ b/_includes/cuisine.html @@ -0,0 +1,10 @@ +{% if page.cuisines %} +{% for cuisine in page.cuisines %} + + + + + {{ cuisine }} + +{% endfor %} +{% endif %} diff --git a/_includes/diet.html b/_includes/diet.html new file mode 100644 index 000000000..f0dea2e63 --- /dev/null +++ b/_includes/diet.html @@ -0,0 +1,13 @@ +{% if page.diets %} +{% for diet in page.diets %} +{% assign itemprop = diet | append:"Diet" %} +{% assign name = site.data.diets[itemprop].name %} + + + + + + {{ name }} + +{% endfor %} +{% endif %} diff --git a/_includes/nutritional-information.html b/_includes/nutritional-information.html index 12d1288dd..61b9a99f4 100644 --- a/_includes/nutritional-information.html +++ b/_includes/nutritional-information.html @@ -6,14 +6,14 @@

Nutritional Information {% endif %}

{% assign nutrients = page.nutrition %} -{% for nutrient in nutrients %} +{% for nutrient in nutrients %} {% if nutrient.first == 'servingSize' %}{% continue %}{% endif %} {% assign itemprop = nutrient.first %} {% assign name = site.data.nutrients[itemprop].name %} {% assign value = nutrient.last %} {% assign unit = site.data.nutrients[itemprop].unit %} -
-
{{ name }}
+
+
{{ name }}

{{ value }}{{ unit }}

{% endfor %} diff --git a/_includes/tag.html b/_includes/tag.html new file mode 100644 index 000000000..a8c738b77 --- /dev/null +++ b/_includes/tag.html @@ -0,0 +1,10 @@ +{% if page.tags %} +{% for tag in page.tags %} + + + + + {{ tag }} + +{% endfor %} +{% endif %} diff --git a/_layouts/recipe.html b/_layouts/recipe.html index f834bab09..c6e84209a 100644 --- a/_layouts/recipe.html +++ b/_layouts/recipe.html @@ -2,7 +2,7 @@ layout: default ---
- + {% for image in page.image %}
@@ -27,10 +27,24 @@

{{ page.title }}

{{page.content}}
- + +
+
+ {% include nutritional-information.html %} +
+
+
+ {% include cuisine.html %} + {% include category.html %} + {% include diet.html %} + {% include tag.html %} +
+
+
+
- +
{% if page.components %} @@ -53,9 +67,8 @@

Ingredients

{% endif %} - {% include nutritional-information.html %}
- +

Directions

    @@ -64,24 +77,24 @@

    Directions

    {% 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 %}
@@ -94,33 +107,29 @@

{{recipe.title}}

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

Ingredients

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

Steps

    {% for item in recipe.directions %}
  • {{ item | markdownify }}
  • {% endfor %}
- + {% endif %} {% endfor %}
{% endfor %}
- + {% endif %} - - {% for category in page.categories %} -

Category: {{ category }}

- {% endfor %} @@ -150,5 +159,5 @@

Steps

}); }); - - \ No newline at end of file + + diff --git a/css/main.scss b/css/main.scss index e97d08707..ccc6407e0 100755 --- a/css/main.scss +++ b/css/main.scss @@ -65,3 +65,8 @@ div[itemprop="nutrition"] { } } + +.border-1 { border-width: 1px; } +.border-1:active { border-width: 1px; } +.capitalize { text-transform: capitalize; } +.nowrap { white-space: nowrap; } diff --git a/search.json b/search.json index ac5b589af..e68a5e4ca 100644 --- a/search.json +++ b/search.json @@ -3,14 +3,16 @@ [ {% for post in site.recipes %} { - + "title" : "{{ post.title | escape }}", {% if post.ingredients %}"ingredients" : "{% for ingredient in post.ingredients %}{{ ingredient | escape }}, {% endfor %}",{% endif %} {% if post.tags %}"tags" : "{% for tag in post.tags %}{{ tag | escape }} {% endfor %}",{% endif %} + {% if post.cuisines %}"cuisines" : "{% for cuisines in post.cuisines %}{{ cuisine | escape }} {% endfor %}",{% endif %} + {% if post.diets %}"diets" : "{% for diet in post.diets %}{{ diet | escape }} {% endfor %}",{% endif %} + {% if post.categories %}"categories" : "{% for cat in post.categories %}{{ cat | escape }} {% endfor %}",{% endif %} "image" : "{{ site.baseurl }}/images/{{ post.image }}", "url" : "{{ site.baseurl }}{{ post.url }}" - + } {% unless forloop.last %},{% endunless %} {% endfor %} ] - From ebecf9e09099b313dc63f3bf1bf8d12819a3e046 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Mon, 24 Feb 2020 10:29:39 +0000 Subject: [PATCH 02/15] restyle use basscss utility classes and try to match the nutrition --- _includes/category.html | 4 ++-- _includes/cuisine.html | 4 ++-- _includes/diet.html | 4 ++-- _includes/tag.html | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_includes/category.html b/_includes/category.html index 7e9c57a5a..15865a32b 100644 --- a/_includes/category.html +++ b/_includes/category.html @@ -1,7 +1,7 @@ {% if page.categories %} {% for cat in page.categories %} - - + + diff --git a/_includes/cuisine.html b/_includes/cuisine.html index 1a91fa9ea..d43afcb45 100644 --- a/_includes/cuisine.html +++ b/_includes/cuisine.html @@ -1,7 +1,7 @@ {% if page.cuisines %} {% for cuisine in page.cuisines %} - - + + {{ cuisine }} diff --git a/_includes/diet.html b/_includes/diet.html index f0dea2e63..7b1fd57d8 100644 --- a/_includes/diet.html +++ b/_includes/diet.html @@ -2,8 +2,8 @@ {% for diet in page.diets %} {% assign itemprop = diet | append:"Diet" %} {% assign name = site.data.diets[itemprop].name %} - - + + diff --git a/_includes/tag.html b/_includes/tag.html index a8c738b77..7e7dafc94 100644 --- a/_includes/tag.html +++ b/_includes/tag.html @@ -1,7 +1,7 @@ {% if page.tags %} {% for tag in page.tags %} - - + + {{ tag }} From 8faab0a8ee94d3458db2d1503c2a8da81860fe1d Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Mon, 24 Feb 2020 10:29:39 +0000 Subject: [PATCH 03/15] restyle use basscss utility classes and try to match the nutrition --- _includes/category.html | 4 ++-- _includes/cuisine.html | 4 ++-- _includes/diet.html | 4 ++-- _includes/nutritional-information.html | 2 +- _includes/tag.html | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/_includes/category.html b/_includes/category.html index 7e9c57a5a..15865a32b 100644 --- a/_includes/category.html +++ b/_includes/category.html @@ -1,7 +1,7 @@ {% if page.categories %} {% for cat in page.categories %} - - + + diff --git a/_includes/cuisine.html b/_includes/cuisine.html index 1a91fa9ea..d43afcb45 100644 --- a/_includes/cuisine.html +++ b/_includes/cuisine.html @@ -1,7 +1,7 @@ {% if page.cuisines %} {% for cuisine in page.cuisines %} - - + + {{ cuisine }} diff --git a/_includes/diet.html b/_includes/diet.html index f0dea2e63..7b1fd57d8 100644 --- a/_includes/diet.html +++ b/_includes/diet.html @@ -2,8 +2,8 @@ {% for diet in page.diets %} {% assign itemprop = diet | append:"Diet" %} {% assign name = site.data.diets[itemprop].name %} - - + + diff --git a/_includes/nutritional-information.html b/_includes/nutritional-information.html index 61b9a99f4..1c3cbc566 100644 --- a/_includes/nutritional-information.html +++ b/_includes/nutritional-information.html @@ -13,7 +13,7 @@

Nutritional Information {% assign value = nutrient.last %} {% assign unit = site.data.nutrients[itemprop].unit %}
-
{{ name }}
+
{{ name }}

{{ value }}{{ unit }}

{% endfor %} diff --git a/_includes/tag.html b/_includes/tag.html index a8c738b77..7e7dafc94 100644 --- a/_includes/tag.html +++ b/_includes/tag.html @@ -1,7 +1,7 @@ {% if page.tags %} {% for tag in page.tags %} - - + + {{ tag }} From 167f762233f85b2292f3d31d77dc1dea3f2423a1 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Mon, 24 Feb 2020 11:37:35 +0000 Subject: [PATCH 04/15] update microdata --- _includes/tag.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/_includes/tag.html b/_includes/tag.html index 7e7dafc94..69dc908c9 100644 --- a/_includes/tag.html +++ b/_includes/tag.html @@ -1,10 +1,12 @@ {% if page.tags %} + {% for tag in page.tags %} - - - - - {{ tag }} - +
+ + + + +
{% endfor %} +
{% endif %} From 8821070133d1c01ff4f5f252ef1913c4ddec7183 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Wed, 22 Apr 2020 08:55:38 +0100 Subject: [PATCH 05/15] Refactor meta buttons Include links to relevant index pages --- _includes/category.html | 8 ++++---- _includes/cuisine.html | 6 +++--- _includes/diet.html | 8 ++++---- _includes/tag.html | 6 +++--- _layouts/recipe.html | 8 ++++---- categories.html | 32 ++++++++++++++++++++++++++++++++ cuisines.html | 32 ++++++++++++++++++++++++++++++++ diets.html | 34 ++++++++++++++++++++++++++++++++++ tags.html | 32 ++++++++++++++++++++++++++++++++ 9 files changed, 148 insertions(+), 18 deletions(-) create mode 100644 categories.html create mode 100644 cuisines.html create mode 100644 diets.html create mode 100644 tags.html diff --git a/_includes/category.html b/_includes/category.html index 15865a32b..a688760c1 100644 --- a/_includes/category.html +++ b/_includes/category.html @@ -1,12 +1,12 @@ -{% if page.categories %} -{% for cat in page.categories %} +{% for cat in include.categories %} +{% unless cat == empty %} - {{ cat }} + +{% endunless %} {% endfor %} -{% endif %} diff --git a/_includes/cuisine.html b/_includes/cuisine.html index d43afcb45..6c61f5e7a 100644 --- a/_includes/cuisine.html +++ b/_includes/cuisine.html @@ -1,10 +1,10 @@ -{% if page.cuisines %} -{% for cuisine in page.cuisines %} +{% if include.cuisines %} +{% for cuisine in include.cuisines %} - {{ cuisine }} + {% endfor %} {% endif %} diff --git a/_includes/diet.html b/_includes/diet.html index 7b1fd57d8..851a1807d 100644 --- a/_includes/diet.html +++ b/_includes/diet.html @@ -1,5 +1,5 @@ -{% if page.diets %} -{% for diet in page.diets %} +{% for diet in include.diets %} +{% unless diet == empty %} {% assign itemprop = diet | append:"Diet" %} {% assign name = site.data.diets[itemprop].name %} @@ -7,7 +7,7 @@ - {{ name }} + +{% endunless %} {% endfor %} -{% endif %} diff --git a/_includes/tag.html b/_includes/tag.html index 69dc908c9..aad9f9197 100644 --- a/_includes/tag.html +++ b/_includes/tag.html @@ -1,11 +1,11 @@ -{% if page.tags %} +{% if include.tags %} -{% for tag in page.tags %} +{% for tag in include.tags %}
- +
{% endfor %}
diff --git a/_layouts/recipe.html b/_layouts/recipe.html index ae0d7575a..2c2145a5b 100644 --- a/_layouts/recipe.html +++ b/_layouts/recipe.html @@ -34,10 +34,10 @@

{{ page.title }}

- {% include cuisine.html %} - {% include category.html %} - {% include diet.html %} - {% include tag.html %} + {% include cuisine.html cuisines=page.cuisines %} + {% include category.html categories=page.categories %} + {% include diet.html diets=page.diets %} + {% include tag.html tags=page.tags %}
diff --git a/categories.html b/categories.html new file mode 100644 index 000000000..e3cf8508c --- /dev/null +++ b/categories.html @@ -0,0 +1,32 @@ +--- +layout: default +--- + +{% assign allTags = "" %} +{% for recipe in site.recipes %} +{% if recipe.categories %} +{% assign thisTags = recipe.categories | join:'|' | append:'|' %} +{% assign allTags = allTags | append:thisTags %} +{% endif %} +{% endfor %} +{% assign allTags = allTags | split:'|' | sort | uniq %} + +
+

Categories

+ {% include category.html categories=allTags %} + +
+ {% for category in allTags %} + {% unless category == "" %} +
+

{{ category | capitalize }}

+
    + {% for recipe in site.recipes %} + {% if recipe.categories contains category %}
  • {{ recipe.title }}
  • {% endif %} + {% endfor %} +
+
+ {% endunless %} + {% endfor %} +
+
diff --git a/cuisines.html b/cuisines.html new file mode 100644 index 000000000..05665f691 --- /dev/null +++ b/cuisines.html @@ -0,0 +1,32 @@ +--- +layout: default +--- + +{% assign allTags = "" %} +{% for recipe in site.recipes %} +{% if recipe.cuisines %} +{% assign thisTags = recipe.cuisines | join:'|' | append:'|' %} +{% assign allTags = allTags | append:thisTags %} +{% endif %} +{% endfor %} +{% assign allTags = allTags | split:'|' | sort | uniq %} + +
+

Cuisines

+ {% include cuisine.html cuisines=allTags %} + +
+ {% for cuisine in allTags %} + {% unless cuisine == "" %} +
+

{{ cuisine }}

+
    + {% for recipe in site.recipes %} + {% if recipe.cuisines contains cuisine %}
  • {{ recipe.title }}
  • {% endif %} + {% endfor %} +
+
+ {% endunless %} + {% endfor %} +
+
diff --git a/diets.html b/diets.html new file mode 100644 index 000000000..122a57302 --- /dev/null +++ b/diets.html @@ -0,0 +1,34 @@ +--- +layout: default +--- + +{% assign allTags = "" %} +{% for recipe in site.recipes %} +{% if recipe.diets %} +{% assign thisTags = recipe.diets | join:'|' | append:'|' %} +{% assign allTags = allTags | append:thisTags %} +{% endif %} +{% endfor %} +{% assign allTags = allTags | split:'|' | sort | uniq %} + +
+

Diets

+ {% include diet.html diets=allTags %} + +
+ {% for diet in allTags %} + {% unless diet == blank %} +
+ {% assign dietKey = diet | append:"Diet" %} +

{{ diet }} +

+
    + {% for recipe in site.recipes %} + {% if recipe.diets contains diet %}
  • {{ recipe.title }}
  • {% endif %} + {% endfor %} +
+
+ {% endunless %} + {% endfor %} +
+
diff --git a/tags.html b/tags.html new file mode 100644 index 000000000..d55279a8f --- /dev/null +++ b/tags.html @@ -0,0 +1,32 @@ +--- +layout: default +--- + +{% assign allTags = "" %} +{% for recipe in site.recipes %} +{% if recipe.tags %} +{% assign thisTags = recipe.tags | join:'|' | append:'|' %} +{% assign allTags = allTags | append:thisTags %} +{% endif %} +{% endfor %} +{% assign allTags = allTags | split:'|' | sort | uniq %} + +
+

Tags

+ {% include tag.html tags=allTags %} + +
+ {% for tag in allTags %} + {% unless tag == "" %} +
+

{{ tag | capitalize }}

+
    + {% for recipe in site.recipes %} + {% if recipe.tags contains tag %}
  • {{ recipe.title }}
  • {% endif %} + {% endfor %} +
+
+ {% endunless %} + {% endfor %} +
+
From a0d58915026607745e7fcb1f3fe4d48f1334f996 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Wed, 22 Apr 2020 09:10:33 +0100 Subject: [PATCH 06/15] enforce case consistency --- _includes/category.html | 2 +- _includes/cuisine.html | 2 +- _includes/diet.html | 2 +- _includes/tag.html | 2 +- categories.html | 2 +- cuisines.html | 2 +- diets.html | 2 +- tags.html | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_includes/category.html b/_includes/category.html index a688760c1..8864425cc 100644 --- a/_includes/category.html +++ b/_includes/category.html @@ -6,7 +6,7 @@ - + {% endunless %} {% endfor %} diff --git a/_includes/cuisine.html b/_includes/cuisine.html index 6c61f5e7a..54f7f262d 100644 --- a/_includes/cuisine.html +++ b/_includes/cuisine.html @@ -4,7 +4,7 @@ - + {% endfor %} {% endif %} diff --git a/_includes/diet.html b/_includes/diet.html index 851a1807d..c05786410 100644 --- a/_includes/diet.html +++ b/_includes/diet.html @@ -7,7 +7,7 @@ - + {% endunless %} {% endfor %} diff --git a/_includes/tag.html b/_includes/tag.html index aad9f9197..f57704e41 100644 --- a/_includes/tag.html +++ b/_includes/tag.html @@ -5,7 +5,7 @@ - +
{% endfor %} diff --git a/categories.html b/categories.html index e3cf8508c..89bd3746f 100644 --- a/categories.html +++ b/categories.html @@ -19,7 +19,7 @@

Categories

{% for category in allTags %} {% unless category == "" %}
-

{{ category | capitalize }}

+

{{ category | capitalize }}

    {% for recipe in site.recipes %} {% if recipe.categories contains category %}
  • {{ recipe.title }}
  • {% endif %} diff --git a/cuisines.html b/cuisines.html index 05665f691..3a45d46c0 100644 --- a/cuisines.html +++ b/cuisines.html @@ -19,7 +19,7 @@

    Cuisines

    {% for cuisine in allTags %} {% unless cuisine == "" %}
    -

    {{ cuisine }}

    +

    {{ cuisine | capitalize }}

      {% for recipe in site.recipes %} {% if recipe.cuisines contains cuisine %}
    • {{ recipe.title }}
    • {% endif %} diff --git a/diets.html b/diets.html index 122a57302..f3eae1cb2 100644 --- a/diets.html +++ b/diets.html @@ -20,7 +20,7 @@

      Diets

      {% unless diet == blank %}
      {% assign dietKey = diet | append:"Diet" %} -

      {{ diet }} +

      {{ diet | capitalize }}

        {% for recipe in site.recipes %} diff --git a/tags.html b/tags.html index d55279a8f..57545807b 100644 --- a/tags.html +++ b/tags.html @@ -19,7 +19,7 @@

        Tags

        {% for tag in allTags %} {% unless tag == "" %}
        -

        {{ tag | capitalize }}

        +

        {{ tag | capitalize }}

          {% for recipe in site.recipes %} {% if recipe.tags contains tag %}
        • {{ recipe.title }}
        • {% endif %} From d7dd186442caa43d7177b764a868ce2c276fa157 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Wed, 22 Apr 2020 14:42:22 +0100 Subject: [PATCH 07/15] add tag navigation for browsing recipes improve top links remove unnecessary logic --- _includes/nutritional-information.html | 2 +- _includes/tag-navigation.html | 9 +++++++++ categories.html | 6 +++--- cuisines.html | 6 +++--- diets.html | 6 +++--- tags.html | 6 +++--- 6 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 _includes/tag-navigation.html diff --git a/_includes/nutritional-information.html b/_includes/nutritional-information.html index 20370a806..ff5d4e12c 100644 --- a/_includes/nutritional-information.html +++ b/_includes/nutritional-information.html @@ -12,7 +12,7 @@

          Nutritional Information {% assign name = site.data.nutrients[itemprop].name %} {% assign value = nutrient.last %} {% assign unit = site.data.nutrients[itemprop].unit %} -
          +
          {{ name }}

          {{ value }}{{ unit }}

          diff --git a/_includes/tag-navigation.html b/_includes/tag-navigation.html new file mode 100644 index 000000000..16584bb5a --- /dev/null +++ b/_includes/tag-navigation.html @@ -0,0 +1,9 @@ +{% assign current = page.url | split:'.' %} +{% assign current = current[0] %} + diff --git a/categories.html b/categories.html index 89bd3746f..b50bd117d 100644 --- a/categories.html +++ b/categories.html @@ -4,7 +4,7 @@ {% assign allTags = "" %} {% for recipe in site.recipes %} -{% if recipe.categories %} +{% if recipe.categories and recipe.categories != empty %} {% assign thisTags = recipe.categories | join:'|' | append:'|' %} {% assign allTags = allTags | append:thisTags %} {% endif %} @@ -12,12 +12,12 @@ {% assign allTags = allTags | split:'|' | sort | uniq %}
          + {% include tag-navigation.html %}

          Categories

          {% include category.html categories=allTags %}
          {% for category in allTags %} - {% unless category == "" %}

          {{ category | capitalize }}

            @@ -25,8 +25,8 @@

            {{ category | capitalize }}

            {% if recipe.categories contains category %}
          • {{ recipe.title }}
          • {% endif %} {% endfor %}
          + ⇧ top
          - {% endunless %} {% endfor %}
          diff --git a/cuisines.html b/cuisines.html index 3a45d46c0..f1914c306 100644 --- a/cuisines.html +++ b/cuisines.html @@ -4,7 +4,7 @@ {% assign allTags = "" %} {% for recipe in site.recipes %} -{% if recipe.cuisines %} +{% if recipe.cuisines and recipe.cuisines != empty %} {% assign thisTags = recipe.cuisines | join:'|' | append:'|' %} {% assign allTags = allTags | append:thisTags %} {% endif %} @@ -12,12 +12,12 @@ {% assign allTags = allTags | split:'|' | sort | uniq %}
          + {% include tag-navigation.html %}

          Cuisines

          {% include cuisine.html cuisines=allTags %}
          {% for cuisine in allTags %} - {% unless cuisine == "" %}

          {{ cuisine | capitalize }}

            @@ -25,8 +25,8 @@

            {{ cuisine | capitalize }}

            {% if recipe.cuisines contains cuisine %}
          • {{ recipe.title }}
          • {% endif %} {% endfor %}
          + ⇧ top
          - {% endunless %} {% endfor %}
          diff --git a/diets.html b/diets.html index f3eae1cb2..f6b12a1eb 100644 --- a/diets.html +++ b/diets.html @@ -4,7 +4,7 @@ {% assign allTags = "" %} {% for recipe in site.recipes %} -{% if recipe.diets %} +{% if recipe.diets and recipe.diets != empty %} {% assign thisTags = recipe.diets | join:'|' | append:'|' %} {% assign allTags = allTags | append:thisTags %} {% endif %} @@ -12,12 +12,12 @@ {% assign allTags = allTags | split:'|' | sort | uniq %}
          + {% include tag-navigation.html %}

          Diets

          {% include diet.html diets=allTags %}
          {% for diet in allTags %} - {% unless diet == blank %}
          {% assign dietKey = diet | append:"Diet" %}

          {{ diet | capitalize }} @@ -27,8 +27,8 @@

          {{ diet | capitalize }} {% if recipe.diets contains diet %}
        • {{ recipe.title }}
        • {% endif %} {% endfor %}

        + ⇧ top
        - {% endunless %} {% endfor %}
    diff --git a/tags.html b/tags.html index 57545807b..1d21372ea 100644 --- a/tags.html +++ b/tags.html @@ -4,7 +4,7 @@ {% assign allTags = "" %} {% for recipe in site.recipes %} -{% if recipe.tags %} +{% if recipe.tags and recipe.tags != empty %} {% assign thisTags = recipe.tags | join:'|' | append:'|' %} {% assign allTags = allTags | append:thisTags %} {% endif %} @@ -12,12 +12,12 @@ {% assign allTags = allTags | split:'|' | sort | uniq %}
    + {% include tag-navigation.html %}

    Tags

    {% include tag.html tags=allTags %}
    {% for tag in allTags %} - {% unless tag == "" %}

    {{ tag | capitalize }}

      @@ -25,8 +25,8 @@

      {{ tag | capitalize }}

      {% if recipe.tags contains tag %}
    • {{ recipe.title }}
    • {% endif %} {% endfor %}
    + ⇧ top
    - {% endunless %} {% endfor %}
    From 4dffe383142f5e7e0aff2d2e36886afedac05266 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Wed, 22 Apr 2020 15:04:13 +0100 Subject: [PATCH 08/15] fix template layout --- categories.html | 34 ++++++++++++++++++---------------- cuisines.html | 34 ++++++++++++++++++---------------- diets.html | 38 ++++++++++++++++++++------------------ tags.html | 34 ++++++++++++++++++---------------- 4 files changed, 74 insertions(+), 66 deletions(-) diff --git a/categories.html b/categories.html index b50bd117d..b1b88be22 100644 --- a/categories.html +++ b/categories.html @@ -12,21 +12,23 @@ {% assign allTags = allTags | split:'|' | sort | uniq %}
    - {% include tag-navigation.html %} -

    Categories

    - {% include category.html categories=allTags %} +
    + {% include tag-navigation.html %} +

    Categories

    + {% include category.html categories=allTags %} -
    - {% for category in allTags %} -
    -

    {{ category | capitalize }}

    -
      - {% for recipe in site.recipes %} - {% if recipe.categories contains category %}
    • {{ recipe.title }}
    • {% endif %} - {% endfor %} -
    - ⇧ top -
    - {% endfor %} -
    +
    + {% for category in allTags %} +
    +

    {{ category | capitalize }}

    +
      + {% for recipe in site.recipes %} + {% if recipe.categories contains category %}
    • {{ recipe.title }}
    • {% endif %} + {% endfor %} +
    + ⇧ top +
    + {% endfor %} +
    +
    diff --git a/cuisines.html b/cuisines.html index f1914c306..5b84c7370 100644 --- a/cuisines.html +++ b/cuisines.html @@ -12,21 +12,23 @@ {% assign allTags = allTags | split:'|' | sort | uniq %}
    - {% include tag-navigation.html %} -

    Cuisines

    - {% include cuisine.html cuisines=allTags %} +
    + {% include tag-navigation.html %} +

    Cuisines

    + {% include cuisine.html cuisines=allTags %} -
    - {% for cuisine in allTags %} -
    -

    {{ cuisine | capitalize }}

    -
      - {% for recipe in site.recipes %} - {% if recipe.cuisines contains cuisine %}
    • {{ recipe.title }}
    • {% endif %} - {% endfor %} -
    - ⇧ top -
    - {% endfor %} -
    +
    + {% for cuisine in allTags %} +
    +

    {{ cuisine | capitalize }}

    +
      + {% for recipe in site.recipes %} + {% if recipe.cuisines contains cuisine %}
    • {{ recipe.title }}
    • {% endif %} + {% endfor %} +
    + ⇧ top +
    + {% endfor %} +
    +
    diff --git a/diets.html b/diets.html index f6b12a1eb..1bb0e76a2 100644 --- a/diets.html +++ b/diets.html @@ -12,23 +12,25 @@ {% assign allTags = allTags | split:'|' | sort | uniq %}
    - {% include tag-navigation.html %} -

    Diets

    - {% include diet.html diets=allTags %} +
    + {% include tag-navigation.html %} +

    Diets

    + {% include diet.html diets=allTags %} -
    - {% for diet in allTags %} -
    - {% assign dietKey = diet | append:"Diet" %} -

    {{ diet | capitalize }} -

    -
      - {% for recipe in site.recipes %} - {% if recipe.diets contains diet %}
    • {{ recipe.title }}
    • {% endif %} - {% endfor %} -
    - ⇧ top -
    - {% endfor %} -
    +
    + {% for diet in allTags %} +
    + {% assign dietKey = diet | append:"Diet" %} +

    {{ site.data.diets[dietKey].name }} +

    +
      + {% for recipe in site.recipes %} + {% if recipe.diets contains diet %}
    • {{ recipe.title }}
    • {% endif %} + {% endfor %} +
    + ⇧ top +
    + {% endfor %} +
    +
    diff --git a/tags.html b/tags.html index 1d21372ea..efb582d56 100644 --- a/tags.html +++ b/tags.html @@ -12,21 +12,23 @@ {% assign allTags = allTags | split:'|' | sort | uniq %}
    - {% include tag-navigation.html %} -

    Tags

    - {% include tag.html tags=allTags %} +
    + {% include tag-navigation.html %} +

    Tags

    + {% include tag.html tags=allTags %} -
    - {% for tag in allTags %} -
    -

    {{ tag | capitalize }}

    -
      - {% for recipe in site.recipes %} - {% if recipe.tags contains tag %}
    • {{ recipe.title }}
    • {% endif %} - {% endfor %} -
    - ⇧ top -
    - {% endfor %} -
    +
    + {% for tag in allTags %} +
    +

    {{ tag | capitalize }}

    +
      + {% for recipe in site.recipes %} + {% if recipe.tags contains tag %}
    • {{ recipe.title }}
    • {% endif %} + {% endfor %} +
    + ⇧ top +
    + {% endfor %} +
    +
    From cb9c0b7d6e8342e52048f5edb943ba7ceb26c52e Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Thu, 30 Apr 2020 16:20:02 +0100 Subject: [PATCH 09/15] handle empty taggings Display a message instead of a blank page. --- categories.html | 26 +++++++++++++++----------- cuisines.html | 26 +++++++++++++++----------- diets.html | 30 +++++++++++++++++------------- tags.html | 26 +++++++++++++++----------- 4 files changed, 62 insertions(+), 46 deletions(-) diff --git a/categories.html b/categories.html index b1b88be22..77f65e7b4 100644 --- a/categories.html +++ b/categories.html @@ -18,17 +18,21 @@

    Categories

    {% include category.html categories=allTags %}
    - {% for category in allTags %} -
    -

    {{ category | capitalize }}

    -
      - {% for recipe in site.recipes %} - {% if recipe.categories contains category %}
    • {{ recipe.title }}
    • {% endif %} - {% endfor %} -
    - ⇧ top -
    - {% endfor %} + {% unless allTags[0] %} +

    No recipes are marked as being for a specific category.

    + {% endunless %} + + {% for category in allTags %} +
    +

    {{ category | capitalize }}

    +
      + {% for recipe in site.recipes %} + {% if recipe.categories contains category %}
    • {{ recipe.title }}
    • {% endif %} + {% endfor %} +
    + ⇧ top +
    + {% endfor %}
diff --git a/cuisines.html b/cuisines.html index 5b84c7370..39726c292 100644 --- a/cuisines.html +++ b/cuisines.html @@ -18,17 +18,21 @@

Cuisines

{% include cuisine.html cuisines=allTags %}
- {% for cuisine in allTags %} -
-

{{ cuisine | capitalize }}

-
    - {% for recipe in site.recipes %} - {% if recipe.cuisines contains cuisine %}
  • {{ recipe.title }}
  • {% endif %} - {% endfor %} -
- ⇧ top -
- {% endfor %} + {% unless allTags[0] %} +

No recipes are marked as being for a specific cuisine.

+ {% endunless %} + + {% for cuisine in allTags %} +
+

{{ cuisine | capitalize }}

+
    + {% for recipe in site.recipes %} + {% if recipe.cuisines contains cuisine %}
  • {{ recipe.title }}
  • {% endif %} + {% endfor %} +
+ ⇧ top +
+ {% endfor %}
diff --git a/diets.html b/diets.html index 1bb0e76a2..049ba1c1c 100644 --- a/diets.html +++ b/diets.html @@ -18,19 +18,23 @@

Diets

{% include diet.html diets=allTags %}
- {% for diet in allTags %} -
- {% assign dietKey = diet | append:"Diet" %} -

{{ site.data.diets[dietKey].name }} -

-
    - {% for recipe in site.recipes %} - {% if recipe.diets contains diet %}
  • {{ recipe.title }}
  • {% endif %} - {% endfor %} -
- ⇧ top -
- {% endfor %} + {% unless allTags[0] %} +

No recipes are marked as being for a specific diet.

+ {% endunless %} + + {% for diet in allTags %} +
+ {% assign dietKey = diet | append:"Diet" %} +

{{ site.data.diets[dietKey].name }} +

+
    + {% for recipe in site.recipes %} + {% if recipe.diets contains diet %}
  • {{ recipe.title }}
  • {% endif %} + {% endfor %} +
+ ⇧ top +
+ {% endfor %}
diff --git a/tags.html b/tags.html index efb582d56..e8f1f46c0 100644 --- a/tags.html +++ b/tags.html @@ -18,17 +18,21 @@

Tags

{% include tag.html tags=allTags %}
- {% for tag in allTags %} -
-

{{ tag | capitalize }}

-
    - {% for recipe in site.recipes %} - {% if recipe.tags contains tag %}
  • {{ recipe.title }}
  • {% endif %} - {% endfor %} -
- ⇧ top -
- {% endfor %} + {% unless allTags[0] %} +

No recipes have any tags yet.

+ {% endunless %} + + {% for tag in allTags %} +
+

{{ tag | capitalize }}

+
    + {% for recipe in site.recipes %} + {% if recipe.tags contains tag %}
  • {{ recipe.title }}
  • {% endif %} + {% endfor %} +
+ ⇧ top +
+ {% endfor %}
From 5635eb30fcb68f00488b8c6554134aec7aa660af Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Mon, 9 Nov 2020 20:11:21 +0000 Subject: [PATCH 10/15] fix meta links now work when pre-built to html --- _includes/category.html | 2 +- _includes/cuisine.html | 2 +- _includes/diet.html | 2 +- _includes/tag-navigation.html | 8 ++++---- _includes/tag.html | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_includes/category.html b/_includes/category.html index 8864425cc..0f8eea0de 100644 --- a/_includes/category.html +++ b/_includes/category.html @@ -6,7 +6,7 @@ - + {% endunless %} {% endfor %} diff --git a/_includes/cuisine.html b/_includes/cuisine.html index 54f7f262d..614f9063f 100644 --- a/_includes/cuisine.html +++ b/_includes/cuisine.html @@ -4,7 +4,7 @@ - + {% endfor %} {% endif %} diff --git a/_includes/diet.html b/_includes/diet.html index c05786410..bc2d60e6f 100644 --- a/_includes/diet.html +++ b/_includes/diet.html @@ -7,7 +7,7 @@ - + {% endunless %} {% endfor %} diff --git a/_includes/tag-navigation.html b/_includes/tag-navigation.html index 16584bb5a..0fad63142 100644 --- a/_includes/tag-navigation.html +++ b/_includes/tag-navigation.html @@ -2,8 +2,8 @@ {% assign current = current[0] %} diff --git a/_includes/tag.html b/_includes/tag.html index f57704e41..6a6e83cfc 100644 --- a/_includes/tag.html +++ b/_includes/tag.html @@ -5,7 +5,7 @@ - + {% endfor %} From 4f2943103814f7e5ef8ece119d102722d7ac0269 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Tue, 10 Nov 2020 09:50:20 +0000 Subject: [PATCH 11/15] category => course leaves the spacial jeckyll category attribute for something else --- _includes/{category.html => course.html} | 8 ++++---- _includes/tag-navigation.html | 8 ++++---- _layouts/recipe.html | 2 +- categories.html => courses.html | 16 ++++++++-------- feed.xml | 4 ++-- search.json | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) rename _includes/{category.html => course.html} (63%) rename categories.html => courses.html (57%) diff --git a/_includes/category.html b/_includes/course.html similarity index 63% rename from _includes/category.html rename to _includes/course.html index 0f8eea0de..b244200bc 100644 --- a/_includes/category.html +++ b/_includes/course.html @@ -1,12 +1,12 @@ -{% for cat in include.categories %} -{% unless cat == empty %} - +{% for course in include.courses %} +{% unless course == empty %} + - + {% endunless %} {% endfor %} diff --git a/_includes/tag-navigation.html b/_includes/tag-navigation.html index 0fad63142..71f66a131 100644 --- a/_includes/tag-navigation.html +++ b/_includes/tag-navigation.html @@ -2,8 +2,8 @@ {% assign current = current[0] %} diff --git a/_layouts/recipe.html b/_layouts/recipe.html index 2c2145a5b..b609dc90d 100644 --- a/_layouts/recipe.html +++ b/_layouts/recipe.html @@ -35,7 +35,7 @@

{{ page.title }}

{% include cuisine.html cuisines=page.cuisines %} - {% include category.html categories=page.categories %} + {% include course.html courses=page.courses %} {% include diet.html diets=page.diets %} {% include tag.html tags=page.tags %}
diff --git a/categories.html b/courses.html similarity index 57% rename from categories.html rename to courses.html index 77f65e7b4..387088d08 100644 --- a/categories.html +++ b/courses.html @@ -4,8 +4,8 @@ {% assign allTags = "" %} {% for recipe in site.recipes %} -{% if recipe.categories and recipe.categories != empty %} -{% assign thisTags = recipe.categories | join:'|' | append:'|' %} +{% if recipe.courses and recipe.courses != empty %} +{% assign thisTags = recipe.courses | join:'|' | append:'|' %} {% assign allTags = allTags | append:thisTags %} {% endif %} {% endfor %} @@ -14,20 +14,20 @@
{% include tag-navigation.html %} -

Categories

- {% include category.html categories=allTags %} +

Courses

+ {% include course.html courses=allTags %}
{% unless allTags[0] %} -

No recipes are marked as being for a specific category.

+

No recipes are marked as being for a specific course.

{% endunless %} - {% for category in allTags %} + {% for course in allTags %}
-

{{ category | capitalize }}

+

{{ course | capitalize }}

    {% for recipe in site.recipes %} - {% if recipe.categories contains category %}
  • {{ recipe.title }}
  • {% endif %} + {% if recipe.courses contains course %}
  • {{ recipe.title }}
  • {% endif %} {% endfor %}
⇧ top diff --git a/feed.xml b/feed.xml index fa12cfa73..c1bae19cc 100644 --- a/feed.xml +++ b/feed.xml @@ -20,8 +20,8 @@ layout: null {% for tag in post.tags %} {{ tag | xml_escape }} {% endfor %} - {% for cat in post.categories %} - {{ cat | xml_escape }} + {% for course in post.courses %} + {{ course | xml_escape }} {% endfor %} {% endfor %} diff --git a/search.json b/search.json index e68a5e4ca..9500297b5 100644 --- a/search.json +++ b/search.json @@ -9,7 +9,7 @@ {% if post.tags %}"tags" : "{% for tag in post.tags %}{{ tag | escape }} {% endfor %}",{% endif %} {% if post.cuisines %}"cuisines" : "{% for cuisines in post.cuisines %}{{ cuisine | escape }} {% endfor %}",{% endif %} {% if post.diets %}"diets" : "{% for diet in post.diets %}{{ diet | escape }} {% endfor %}",{% endif %} - {% if post.categories %}"categories" : "{% for cat in post.categories %}{{ cat | escape }} {% endfor %}",{% endif %} + {% if post.courses %}"courses" : "{% for course in post.courses %}{{ course | escape }} {% endfor %}",{% endif %} "image" : "{{ site.baseurl }}/images/{{ post.image }}", "url" : "{{ site.baseurl }}{{ post.url }}" From 4ab82fbc70ed98a7cecfbb705e42d946ca9a6c90 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Tue, 26 Jan 2021 11:29:11 +0000 Subject: [PATCH 12/15] bug fixes Wrong var in course No need to capitalise course name in code --- _includes/course.html | 2 +- courses.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/course.html b/_includes/course.html index b244200bc..bd88243f7 100644 --- a/_includes/course.html +++ b/_includes/course.html @@ -6,7 +6,7 @@ - + {% endunless %} {% endfor %} diff --git a/courses.html b/courses.html index 387088d08..92914ebfb 100644 --- a/courses.html +++ b/courses.html @@ -24,7 +24,7 @@

Courses

{% for course in allTags %}
-

{{ course | capitalize }}

+

{{ course }}

    {% for recipe in site.recipes %} {% if recipe.courses contains course %}
  • {{ recipe.title }}
  • {% endif %} From fab7a19cd5373b88e6a895bd864b797a40d4885e Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Wed, 3 Feb 2021 10:11:19 +0000 Subject: [PATCH 13/15] Update tags.html Not necessary to capitalise the displayed tag. --- tags.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tags.html b/tags.html index e8f1f46c0..bb734e824 100644 --- a/tags.html +++ b/tags.html @@ -24,7 +24,7 @@

    Tags

    {% for tag in allTags %}
    -

    {{ tag | capitalize }}

    +

    {{ tag }}

      {% for recipe in site.recipes %} {% if recipe.tags contains tag %}
    • {{ recipe.title }}
    • {% endif %} From a1db153e662452a79f5155f1cf8586f3ca2ed42b Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Mon, 16 Aug 2021 11:25:48 +0100 Subject: [PATCH 14/15] Much improved tag browsing --- _includes/course.html | 4 ++-- _includes/cuisine.html | 4 ++-- _includes/diet.html | 4 ++-- _includes/tag.html | 4 ++-- courses.html | 20 +++++++++++++------- cuisines.html | 20 +++++++++++++------- diets.html | 20 +++++++++++++------- js/tag-browse.js | 20 ++++++++++++++++++++ tags.html | 20 +++++++++++++------- 9 files changed, 80 insertions(+), 36 deletions(-) create mode 100644 js/tag-browse.js diff --git a/_includes/course.html b/_includes/course.html index bd88243f7..c2f171fee 100644 --- a/_includes/course.html +++ b/_includes/course.html @@ -1,12 +1,12 @@ {% for course in include.courses %} {% unless course == empty %} - + - + {% endunless %} {% endfor %} diff --git a/_includes/cuisine.html b/_includes/cuisine.html index 614f9063f..305fe7505 100644 --- a/_includes/cuisine.html +++ b/_includes/cuisine.html @@ -1,10 +1,10 @@ {% if include.cuisines %} {% for cuisine in include.cuisines %} - + - + {% endfor %} {% endif %} diff --git a/_includes/diet.html b/_includes/diet.html index bc2d60e6f..6405efee9 100644 --- a/_includes/diet.html +++ b/_includes/diet.html @@ -2,12 +2,12 @@ {% unless diet == empty %} {% assign itemprop = diet | append:"Diet" %} {% assign name = site.data.diets[itemprop].name %} - + - + {% endunless %} {% endfor %} diff --git a/_includes/tag.html b/_includes/tag.html index 6a6e83cfc..fc371fad5 100644 --- a/_includes/tag.html +++ b/_includes/tag.html @@ -1,11 +1,11 @@ {% if include.tags %} {% for tag in include.tags %} -
      + {% endfor %} diff --git a/courses.html b/courses.html index 92914ebfb..728169450 100644 --- a/courses.html +++ b/courses.html @@ -23,16 +23,22 @@

      Courses

      {% endunless %} {% for course in allTags %} -
      +

      {{ course }}

      -
        - {% for recipe in site.recipes %} - {% if recipe.courses contains course %}
      • {{ recipe.title }}
      • {% endif %} - {% endfor %} -
      - ⇧ top + {% for recipe in site.recipes %} + {% if recipe.courses contains course %} + + {% endif %} + {% endfor %}
      {% endfor %}
+ + diff --git a/cuisines.html b/cuisines.html index 39726c292..e89cf251f 100644 --- a/cuisines.html +++ b/cuisines.html @@ -23,16 +23,22 @@

Cuisines

{% endunless %} {% for cuisine in allTags %} -
+

{{ cuisine | capitalize }}

-
    - {% for recipe in site.recipes %} - {% if recipe.cuisines contains cuisine %}
  • {{ recipe.title }}
  • {% endif %} - {% endfor %} -
- ⇧ top + {% for recipe in site.recipes %} + {% if recipe.cuisines contains cuisine %} + + {% endif %} + {% endfor %}
{% endfor %}
+ + diff --git a/diets.html b/diets.html index 049ba1c1c..9071170c7 100644 --- a/diets.html +++ b/diets.html @@ -23,18 +23,24 @@

Diets

{% endunless %} {% for diet in allTags %} -
+
{% assign dietKey = diet | append:"Diet" %}

{{ site.data.diets[dietKey].name }}

-
    - {% for recipe in site.recipes %} - {% if recipe.diets contains diet %}
  • {{ recipe.title }}
  • {% endif %} - {% endfor %} -
- ⇧ top + {% for recipe in site.recipes %} + {% if recipe.diets contains diet %} + + {% endif %} + {% endfor %}
{% endfor %}
+ + diff --git a/js/tag-browse.js b/js/tag-browse.js new file mode 100644 index 000000000..c9e1586fe --- /dev/null +++ b/js/tag-browse.js @@ -0,0 +1,20 @@ +$('div[data-tagged]').hide(); + +$('[data-tag-name]').click(function(){ + console.log('clicked'); + let tag_name = $(this).data('tag-name'); + // let tag_type = $(this).data('tag-type'); + // Reset + $('div[data-tagged]').hide(); + $('[data-tag-name]').removeClass('bg-blue').addClass('bg-gray'); + + let $el = $('div[data-tagged="'+tag_name+'"]'); + $(this).addClass('bg-blue').removeClass('bg-gray'); + $el.show(); +}); + +if (window.location.hash.length > 1) { + let $el = $('[data-tag-name="'+window.location.hash.substring(1)+'"]'); + console.log($el); + $el.trigger('click'); +}; diff --git a/tags.html b/tags.html index bb734e824..ddbd17cc2 100644 --- a/tags.html +++ b/tags.html @@ -23,16 +23,22 @@

Tags

{% endunless %} {% for tag in allTags %} -
+

{{ tag }}

-
    - {% for recipe in site.recipes %} - {% if recipe.tags contains tag %}
  • {{ recipe.title }}
  • {% endif %} - {% endfor %} -
- ⇧ top + {% for recipe in site.recipes %} + {% if recipe.tags contains tag %} + + {% endif %} + {% endfor %}
{% endfor %}
+ + From 44f272166c1e66c4b6c0d83bcab8603c77de6b23 Mon Sep 17 00:00:00 2001 From: Rue Turner Date: Mon, 16 Aug 2021 11:30:43 +0100 Subject: [PATCH 15/15] remove cruft --- js/tag-browse.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/js/tag-browse.js b/js/tag-browse.js index c9e1586fe..01cf0d656 100644 --- a/js/tag-browse.js +++ b/js/tag-browse.js @@ -1,10 +1,7 @@ $('div[data-tagged]').hide(); $('[data-tag-name]').click(function(){ - console.log('clicked'); let tag_name = $(this).data('tag-name'); - // let tag_type = $(this).data('tag-type'); - // Reset $('div[data-tagged]').hide(); $('[data-tag-name]').removeClass('bg-blue').addClass('bg-gray'); @@ -15,6 +12,5 @@ $('[data-tag-name]').click(function(){ if (window.location.hash.length > 1) { let $el = $('[data-tag-name="'+window.location.hash.substring(1)+'"]'); - console.log($el); $el.trigger('click'); };