{#
component: care cards
heading: [{
title {string}: Titre de la gamme de soin
titleAnnex {string}: Titre annexe de la gamme de soin (au dessus du titre)
image {image}: Image de la gamme de soin
size: {
width: "1320",
height: "480"
}
text {string}: Texte de présentation de la gamme de soin
}]
items: [{
image {image}: Image de l'offre
size: {
width: "340",
height: "200"
}
title {string}: Nom de l'offre
duration {string}: Nom de l'offre
text {string}: Texte de l'offre
categoryTitle {string}: Catégorie de l'offre
price {string}: Prix final de l'offre
links: [{
icon {string}: Nom de l'icône du lien
text {string}: Texte du lien
to {string}: Lien
}]
}]
#}
{% set props = {
heading: null,
items: []
}|merge(props|default({})) %}
<section data-component="care-cards" class="CareCards-component">
<div class="l-container">
<div
class="l-row u-center">
{# Main #}
<div class="l-column CareCards-main">
<div
class="CareCards-header {% if props.heading.image is defined %} has-Img {% endif %} ">
{# Heading #}
{% include "component/heading.html.twig" with {
props: props.heading
} %}
{% if props.heading.image is defined %}
<div class="CareCards-header-image {% if props.heading.title is defined %} has-Subtitle {% endif %} ">
{% include "component/image.html.twig" with {
props: props.heading.image
} %}
{# {% include "component/picture.html.twig" with {
props: props.heading.image|merge({
srcWebp: (props.heading.image.src) ? asset(props.heading.image.src | imagine_filter('convert_img_to_webp')) : ''
})
} %} #}
</div>
{% endif %}
</div>
<div
class="l-row CareCards-cards slides-container {% if props.heading.image is defined %} has-Bg-Img {% endif %}">
{# Background pattern image #}
<div class="CareCards-backgroundImagePattern {% if props.heading.image is defined %} has-Img {% endif %} {% if props.items|length > 3 %} long-container {% endif %} ">
{# {% include "component/image.html.twig" with {
props: {
src: asset('build/images/pattern5.png')
}
} %} #}
{% include "component/picture.html.twig" with {
props: {
src: asset('build/images/pattern5.png')
}|merge({
srcWebp: asset(asset('build/images/pattern5.png') | imagine_filter('convert_img_to_webp'))
})
} %}
</div>
<div class="CareCards-cardsContainer {% if props.items|length < 2 %} small-cards{% endif %}" ref="container">
{% for item in props.items %}
{# Care card #}
<div class="l-column CareCards-card slide load" ref="items" data-index="0">
{% include "component/care_card.html.twig" with {
props: item
} %}
</div>
{% endfor %}
</div>
</div>
{% if props.heading.image is defined %}
<div class="CareCards-Slider-nav">
<div
class="CareCards-Slider-navButtons">
{# Previous button #}
<button ref="previousButton" class="OfferSlider-navButton OfferSlider-navPreviousButton NavPreviousButton">
{% include "component/svg.html.twig" with {
props: {
name: 'arrow-left'
}
} %}
{% include "component/svg.html.twig" with {
props: {
name: 'arrow-left'
}
} %}
</button>
<div class="CareCards-navBar">
<span class="CareCards-navBarProgress" ref="progressBar"></span>
</div>
{# Next button #}
<button ref="nextButton" class="OfferSlider-navButton OfferSlider-navNextButton NavNextButton">
{% include "component/svg.html.twig" with {
props: {
name: 'arrow-right'
}
} %}
{% include "component/svg.html.twig" with {
props: {
name: 'arrow-right'
}
} %}
</button>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</section>