templates/ricette/recipeDetail.html.twig line 150

  1. {% extends 'base.html.twig' %}
  2. {% import 'partials/macros/_breadcrumbs.html.twig' as page %}
  3. {% block meta_alternate '' %}
  4. {% block javascripts %}
  5.     <script type="application/ld+json">
  6.         {
  7.             "@context": "https://schema.org/",
  8.             "@type": "Recipe",
  9.             "name": "{{ recipe.title }}",
  10.             "image": [
  11.                 "{{ ('/uploads/images/ricette/' ~ recipe.image) | imagine_filter('size_1000_700') }}"
  12.             ],
  13.             "keywords": "{{ recipe.people }} {{ 'recipes_detail.people'|trans({}, 'pages') }}, {{ recipe.difficulty }}",
  14.             "totalTime": "PT{{ recipe.time }}M",
  15.             "recipeCategory": "{{ recipe.type.name }}",
  16.             {% if recipe.ingredients %}
  17.                 "recipeIngredient": [
  18.                     {% for ingredient in recipe.ingredients %}
  19.                         "{{ ingredient }}"{% if not loop.last %},{% endif %}
  20.                     {% endfor %}
  21.                 ],
  22.             {% endif %}
  23.             {% if recipe.method %}
  24.                 "recipeInstructions": [
  25.                     "{{ recipe.method|raw|replace({'"': ''}) }}"
  26.                 ]
  27.             {% endif %}
  28.         }
  29.     </script>
  30. {% endblock %}
  31. {% block content %}
  32.     {% set product = recipe.product %}
  33.     {% set listBreadcrumbs = {
  34.         1: [ path('app_recipes'), 'menu.recipes' ],
  35.         2: [ '', recipe.title ]
  36.     } %}
  37.     {{ page.breadcrumbs(listBreadcrumbs) }}
  38.     <section class="wow animate__fadeIn padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
  39.         <div class="container-fluid">
  40.             <div class="row justify-content-center">
  41.                 <div class="col col-md-8 text-center">
  42.                     <h1>
  43.                         {{ recipe.title|upper }}
  44.                     </h1>
  45.                 </div>
  46.             </div>
  47.         </div>
  48.     </section>
  49.     <section class="wow animate__fadeInUp padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
  50.         <div class="container-fluid">
  51.             <div class="row justify-content-center">
  52.                 <div class="col-12 col-md-8 col-xl-7 sm-margin-15px-bottom wow animate__fadeInLeft" data-wow-delay="0.2s">
  53.                     <div class="h-550px lg-h-500px md-h-400px sm-h-350px overflow-hidden cover-background Bdrs(30px)" style="background-image: url('{{ ('/uploads/images/ricette/' ~ recipe.image) | imagine_filter('size_1000_700') }}')">
  54.                     </div>
  55.                 </div>
  56.                 <div class="col-12 col-md-4 col-xl-3 wow animate__fadeInRight" data-wow-delay="0.4s">
  57.                     <div class="Bgc(la-rioja) d-flex flex-column align-items-center justify-content-center h-100 padding-20px-all overflow-hidden Bdrs(30px)" data-parallax-background-ratio="0.7" style="background-image: url('{{ asset('assets/images/webp/frontend/recipes/bg-leaf.webp') }}')">
  58.                         <div>
  59.                             {% if recipe.people %}
  60.                                 <div class="d-flex align-items-center position-relative text-start margin-50px-bottom lg-margin-30px-bottom sm-margin-20px-bottom last-paragraph-no-margin">
  61.                                     <div class="border-radius-50 d-flex margin-20px-right md-padding-10px-all padding-20px-all text-white md-w-50px w-70px md-h-50px Bgc(jewel) H(70px)">
  62.                                         {% include 'partials/svg/_icon_people.svg.twig' %}
  63.                                     </div>
  64.                                     <div>
  65.                                         <h4 class="text-white-2 margin-5px-bottom counter" data-to="{{ recipe.people }}" data-speed="1000">
  66.                                             {{ recipe.people }}
  67.                                         </h4>
  68.                                         <span class="text-uppercase position-relative top-minus4">{{ 'recipes_detail.people'|trans({}, 'pages') }}</span>
  69.                                     </div>
  70.                                 </div>
  71.                             {% endif %}
  72.                             {% if recipe.time %}
  73.                                 <div class="d-flex align-items-center position-relative text-start margin-50px-bottom lg-margin-30px-bottom sm-margin-20px-bottom last-paragraph-no-margin">
  74.                                     <div class="border-radius-50 d-flex margin-20px-right md-padding-10px-all padding-20px-all text-white md-w-50px w-70px md-h-50px Bgc(jewel) H(70px)">
  75.                                         {% include 'partials/svg/_icon_clock_time.svg.twig' %}
  76.                                     </div>
  77.                                     <div>
  78.                                         <h4 class="text-white-2 margin-5px-bottom counter" data-to="{{ recipe.time }}" data-speed="2000">
  79.                                             {{ recipe.time }}
  80.                                         </h4>
  81.                                         <span class="text-uppercase position-relative top-minus4">{{ 'recipes_detail.minutes'|trans({}, 'pages') }}</span>
  82.                                     </div>
  83.                                 </div>
  84.                             {% endif %}
  85.                             {% if recipe.difficulty %}
  86.                                 <div class="d-flex align-items-center position-relative text-start margin-50px-bottom lg-margin-30px-bottom sm-margin-20px-bottom last-paragraph-no-margin">
  87.                                     <div class="border-radius-50 d-flex margin-20px-right md-padding-10px-all padding-20px-all text-white md-w-50px w-70px md-h-50px Bgc(jewel) H(70px)">
  88.                                         {% include 'partials/svg/_icon_chef.svg.twig' %}
  89.                                     </div>
  90.                                     <div>
  91.                                         <h4 class="text-white-2 margin-5px-bottom">
  92.                                             {{ ('recipes.filter.difficulty.' ~ recipe.difficulty)|replace({' ': '_'})|trans({}, 'pages')|lower }}
  93.                                         </h4>
  94.                                         <span class="text-uppercase position-relative top-minus4">{{ 'recipes_detail.difficulty'|replace({' ': '_'})|trans({}, 'pages') }}</span>
  95.                                     </div>
  96.                                 </div>
  97.                             {% endif %}
  98.                             {% if recipe.type %}
  99.                                 <div class="d-flex align-items-center position-relative text-start last-paragraph-no-margin">
  100.                                     <div class="border-radius-50 d-flex margin-20px-right md-padding-10px-all padding-20px-all text-white md-w-50px w-70px md-h-50px Bgc(jewel) H(70px)">
  101.                                         {% include 'partials/svg/_icon_fork_and_knife.svg.twig' %}
  102.                                     </div>
  103.                                     <div>
  104.                                         <h4 class="text-white-2 margin-5px-bottom">
  105.                                             {{ ('recipes.filter.types.' ~ recipe.type)|replace({' ': '_'})|trans({}, 'pages')|lower }}
  106.                                         </h4>
  107.                                         <span class="text-uppercase position-relative top-minus4">{{ 'recipes_detail.type'|trans({}, 'pages') }}</span>
  108.                                     </div>
  109.                                 </div>
  110.                             {% endif %}
  111.                         </div>
  112.                     </div>
  113.                 </div>
  114.             </div>
  115.         </div>
  116.     </section>
  117.     <section class="wow animate__fadeInUp padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
  118.         <div class="container">
  119.             <div class="row align-items-center justify-content-center">
  120.                 {% if recipe.ingredients %}
  121.                     <div class="col-12 col-md-8 sm-margin-15px-bottom wow animate__fadeInLeft" data-wow-delay="0.2s">
  122.                         <h3 class="margin-40px-bottom">
  123.                             {{ 'recipes_detail.ingredients'|trans({}, 'pages') }}
  124.                         </h3>
  125.                         <div class="easyadmin-output">
  126.                             <ul>
  127.                                 {% for ingredient in recipe.ingredients %}
  128.                                     <li class="margin-10px-bottom md-margin-5px-bottom">
  129.                                         {{ ingredient }}
  130.                                     </li>
  131.                                 {% endfor %}
  132.                             </ul>
  133.                         </div>
  134.                     </div>
  135.                 {% endif %}
  136.                 <div class="col-9 {% if recipe.ingredients %}col-md-4{% endif %} wow animate__fadeInRight" data-wow-delay="0.4s">
  137.                     <a class="d-block" href="{{ path('app_show_product', {'category_slug': product.type.productType.slug, 'product_slug': product.slug}) }}">
  138.                         <div class="productRow">
  139.                             {% if product.new %}
  140.                                 {% include 'partials/badge/_badge_new.html.twig' %}
  141.                             {% endif %}
  142.                             <img class="w-100 product-png-shadow" src="{{ ('/uploads/images/product/' ~ product.imagePackName) | imagine_filter('size_700_890') }}" alt="{{ product.name }}">
  143.                         </div>
  144.                     </a>
  145.                 </div>
  146.             </div>
  147.         </div>
  148.     </section>
  149.     {% if recipe.method %}
  150.         <section class="wow animate__fadeInUp padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
  151.             <div class="Bgc(la-rioja) sm-padding-40px-top padding-60px-top padding-40px-bottom overflow-hidden Bdrs(30px)" data-parallax-background-ratio="0.7" style="background-image: url('{{ asset('assets/images/webp/frontend/recipes/bg-leaf.webp') }}')">
  152.                 <div class="container">
  153.                     <div class="row">
  154.                         <div class="col-12">
  155.                             <h3 class="C(jewel) margin-40px-bottom text-center">
  156.                                 {{ 'recipes_detail.method'|trans({}, 'pages')|upper }}
  157.                             </h3>
  158.                             <div class="easyadmin-output easyadmin-output_recipe-method">
  159.                                 {{ recipe.method|replace({'<div><br></div>': ''})|raw }}
  160.                             </div>
  161.                         </div>
  162.                     </div>
  163.                 </div>
  164.             </div>
  165.         </section>
  166.     {% endif %}
  167.     {% if recipesRelated|length > 0 %}
  168.         <section class="padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
  169.             <div class="container-fluid">
  170.                 <div class="row justify-content-center">
  171.                     <div class="col col-md-8 text-center">
  172.                         <h3 class="margin-40px-bottom">
  173.                             {{ 'recipes_detail.other_recipes'|trans({}, 'pages') }}
  174.                         </h3>
  175.                     </div>
  176.                 </div>
  177.                 <div class="row position-relative justify-content-center">
  178.                     <div class="col-12 col-md-12 col-sm-9">
  179.                         <div class="swiper-container swiper-pagination-bottom black-move blog-slider"
  180.                             data-slider-options='{
  181.                                 "slidesPerView": 1,
  182.                                 "allowTouchMove": true,
  183.                                 "loop": false,
  184.                                 "spaceBetween": 30,
  185.                                 "autoplay": false,
  186.                                 "keyboard": {
  187.                                     "enabled": true,
  188.                                     "onlyInViewport": true
  189.                                 },
  190.                                 "breakpoints": {
  191.                                     "992": {
  192.                                         "slidesPerView": 3
  193.                                     },
  194.                                     "768": {
  195.                                         "slidesPerView": 2
  196.                                     }
  197.                                 },
  198.                                 "pagination": {
  199.                                     "el": ".swiper-pagination-recipes",
  200.                                     "clickable": true
  201.                                 }
  202.                             }'>
  203.                             <div class="swiper-wrapper">
  204.                                 {% for recipeRelated in recipesRelated %}
  205.                                     <div class="swiper-slide">
  206.                                         <div class="blog-post bg-white border-radius-10 overflow-hidden">
  207.                                             <div class="blog-post-images border-radius-10 overflow-hidden position-relative">
  208.                                                 <a href="{{ path('app_recipes_detail', {'slug': recipeRelated.slug} ) }}">
  209.                                                     <img class="d-block" src="{{ ('/uploads/images/ricette/' ~ recipeRelated.image) | imagine_filter('size_550_425') }}" alt="{{ recipeRelated.title }}">
  210.                                                 </a>
  211.                                             </div>
  212.                                             <div class="post-details padding-20px-all">
  213.                                                 <p class="post-sup-title C(la-rioja)">
  214.                                                     <strong>
  215.                                                         {{ ('recipes.filter.types.' ~ recipeRelated.type.name)|replace({' ': '_'})|trans({}, 'pages')|upper }}
  216.                                                     </strong>
  217.                                                 </p>
  218.                                                 <a href="{{ path('app_recipes_detail', {'slug': recipeRelated.slug} ) }}" class="post-title w-100 d-block lg-w-100 margin-15px-bottom C(jewel)">
  219.                                                     <strong>
  220.                                                         {{ recipeRelated.title|upper }}
  221.                                                     </strong>
  222.                                                 </a>
  223.                                                 <div class="separator-line-horrizontal-full bg-medium-gray margin-20px-tb"></div>
  224.                                                 <div class="d-flex">
  225.                                                     <div class="d-flex align-items-center margin-20px-right">
  226.                                                         <div class="border-radius-50 d-flex margin-5px-right padding-5px-all text-white w-35px Bgc(la-rioja) H(35px)">
  227.                                                             {% include 'partials/svg/_icon_chef.svg.twig' %}
  228.                                                         </div>
  229.                                                         <span>
  230.                                                             {{ ('recipes.filter.difficulty.' ~ recipeRelated.difficulty)|replace({' ': '_'})|trans({}, 'pages') }}
  231.                                                         </span>
  232.                                                     </div>
  233.                                                     <div class="d-flex align-items-center">
  234.                                                         <div class="border-radius-50 d-flex margin-5px-right padding-5px-all text-white w-35px Bgc(la-rioja) H(35px)">
  235.                                                             {% include 'partials/svg/_icon_clock_time.svg.twig' %}
  236.                                                         </div>
  237.                                                         <span>
  238.                                                             {{ recipeRelated.time ~ ' ' ~ 'recipes.filter.time.default_value'|trans({}, 'pages')|lower }}
  239.                                                         </span>
  240.                                                     </div>
  241.                                                 </div>
  242.                                             </div>
  243.                                         </div>
  244.                                     </div>
  245.                                 {% endfor %}
  246.                             </div>
  247.                             <div class="swiper-pagination-recipes swiper-pagination"></div>
  248.                         </div>
  249.                     </div>
  250.                 </div>
  251.             </div>
  252.         </section>
  253.     {% endif %}
  254. {% endblock %}