{% sw_extends '@Storefront/rcpmanager/recipe/card/box.html.twig' %}
{% block rcp_recipe_card %}
<article class="card product-box box-standard">
<div class="card-body">
<div class="product-image-wrapper">
{% set recipeUrl = seoUrl('rcp.frontend.recipe', { slug: item.translated.slug })|replace({'rcp_recipe/': 'ratgeber/'}) %}
{% if not (recipeUrl ends with '/') %}
{% set recipeUrl = recipeUrl ~ '/' %}
{% endif %}
<a href="{{ recipeUrl }}" title="{{ item.translated.name }}" class="product-image-link is-standard">
{% if item.coverId %}
{% set attributes = {
'class': 'product-image',
'alt': (item.translated.name),
'title': (item.translated.name)
} %}
{% sw_thumbnails 'recipe-image-thumbnails' with {
media: item.cover,
sizes: {
"xs" : "500px",
"sm" : "315px",
"md" : "390px",
"lg" : "350px",
"xl" : "310px",
},
attributes: {
'class': 'product-image',
'alt': item.translated.name,
'title': item.translated.name
}
} %}
{% else %}
<div class="product-image-placeholder">
{% sw_icon 'placeholder' style {
'size': 'fluid'
} %}
</div>
{% endif %}
</a>
</div>
<div class="product-info">
<a href="{{ recipeUrl }}" class="product-name" title="{{ item.translated.name }}">
{{ item.translated.name }}
</a>
<div class="product-variant-characteristics">
<div class="product-variant-characteristics-text">
{% if item.preparationTime %}
{% sw_icon 'clock' style { 'size': 'sm' } %}
<span class="product-variant-characteristics-option">
<b>{{ item.preparationTime }} {{ "minutes"|trans }}</b>
</span>
{% endif %}
{% if item.preparationTime and item.difficulty.translated.name %} |
{% endif %}
{% if item.difficulty.translated.name %}
<span class="product-variant-characteristics-option">
{{ "difficulty"|trans }}: <b>{{ item.difficulty.translated.name }}</b>
</span>
{% endif %}
</div>
</div>
</div>
</div>
</article>
{% endblock %}