templates/ricette/recipeDetail.html.twig line 150
{% extends 'base.html.twig' %}
{% import 'partials/macros/_breadcrumbs.html.twig' as page %}
{% block meta_alternate '' %}
{% block javascripts %}
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Recipe",
"name": "{{ recipe.title }}",
"image": [
"{{ ('/uploads/images/ricette/' ~ recipe.image) | imagine_filter('size_1000_700') }}"
],
"keywords": "{{ recipe.people }} {{ 'recipes_detail.people'|trans({}, 'pages') }}, {{ recipe.difficulty }}",
"totalTime": "PT{{ recipe.time }}M",
"recipeCategory": "{{ recipe.type.name }}",
{% if recipe.ingredients %}
"recipeIngredient": [
{% for ingredient in recipe.ingredients %}
"{{ ingredient }}"{% if not loop.last %},{% endif %}
{% endfor %}
],
{% endif %}
{% if recipe.method %}
"recipeInstructions": [
"{{ recipe.method|raw|replace({'"': ''}) }}"
]
{% endif %}
}
</script>
{% endblock %}
{% block content %}
{% set product = recipe.product %}
{% set listBreadcrumbs = {
1: [ path('app_recipes'), 'menu.recipes' ],
2: [ '', recipe.title ]
} %}
{{ page.breadcrumbs(listBreadcrumbs) }}
<section class="wow animate__fadeIn padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col col-md-8 text-center">
<h1>
{{ recipe.title|upper }}
</h1>
</div>
</div>
</div>
</section>
<section class="wow animate__fadeInUp padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-12 col-md-8 col-xl-7 sm-margin-15px-bottom wow animate__fadeInLeft" data-wow-delay="0.2s">
<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') }}')">
</div>
</div>
<div class="col-12 col-md-4 col-xl-3 wow animate__fadeInRight" data-wow-delay="0.4s">
<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') }}')">
<div>
{% if recipe.people %}
<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">
<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)">
{% include 'partials/svg/_icon_people.svg.twig' %}
</div>
<div>
<h4 class="text-white-2 margin-5px-bottom counter" data-to="{{ recipe.people }}" data-speed="1000">
{{ recipe.people }}
</h4>
<span class="text-uppercase position-relative top-minus4">{{ 'recipes_detail.people'|trans({}, 'pages') }}</span>
</div>
</div>
{% endif %}
{% if recipe.time %}
<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">
<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)">
{% include 'partials/svg/_icon_clock_time.svg.twig' %}
</div>
<div>
<h4 class="text-white-2 margin-5px-bottom counter" data-to="{{ recipe.time }}" data-speed="2000">
{{ recipe.time }}
</h4>
<span class="text-uppercase position-relative top-minus4">{{ 'recipes_detail.minutes'|trans({}, 'pages') }}</span>
</div>
</div>
{% endif %}
{% if recipe.difficulty %}
<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">
<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)">
{% include 'partials/svg/_icon_chef.svg.twig' %}
</div>
<div>
<h4 class="text-white-2 margin-5px-bottom">
{{ ('recipes.filter.difficulty.' ~ recipe.difficulty)|replace({' ': '_'})|trans({}, 'pages')|lower }}
</h4>
<span class="text-uppercase position-relative top-minus4">{{ 'recipes_detail.difficulty'|replace({' ': '_'})|trans({}, 'pages') }}</span>
</div>
</div>
{% endif %}
{% if recipe.type %}
<div class="d-flex align-items-center position-relative text-start last-paragraph-no-margin">
<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)">
{% include 'partials/svg/_icon_fork_and_knife.svg.twig' %}
</div>
<div>
<h4 class="text-white-2 margin-5px-bottom">
{{ ('recipes.filter.types.' ~ recipe.type)|replace({' ': '_'})|trans({}, 'pages')|lower }}
</h4>
<span class="text-uppercase position-relative top-minus4">{{ 'recipes_detail.type'|trans({}, 'pages') }}</span>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</section>
<section class="wow animate__fadeInUp padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
<div class="container">
<div class="row align-items-center justify-content-center">
{% if recipe.ingredients %}
<div class="col-12 col-md-8 sm-margin-15px-bottom wow animate__fadeInLeft" data-wow-delay="0.2s">
<h3 class="margin-40px-bottom">
{{ 'recipes_detail.ingredients'|trans({}, 'pages') }}
</h3>
<div class="easyadmin-output">
<ul>
{% for ingredient in recipe.ingredients %}
<li class="margin-10px-bottom md-margin-5px-bottom">
{{ ingredient }}
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
<div class="col-9 {% if recipe.ingredients %}col-md-4{% endif %} wow animate__fadeInRight" data-wow-delay="0.4s">
<a class="d-block" href="{{ path('app_show_product', {'category_slug': product.type.productType.slug, 'product_slug': product.slug}) }}">
<div class="productRow">
{% if product.new %}
{% include 'partials/badge/_badge_new.html.twig' %}
{% endif %}
<img class="w-100 product-png-shadow" src="{{ ('/uploads/images/product/' ~ product.imagePackName) | imagine_filter('size_700_890') }}" alt="{{ product.name }}">
</div>
</a>
</div>
</div>
</div>
</section>
{% if recipe.method %}
<section class="wow animate__fadeInUp padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
<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') }}')">
<div class="container">
<div class="row">
<div class="col-12">
<h3 class="C(jewel) margin-40px-bottom text-center">
{{ 'recipes_detail.method'|trans({}, 'pages')|upper }}
</h3>
<div class="easyadmin-output easyadmin-output_recipe-method">
{{ recipe.method|replace({'<div><br></div>': ''})|raw }}
</div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if recipesRelated|length > 0 %}
<section class="padding-100px-bottom md-padding-60px-bottom sm-padding-30px-bottom">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col col-md-8 text-center">
<h3 class="margin-40px-bottom">
{{ 'recipes_detail.other_recipes'|trans({}, 'pages') }}
</h3>
</div>
</div>
<div class="row position-relative justify-content-center">
<div class="col-12 col-md-12 col-sm-9">
<div class="swiper-container swiper-pagination-bottom black-move blog-slider"
data-slider-options='{
"slidesPerView": 1,
"allowTouchMove": true,
"loop": false,
"spaceBetween": 30,
"autoplay": false,
"keyboard": {
"enabled": true,
"onlyInViewport": true
},
"breakpoints": {
"992": {
"slidesPerView": 3
},
"768": {
"slidesPerView": 2
}
},
"pagination": {
"el": ".swiper-pagination-recipes",
"clickable": true
}
}'>
<div class="swiper-wrapper">
{% for recipeRelated in recipesRelated %}
<div class="swiper-slide">
<div class="blog-post bg-white border-radius-10 overflow-hidden">
<div class="blog-post-images border-radius-10 overflow-hidden position-relative">
<a href="{{ path('app_recipes_detail', {'slug': recipeRelated.slug} ) }}">
<img class="d-block" src="{{ ('/uploads/images/ricette/' ~ recipeRelated.image) | imagine_filter('size_550_425') }}" alt="{{ recipeRelated.title }}">
</a>
</div>
<div class="post-details padding-20px-all">
<p class="post-sup-title C(la-rioja)">
<strong>
{{ ('recipes.filter.types.' ~ recipeRelated.type.name)|replace({' ': '_'})|trans({}, 'pages')|upper }}
</strong>
</p>
<a href="{{ path('app_recipes_detail', {'slug': recipeRelated.slug} ) }}" class="post-title w-100 d-block lg-w-100 margin-15px-bottom C(jewel)">
<strong>
{{ recipeRelated.title|upper }}
</strong>
</a>
<div class="separator-line-horrizontal-full bg-medium-gray margin-20px-tb"></div>
<div class="d-flex">
<div class="d-flex align-items-center margin-20px-right">
<div class="border-radius-50 d-flex margin-5px-right padding-5px-all text-white w-35px Bgc(la-rioja) H(35px)">
{% include 'partials/svg/_icon_chef.svg.twig' %}
</div>
<span>
{{ ('recipes.filter.difficulty.' ~ recipeRelated.difficulty)|replace({' ': '_'})|trans({}, 'pages') }}
</span>
</div>
<div class="d-flex align-items-center">
<div class="border-radius-50 d-flex margin-5px-right padding-5px-all text-white w-35px Bgc(la-rioja) H(35px)">
{% include 'partials/svg/_icon_clock_time.svg.twig' %}
</div>
<span>
{{ recipeRelated.time ~ ' ' ~ 'recipes.filter.time.default_value'|trans({}, 'pages')|lower }}
</span>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="swiper-pagination-recipes swiper-pagination"></div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% endblock %}