1
0
Fork 0
mirror of https://github.com/TheThomaas/my-online-cookbook.git synced 2026-01-11 04:11:47 +00:00

Fix filtering on tag pages

This commit is contained in:
maeligg 2022-12-27 19:45:22 +01:00
parent e3e3e1648d
commit f58a99b04b

View file

@ -15,6 +15,7 @@
<div class="l-container"> <div class="l-container">
<div class="c-card__wrapper"> <div class="c-card__wrapper">
{% for recipe in collections.recipes %} {% for recipe in collections.recipes %}
{% if not selectedTag or selectedTag in recipe.data.tags %} {# If we don't have a selectedTag, we are on the all recipes page #}
<div class="c-card"> <div class="c-card">
{% recipeimage recipe.data.image, "c-card__image", recipe.data.title, "(min-width: 1150px) 25vw, (min-width: 850px) 33vw, (min-width: 550px) 50vw, 100vw" %} {% recipeimage recipe.data.image, "c-card__image", recipe.data.title, "(min-width: 1150px) 25vw, (min-width: 850px) 33vw, (min-width: 550px) 50vw, 100vw" %}
<div class="c-card__info"> <div class="c-card__info">
@ -37,6 +38,7 @@
<h3 class="c-card__title">{{ recipe.data.title }}</h3> <h3 class="c-card__title">{{ recipe.data.title }}</h3>
</a> </a>
</div> </div>
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
</div> </div>