custom/static-plugins/LDSCustom/src/Resources/views/rcpmanager/recipe/card/box.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/rcpmanager/recipe/card/box.html.twig' %}
  2. {% block rcp_recipe_card %}
  3.     <article class="card product-box box-standard">
  4.         <div class="card-body">
  5.             <div class="product-image-wrapper">
  6.                 {% set recipeUrl = seoUrl('rcp.frontend.recipe', { slug: item.translated.slug })|replace({'rcp_recipe/': 'ratgeber/'}) %}
  7.                 {% if not (recipeUrl ends with '/') %}
  8.                     {% set recipeUrl = recipeUrl ~ '/' %}
  9.                 {% endif %}
  10.                 <a href="{{ recipeUrl }}" title="{{ item.translated.name }}" class="product-image-link is-standard">
  11.                     {% if item.coverId %}
  12.                         {% set attributes = {
  13.                             'class': 'product-image',
  14.                             'alt': (item.translated.name),
  15.                             'title': (item.translated.name)
  16.                         } %}
  17.                         {% sw_thumbnails 'recipe-image-thumbnails' with {
  18.                             media: item.cover,
  19.                             sizes: {
  20.                                 "xs" : "500px",
  21.                                 "sm" : "315px",
  22.                                 "md" : "390px",
  23.                                 "lg" : "350px",
  24.                                 "xl" : "310px",
  25.                             },
  26.                             attributes: {
  27.                             'class': 'product-image',
  28.                             'alt': item.translated.name,
  29.                             'title': item.translated.name
  30.                         }
  31.                         } %}
  32.                     {% else %}
  33.                         <div class="product-image-placeholder">
  34.                             {% sw_icon 'placeholder' style {
  35.                                 'size': 'fluid'
  36.                             } %}
  37.                         </div>
  38.                     {% endif %}
  39.                 </a>
  40.             </div>
  41.             <div class="product-info">
  42.                 <a href="{{ recipeUrl }}" class="product-name" title="{{ item.translated.name }}">
  43.                     {{ item.translated.name }}
  44.                 </a>
  45.                 <div class="product-variant-characteristics">
  46.                     <div class="product-variant-characteristics-text">
  47.                         {% if item.preparationTime %}
  48.                             {% sw_icon 'clock' style { 'size': 'sm' } %}
  49.                             <span class="product-variant-characteristics-option">
  50.                                 <b>{{ item.preparationTime }}&nbsp;{{ "minutes"|trans }}</b>
  51.                             </span>
  52.                         {% endif %}
  53.                         {% if item.preparationTime and item.difficulty.translated.name %}&nbsp;|&nbsp;
  54.                         {% endif %}
  55.                         {% if item.difficulty.translated.name %}
  56.                             <span class="product-variant-characteristics-option">
  57.                                 {{ "difficulty"|trans }}:&nbsp;<b>{{ item.difficulty.translated.name }}</b>
  58.                             </span>
  59.                         {% endif %}
  60.                     </div>
  61.                 </div>
  62.             </div>
  63.         </div>
  64.     </article>
  65. {% endblock %}