Fix filtering on tag pages
This commit is contained in:
parent
e3e3e1648d
commit
f58a99b04b
|
|
@ -15,28 +15,30 @@
|
||||||
<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 %}
|
||||||
<div class="c-card">
|
{% if not selectedTag or selectedTag in recipe.data.tags %} {# If we don't have a selectedTag, we are on the all recipes page #}
|
||||||
{% 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">
|
||||||
<div class="c-card__info">
|
{% recipeimage recipe.data.image, "c-card__image", recipe.data.title, "(min-width: 1150px) 25vw, (min-width: 850px) 33vw, (min-width: 550px) 50vw, 100vw" %}
|
||||||
{% if not recipe.data.tags | length %}
|
<div class="c-card__info">
|
||||||
<div>
|
{% if not recipe.data.tags | length %}
|
||||||
{% for tag in recipe.data.tags %}
|
<div>
|
||||||
<abbr class="c-card__tag-abbr" title="{{ tag | noEmoji }}">{{ tag | onlyEmoji | safe }}</abbr>
|
{% for tag in recipe.data.tags %}
|
||||||
{% endfor %}
|
<abbr class="c-card__tag-abbr" title="{{ tag | noEmoji }}">{{ tag | onlyEmoji | safe }}</abbr>
|
||||||
</div>
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if recipe.data.time %}
|
{% if recipe.data.time %}
|
||||||
<div class="card__time">
|
<div class="card__time">
|
||||||
{% include 'icons/time.svg' %}
|
{% include 'icons/time.svg' %}
|
||||||
{{ recipe.data.time }}
|
{{ recipe.data.time }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<a class="c-card__title-wrapper" href="{{ recipe.url }}">
|
||||||
|
<h3 class="c-card__title">{{ recipe.data.title }}</h3>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<a class="c-card__title-wrapper" href="{{ recipe.url }}">
|
{% endif %}
|
||||||
<h3 class="c-card__title">{{ recipe.data.title }}</h3>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue