bundles/Alea/AreabricksBundle/Resources/views/areas/cards1/view.html.twig line 1

Open in your IDE?
  1. {% set widthFirstColumn = pimcore_select('widthFirstColumn').getData() %}
  2. {% set widthSecondColumn = pimcore_select('widthSecondColumn').getData() %}
  3. {% set widthThirdColumn = pimcore_select('widthThirdColumn').getData() %}
  4. {% set widthFourthColumn = pimcore_select('widthFourthColumn').getData() %}
  5. {% set titleImage1TextColor = pimcore_select('titleImage1TextColor').getData() %}
  6. {% set titleImage2TextColor = pimcore_select('titleImage2TextColor').getData() %}
  7. {% set titleImage3TextColor = pimcore_select('titleImage3TextColor').getData() %}
  8. {% set titleImage4TextColor = pimcore_select('titleImage4TextColor').getData() %}
  9. {% set card1BackgroundColor = pimcore_select('card1BackgroundColor').getData() %}
  10. {% set card2BackgroundColor = pimcore_select('card2BackgroundColor').getData() %}
  11. {% set card3BackgroundColor = pimcore_select('card3BackgroundColor').getData() %}
  12. {% set card4BackgroundColor = pimcore_select('card4BackgroundColor').getData() %}
  13. {% set imageType1 = pimcore_select('imageType1').getData() %}
  14. {% set imageType2 = pimcore_select('imageType2').getData() %}
  15. {% set imageType3 = pimcore_select('imageType3').getData() %}
  16. {% set imageType4 = pimcore_select('imageType4').getData() %}
  17. <div class="row gx-0 gx-lg-20 gy-20">
  18.     {% if (widthFirstColumn != 0) %}
  19.         <div class="col-12 col-md-{{ widthFirstColumn }} ">
  20.             {{ pimcore_link('linkCard1') }}
  21.             {%  set linkCard1 = pimcore_link('linkCard1') %}
  22.             <a href="{{ linkCard1.getHref() ?: '#' }}" class="product home position-relative d-block overflow-hidden bg-{{ card1BackgroundColor }} text-center d-flex flex-column justify-content-center align-content-center">
  23.                 {% if (editmode or (not editmode and imageType1 == 'image'))%}
  24.                     <div class="image p-40 p-lg-80">
  25.                         {{ pimcore_image("image1") }}
  26.                     </div>
  27.                 {% endif %}
  28.                 {% if (not editmode and imageType1 == 'background')%}
  29.                     <div class="image background" >
  30.                         {{ pimcore_image("image1").thumbnail('cards1_image').html({
  31.                             'pictureAttributes': {
  32.                                 'class': ''
  33.                             },
  34.                             'imgAttributes': {
  35.                                 'class': 'w-100 h-100 object-fit-cover'
  36.                             }
  37.                         }) | raw  }}
  38.                     </div>
  39.                 {% endif %}
  40.                 <div class="position-absolute bottom-0 start-0 w-100 text-center px-20 py-5 my-40 z-1">
  41.                     <span class="h4 fw-normal text-center ps-5 position-relative text-{{ titleImage1TextColor }}">
  42.                         {{ pimcore_input("titleImage1",{
  43.                             "width": '100%',
  44.                             "placeholder": "Titolo Immagine 1"
  45.                         }) }}
  46.                     </span>
  47.                 </div>
  48.             </a>
  49.         </div>
  50.     {% endif %}
  51.     {% if (widthSecondColumn != 0) %}
  52.         <div class="col-12 col-md-{{ widthSecondColumn }} ">
  53.             {{ pimcore_link('linkCard2') }}
  54.             {%  set linkCard2 = pimcore_link('linkCard2') %}
  55.             <a href="{{ linkCard2.getHref() ?: '#' }}" class="product home position-relative d-block overflow-hidden bg-{{ card2BackgroundColor }} text-center d-flex flex-column justify-content-center align-content-center">
  56.                 {% if (editmode or (not editmode and imageType2 == 'image'))%}
  57.                     <div class="image p-40 p-lg-80">
  58.                         {{ pimcore_image("image2") }}
  59.                     </div>
  60.                 {% endif %}
  61.                 {% if (not editmode and imageType2 == 'background')%}
  62.                     <div class="image background" style="background-image: url({{  pimcore_image("image2").getSrc() }})">
  63.                     </div>
  64.                 {% endif %}
  65.                 <div class="position-absolute bottom-0 start-0 w-100 text-center px-20 py-5 my-40 z-1">
  66.                     <span class="h4 fw-normal text-center ps-5 position-relative text-{{ titleImage2TextColor }}">
  67.                         {{ pimcore_input("titleImage2",{
  68.                             "width": '100%',
  69.                             "placeholder": "Titolo Immagine 2"
  70.                         }) }}
  71.                     </span>
  72.                 </div>
  73.             </a>
  74.         </div>
  75.     {% endif %}
  76.     {% if (widthThirdColumn != 0) %}
  77.         <div class="col-12 col-md-{{ widthThirdColumn }} ">
  78.             {{ pimcore_link('linkCard3') }}
  79.             {%  set linkCard3 = pimcore_link('linkCard3') %}
  80.             <a href="{{ linkCard3.getHref() ?: '#' }}" class="product home position-relative d-block overflow-hidden bg-{{ card3BackgroundColor }} text-center d-flex flex-column justify-content-center align-content-center">
  81.                 {% if (editmode or (not editmode and imageType3 == 'image'))%}
  82.                     <div class="image p-40 p-lg-80">
  83.                         {{ pimcore_image("image3") }}
  84.                     </div>
  85.                 {% endif %}
  86.                 {% if (not editmode and imageType3 == 'background')%}
  87.                     <div class="image background" style="background-image: url({{  pimcore_image("image3").getSrc() }})">
  88.                     </div>
  89.                 {% endif %}
  90.                 <div class="position-absolute bottom-0 start-0 w-100 text-center px-20 py-5 my-40 z-1">
  91.                     <span class="h4 fw-normal text-center ps-5 position-relative text-{{ titleImage3TextColor }}">
  92.                         {{ pimcore_input("titleImage3",{
  93.                             "width": '100%',
  94.                             "placeholder": "Titolo Immagine 3"
  95.                         }) }}
  96.                     </span>
  97.                 </div>
  98.             </a>
  99.         </div>
  100.     {% endif %}
  101.     {% if (widthFourthColumn != 0) %}
  102.         <div class="col-12 col-md-{{ widthFourthColumn }} ">
  103.             {{ pimcore_link('linkCard4') }}
  104.             {%  set linkCard4 = pimcore_link('linkCard4') %}
  105.             <a href="{{ linkCard4.getHref() ?: '#' }}" class="product home position-relative d-block overflow-hidden bg-l{{ card4BackgroundColor }} text-center d-flex flex-column justify-content-center align-content-center">
  106.                 {% if (editmode or (not editmode and imageType4 == 'image'))%}
  107.                     <div class="image p-40 p-lg-80">
  108.                         {{ pimcore_image("image4") }}
  109.                     </div>
  110.                 {% endif %}
  111.                 {% if (not editmode and imageType4 == 'background')%}
  112.                     <div class="image background" style="background-image: url({{  pimcore_image("image4").getSrc() }})">
  113.                     </div>
  114.                 {% endif %}
  115.                 <div class="position-absolute bottom-0 start-0 w-100 text-center px-20 py-5 my-40 z-1">
  116.                     <span class="h4 fw-normal text-center ps-5 position-relative text-{{ titleImage4TextColor }}">
  117.                         {{ pimcore_input("titleImage4",{
  118.                             "width": '100%',
  119.                             "placeholder": "Titolo Immagine 4"
  120.                         }) }}
  121.                     </span>
  122.                 </div>
  123.             </a>
  124.         </div>
  125.     {% endif %}
  126. </div>