templates/component/care_cards.html.twig line 1

Open in your IDE?
  1. {#
  2.     component: care cards
  3.     heading: [{
  4.         title {string}: Titre de la gamme de soin
  5.         titleAnnex {string}: Titre annexe de la gamme de soin (au dessus du titre)
  6.         image {image}: Image de la gamme de soin
  7.             size: {
  8.                 width: "1320",
  9.                 height: "480"
  10.             }
  11.         text {string}: Texte de présentation de la gamme de soin
  12.     }]
  13.     items: [{
  14.         image {image}: Image de l'offre
  15.             size: {
  16.                 width: "340",
  17.                 height: "200"
  18.             }
  19.         title {string}: Nom de l'offre
  20.         duration {string}: Nom de l'offre
  21.         text {string}: Texte de l'offre
  22.         categoryTitle {string}: Catégorie de l'offre
  23.         price {string}: Prix final de l'offre
  24.         links: [{
  25.             icon {string}: Nom de l'icône du lien
  26.             text {string}: Texte du lien
  27.             to {string}: Lien
  28.         }]
  29.     }]
  30. #}
  31. {% set props = {
  32.     heading: null,
  33.     items: []
  34. }|merge(props|default({}))  %}
  35. <section data-component="care-cards" class="CareCards-component">
  36.     <div class="l-container">
  37.         <div
  38.             class="l-row u-center">
  39.             {# Main #}
  40.             <div class="l-column CareCards-main">
  41.                 <div
  42.                     class="CareCards-header  {% if props.heading.image is defined %} has-Img {% endif %} ">
  43.                     {# Heading #}
  44.                     {% include "component/heading.html.twig" with {
  45.                         props: props.heading
  46.                     } %}
  47.                     {% if props.heading.image is defined %}
  48.                         <div class="CareCards-header-image {% if props.heading.title is defined %} has-Subtitle {% endif %} ">
  49.                             {% include "component/image.html.twig" with {
  50.                                 props: props.heading.image
  51.                             } %}
  52.                             {# {% include "component/picture.html.twig" with {
  53.                                 props: props.heading.image|merge({
  54.                                     srcWebp: (props.heading.image.src) ? asset(props.heading.image.src | imagine_filter('convert_img_to_webp')) : ''
  55.                                 })
  56.                             } %} #}
  57.                         </div>
  58.                     {% endif %}
  59.                 </div>
  60.                 <div
  61.                     class="l-row CareCards-cards slides-container {% if props.heading.image is defined %} has-Bg-Img {% endif %}">
  62.                     {# Background pattern image #}
  63.                     <div class="CareCards-backgroundImagePattern {% if props.heading.image is defined %} has-Img  {% endif %} {% if props.items|length > 3 %} long-container {% endif %} ">
  64.                         {# {% include "component/image.html.twig" with {
  65.                             props: {
  66.                                 src: asset('build/images/pattern5.png')
  67.                             }
  68.                         } %} #}
  69.                         {% include "component/picture.html.twig" with {
  70.                             props: {
  71.                                 src: asset('build/images/pattern5.png')
  72.                             }|merge({
  73.                                 srcWebp: asset(asset('build/images/pattern5.png') | imagine_filter('convert_img_to_webp'))
  74.                             })
  75.                         } %}
  76.                     </div>
  77.                     <div class="CareCards-cardsContainer     {% if props.items|length < 2  %} small-cards{% endif %}" ref="container">
  78.                         {% for item in props.items %}
  79.                             {# Care card #}
  80.                             <div class="l-column CareCards-card slide load" ref="items" data-index="0">
  81.                                 {% include "component/care_card.html.twig" with {
  82.                                     props: item
  83.                                 } %}
  84.                             </div>
  85.                         {% endfor %}
  86.                     </div>
  87.                 </div>
  88.                 {% if props.heading.image is defined %}
  89.                     <div class="CareCards-Slider-nav">
  90.                         <div
  91.                             class="CareCards-Slider-navButtons">
  92.                             {# Previous button #}
  93.                             <button ref="previousButton" class="OfferSlider-navButton OfferSlider-navPreviousButton NavPreviousButton">
  94.                                 {% include "component/svg.html.twig" with {
  95.                                     props: {
  96.                                         name: 'arrow-left'
  97.                                     }
  98.                                 } %}
  99.                                 {% include "component/svg.html.twig" with {
  100.                                     props: {
  101.                                         name: 'arrow-left'
  102.                                     }
  103.                                 } %}
  104.                             </button>
  105.                             <div class="CareCards-navBar">
  106.                                 <span class="CareCards-navBarProgress" ref="progressBar"></span>
  107.                             </div>
  108.                             {# Next button #}
  109.                             <button ref="nextButton" class="OfferSlider-navButton OfferSlider-navNextButton NavNextButton">
  110.                                 {% include "component/svg.html.twig" with {
  111.                                     props: {
  112.                                         name: 'arrow-right'
  113.                                     }
  114.                                 } %}
  115.                                 {% include "component/svg.html.twig" with {
  116.                                     props: {
  117.                                         name: 'arrow-right'
  118.                                     }
  119.                                 } %}
  120.                             </button>
  121.                         </div>
  122.                     </div>
  123.                 {% endif %}
  124.             </div>
  125.         </div>
  126.     </div>
  127. </section>