templates/Accueil/album.html.twig line 1

Open in your IDE?
  1. {#
  2. /*
  3.  * Autheur:Marweni Marwen
  4.  * Email:Marwenimarwen63@gmail.com
  5.  * Date de création :13/1/2020
  6.  * modifier par :Salim abbessi
  7.  * Date de modification:15/01/2020
  8.  * Description: Page 5 sur 5
  9. */#}
  10. {% extends 'Accueil/layoutAccueil.html.twig' %}
  11. {% block LinksCss %}
  12.     {{ parent() }}
  13.     <link href="{{ asset ('css/Parent/css/layoutparent.css')}}" type="text/css" rel="stylesheet" >
  14.     <link href="{{ asset ('Accueil/css/album.css')}}" type="text/css" rel="stylesheet">
  15.     <link href="{{ asset ('css/product-gallery-optimizations.css')}}" type="text/css" rel="stylesheet">
  16.     <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
  17.     
  18.     <style>
  19.         /* Optimisations pour les galeries de produits */
  20.         .product-gallery-thumbnails {
  21.             display: flex;
  22.             flex-wrap: wrap;
  23.             gap: 8px;
  24.             margin-top: 15px;
  25.             justify-content: center;
  26.         }
  27.         
  28.         .product-gallery-thumbnails-mobile {
  29.             display: flex;
  30.             flex-wrap: wrap;
  31.             gap: 6px;
  32.             margin-top: 10px;
  33.             justify-content: center;
  34.         }
  35.         
  36.         .thumbnail-item, .thumbnail-item-mobile {
  37.             position: relative;
  38.             overflow: hidden;
  39.             border-radius: 8px;
  40.             box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  41.             transition: all 0.3s ease;
  42.         }
  43.         
  44.         .thumbnail-item:hover, .thumbnail-item-mobile:hover {
  45.             box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  46.             transform: translateY(-2px);
  47.         }
  48.         
  49.         .thumbnail-item img, .thumbnail-item-mobile img {
  50.             border-radius: 8px;
  51.             object-fit: cover;
  52.         }
  53.         
  54.         .photoAlbum {
  55.             border-radius: 12px;
  56.             box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  57.             transition: all 0.3s ease;
  58.         }
  59.         
  60.         .photoAlbum:hover {
  61.             transform: scale(1.02);
  62.             box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  63.         }
  64.         
  65.         .card-img-top {
  66.             border-radius: 12px 12px 0 0;
  67.             box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  68.         }
  69.         
  70.         /* Animation de chargement */
  71.         .loading-placeholder {
  72.             background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  73.             background-size: 200% 100%;
  74.             animation: loading 1.5s infinite;
  75.         }
  76.         
  77.         @keyframes loading {
  78.             0% { background-position: 200% 0; }
  79.             100% { background-position: -200% 0; }
  80.         }
  81.         
  82.         /* Responsive optimizations */
  83.         @media (max-width: 768px) {
  84.             .product-gallery-thumbnails {
  85.                 gap: 6px;
  86.             }
  87.             
  88.             .thumbnail-item {
  89.                 flex: 0 0 calc(25% - 6px);
  90.             }
  91.             
  92.             .thumbnail-item-mobile {
  93.                 flex: 0 0 calc(20% - 6px);
  94.             }
  95.         }
  96.         
  97.         @media (max-width: 480px) {
  98.             .thumbnail-item {
  99.                 flex: 0 0 calc(33.333% - 6px);
  100.             }
  101.             
  102.             .thumbnail-item-mobile {
  103.                 flex: 0 0 calc(25% - 6px);
  104.             }
  105.         }
  106.     </style>
  107. {% endblock %}
  108. {% block Head %}
  109.     {{ parent() }}
  110. {% endblock %}
  111. {% block Header %}
  112.     {% if app.user %}
  113.         
  114.         {{ render(controller('App\\Controller\\EspaceParentController::headerparenrt')) }}
  115.             <style> 
  116.     @media (max-width: 1200px) {
  117.   .imageLogo {
  118.     width: 145px !important;
  119.     height: 80.7px !important;
  120.     margin-left: 49px !important;
  121.     margin-top: -20px;
  122.     bottom: 0px !important;
  123. }
  124. }</style>
  125.     {% else %}
  126.         {{ render(controller('App\\Controller\\AccueilController::header')) }}
  127.         <style> 
  128.     @media (max-width: 1200px) {
  129.   .imageLogo {
  130.     width: 145px !important;
  131.     height: 80.7px !important;
  132.     margin-left: 49px !important;
  133.     margin-top: -20px;
  134.     bottom: 45px !important;
  135. }
  136. }</style>
  137.     {% endif %}
  138. {% endblock %}
  139. {% block Content %}
  140.     <div class="parent">
  141.         <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"style="z-index: 1000000;">
  142.             <div class="modal-dialog" role="document">
  143.                 <div class="modal-content">
  144.                     <div class="modal-header">
  145.                         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  146.                             <span aria-hidden="true">&times;</span>
  147.                         </button>
  148.                     </div>
  149.                     <div class="modal-body" style="text-align:center;" >
  150.                         <h3 class="textpop"> Veuillez d'abord vous connecter !
  151.                         </h3>
  152.                     </div>
  153.                     <div class="modal-footer" style="text-align:center;" >
  154.                         <a href="/">
  155.                             <button type="button" class="btn-primary">  OK </button> </a>
  156.                     </div>
  157.                 </div>
  158.             </div>
  159.         </div>
  160.         {% for produit in produit %}
  161.             {% if produit.labeleType!="Connexion" %}
  162.                 <div id="{{produit.labeleType|replace({' ': ''})}}" class="carousel slide" data-ride="carousel" style="display: none;">
  163.                     <div class="carousel-inner">
  164.                         <div class="carousel-item activeweb">
  165.                             <div class="row">
  166.                                 <div class="col-xl-6 col-lg-6 col-md-5 col-xs-5 col-sm-5" style="text-align:center">
  167.                                     <span onclick="this.parentElement.style.display = 'none'" class="closebtn" style="display:none">&times;</span>
  168.                                     <img id="expandedImg"  class="photoAlbum" 
  169.                                          src="{{(produit.attachements[0].idAttachement.path)|replace({'/upload/': '/upload/f_auto,q_auto,w_800/'}) }}" 
  170.                                          alt="{{ produit.labeleType }}"
  171.                                          loading="eager"
  172.                                          decoding="async">
  173.                                     <div id="imgtext"></div>
  174.                                     <div class="row overflow product-gallery-thumbnails">
  175.                                         {% for prod in produit.attachements  %}
  176.                                             {% if prod.statut=="pageProduit"  %}
  177.                                                 <div class="column thumbnail-item">
  178.                                                     <img src="{{prod.idAttachement.path|replace({'/upload/': '/upload/f_auto,q_auto,w_150,h_150,c_fill/'}) }}" 
  179.                                                          alt="{{ produit.labeleType }} - Photo {{ loop.index }}"
  180.                                                          loading="lazy"
  181.                                                          decoding="async"
  182.                                                          style="width:100%; cursor: pointer; transition: transform 0.3s ease, opacity 0.3s ease;"
  183.                                                          onmouseover="this.style.transform='scale(1.05)'"
  184.                                                          onmouseout="this.style.transform='scale(1)'"
  185.                                                          onclick="myFunction(this);">
  186.                                                 </div>
  187.                                             {% endif %}
  188.                                         {% endfor %}
  189.                                     </div>
  190.                                 </div>
  191.                                 <div class="col-xl-6 col-lg-6 col-md-7 col-xs-7 col-sm-7 divcont">
  192.                                     <div class="divRight">
  193.                                         <h2 class="titre">
  194.                                             {{ produit.labeleType}}
  195.                                         </h2>
  196.                                         <div class="groupeCarac">
  197.                                             <div class="row no-margin descriptionCarac">
  198.                                                 <img class="caraSVG" src="{{ asset('images/SVG/5sur5-caracteristiques.svg')}}">
  199.                                                 <h4 class="titreCaract">
  200.                                                     Caractéristiques produit
  201.                                                 </h4>
  202.                                             </div>
  203.                                             <div class="infoCarac">
  204.                                                 <p class="paragraphe"><span class="paraSpice">  {% if produit.description %} {{produit.description|nl2br}} {% endif %}</span></p>
  205.                                             </div>
  206.                                         </div>
  207.                                         <div class="groupeCarac">
  208.                                             <div class="row no-margin descriptionCarac">
  209.                                                 <img class="caraSVG" src="{{ asset('images/LesPlus5sur5.svg')}}">
  210.                                                 <h4 class="titreCaract">    Les plus produit  </h4>
  211.                                             </div>
  212.                                             <div class="infoCarac">
  213.                                                 <p class="paragraphe"><span class="paraSpice"> {{ produit.plusDescription|nl2br  }}</span></p>
  214.                                             </div>
  215.                                         </div>
  216.                                         <div class="groupeCarac">
  217.                                             <div class="row no-margin descriptionCarac">
  218.                                                 <img class="caraSVG" src="{{ asset('images/SVG/5sur5-tarifs.svg')}}">
  219.                                                 <h4 class="titreCaract">
  220.                                                     Tarif & Frais de port
  221.                                                 </h4>
  222.                                             </div>
  223.                                             <div class="infoCarac">
  224.                                                 <p class="paragraphe"><span class="paraSpice"> {{ produit.tarifs|nl2br  }}</span></p>
  225.                                             </div>
  226.                                         </div>
  227.                                         {% if app.user %}
  228.                                             {% if is_granted('ROLE_PARENT') %}
  229.                                                 <button  class="btn-primary dispnone"   onclick='location.href = "{{path('projet-Parent')}}";' >Commander</button>
  230.                                             {%endif%}
  231.                                             {% if is_granted('ROLE_ACC') %}
  232.                                                 <button  class="btn-primary dispnone"   onclick='location.href = "{{path('ProjetsAccompagnateur',{'id':sejour.id})}}";' >Commander</button>
  233.                                             {%endif%}
  234.                                         {%endif%}
  235.                                         {% if not app.user %}
  236.                                             <button  class="btn-primary dispnone" data-toggle="modal" data-target="#exampleModal">Commander</button>
  237.                                         {%endif%}
  238.                                     </div>
  239.                                 </div>
  240.                             </div>
  241.                         </div>
  242.                         <a class="carousel-control-prev"  onclick="plusSlides(-1)" role="button" data-slide="prev">
  243.                             <span  aria-hidden="true" ><img class="chev" src="{{ asset('images/300ppi/5sur5-fleche gauche.png')}}"></span>
  244.                         </a>
  245.                         <a class="carousel-control-next" onclick="plusSlides(1)" role="button" data-slide="next">
  246.                             <img class="chev" src="{{ asset('images/300ppi/5sur5-fleche droite.png')}}">
  247.                         </a>
  248.                     </div>
  249.                 </div>
  250.             {% endif %}
  251.         {% endfor %}
  252.         <div class="activemobile">
  253.             <div class="slider autoplay">
  254.                 {% for produit in produit %}
  255.                     {% if produit.labeleType!="Connexion" %}
  256.                         <div class="col-sm-12 col-md-12 no-padding">
  257.                             <div class="card">
  258.                                 <span onclick="this.parentElement.style.display = 'none'" class="closebtn" style="display:none">&times;</span>
  259.                                 <img id="expandedImg2" class="card-img-top" 
  260.                                      src="{{(produit.attachements[0].idAttachement.path)|replace({'/upload/': '/upload/f_auto,q_auto,w_600/'}) }}" 
  261.                                      alt="{{ produit.labeleType }}"
  262.                                      loading="eager"
  263.                                      decoding="async">
  264.                                 <div id="imgtext2"></div>
  265.                                 <div class="row overflow product-gallery-thumbnails-mobile">
  266.                                     {% for prod in produit.attachements  %}
  267.                                         {% if prod.statut=="pageProduit"  %}
  268.                                             {% if prod.idAttachement.path != produit.attachements[0].idAttachement.path %}
  269.                                                 <div class="column thumbnail-item-mobile">
  270.                                                     <img src="{{prod.idAttachement.path|replace({'/upload/': '/upload/f_auto,q_auto,w_120,h_120,c_fill/'}) }}" 
  271.                                                          alt="{{ produit.labeleType }} - Photo {{ loop.index }}"
  272.                                                          loading="lazy"
  273.                                                          decoding="async"
  274.                                                          style="width:100%; cursor: pointer; transition: transform 0.3s ease, opacity 0.3s ease;"
  275.                                                          onmouseover="this.style.transform='scale(1.05)'"
  276.                                                          onmouseout="this.style.transform='scale(1)'"
  277.                                                          onclick="myFunction2(this);">
  278.                                                 </div>
  279.                                             {% endif %}
  280.                                         {% endif %}
  281.                                     {% endfor %}
  282.                                 </div>
  283.                                 <div class="card-body">
  284.                                     <div class="descri1">
  285.                                         <h1 class="card-title">
  286.                                             {{ produit.labeleType}}
  287.                                         </h1>
  288.                                         <div class="card-text">
  289.                                             <img class="caraSVG" src="{{ asset('images/SVG/5sur5-caracteristiques.svg')}}">
  290.                                             <h4 class="titreCaract">
  291.                                                 Caracteristiques produit
  292.                                             </h4>
  293.                                             <p class="card-text1">
  294.                                                 <span class="paraSpice"> {% if produit.description %} {{produit.description|nl2br}} {% endif %}</span>
  295.                                             </p>
  296.                                             <div class="card-text">
  297.                                                 <img class="caraSVG"  src="{{ asset('images/LesPlus5sur5.svg')}}">
  298.                                                 <h4 class="titreCaract">
  299.                                                     Les plus produit 
  300.                                                 </h4>
  301.                                                 <p class="card-text1"><span class="paraSpice"> {{ produit.plusDescription|nl2br  }}</span></p>
  302.                                             </div>
  303.                                             <div class="card-text">
  304.                                                 <img class="caraSVG" src="{{ asset('images/SVG/5sur5-tarifs.svg')}}">
  305.                                                 <h4 class="titreCaract">
  306.                                                     Tarif & Frais de port
  307.                                                 </h4>
  308.                                                 <p class="card-text1"><span class="paraSpice">{{ produit.tarifs|nl2br  }}</span></p>
  309.                                                 {% if app.user %}
  310.                                                     {% if is_granted('ROLE_PARENT') %}
  311.                                                         <button  class="dispnone btn-primary"   onclick='location.href = "{{path('projet-Parent')}}";' >Commander</button>
  312.                                                     {%endif%}
  313.                                                     {% if is_granted('ROLE_ACC') %}
  314.                                                         <button  class=" dispnone btn-primary "   onclick='location.href = "{{path('ProjetsAccompagnateur',{'id':sejour.id})}}";' >Commander</button>
  315.                                                     {%endif%}
  316.                                                 {%else%}
  317.                                                     <button  class=" dispnone btn-primary" data-toggle="modal" data-target="#exampleModal">Commander</button>
  318.                                                 {%endif%}           
  319.                                             </div>
  320.                                         </div>
  321.                                     </div>
  322.                                 </div>
  323.                             </div>
  324.                         </div>
  325.                     {% endif %}
  326.                 {% endfor %}
  327.             </div>
  328.         </div>
  329.     </div>
  330. {% endblock %}
  331. {% block Footer %}
  332.     {{ parent() }}
  333. {% endblock %}
  334. {% block javascript %}
  335.     {{ parent() }}
  336.     <script>
  337.         function myFunction(imgs) {
  338.             const expandedImg = document.getElementById("expandedImg");
  339.             const imgText = document.getElementById("imgtext");
  340.             
  341.             // Animation de transition
  342.             expandedImg.style.opacity = '0.7';
  343.             expandedImg.style.transform = 'scale(0.95)';
  344.             
  345.             setTimeout(() => {
  346.                 // Remplacer l'image avec la version haute qualité
  347.                 const highQualitySrc = imgs.src.replace('/w_150,h_150,c_fill/', '/w_800,f_auto,q_auto/');
  348.                 expandedImg.src = highQualitySrc;
  349.                 expandedImg.alt = imgs.alt;
  350.                 imgText.innerHTML = imgs.alt;
  351.                 
  352.                 // Animation de retour
  353.                 expandedImg.style.opacity = '1';
  354.                 expandedImg.style.transform = 'scale(1)';
  355.             }, 150);
  356.         }
  357.     </script>
  358.     <script>
  359.         $('.autoplay').slick({
  360.             slidesToShow: 1,
  361.             slidesToScroll: 1,
  362.             autoplay: true,
  363.             autoplaySpeed: 3000,
  364.         });
  365.             </script> 
  366.     <script>
  367.         function myFunction2(imgs) {
  368.             const expandedImg = document.getElementById("expandedImg2");
  369.             const imgText = document.getElementById("imgtext2");
  370.             
  371.             // Animation de transition
  372.             expandedImg.style.opacity = '0.7';
  373.             expandedImg.style.transform = 'scale(0.95)';
  374.             
  375.             setTimeout(() => {
  376.                 // Remplacer l'image avec la version haute qualité
  377.                 const highQualitySrc = imgs.src.replace('/w_120,h_120,c_fill/', '/w_600,f_auto,q_auto/');
  378.                 expandedImg.src = highQualitySrc;
  379.                 expandedImg.alt = imgs.alt;
  380.                 imgText.innerHTML = imgs.alt;
  381.                 
  382.                 // Animation de retour
  383.                 expandedImg.style.opacity = '1';
  384.                 expandedImg.style.transform = 'scale(1)';
  385.             }, 150);
  386.         }
  387.     </script>
  388.     <script>
  389.         var slideIndex = 1;
  390.         $(document).ready(function ()
  391.         {
  392.         {% if showArt == "ALL" %}
  393.            var slides = document.getElementsByClassName("slide");
  394.            slides[slideIndex - 1].style.display = "block";
  395.         {% else %}
  396.                     $id = "{{showArt|replace({' ': ''})}}";
  397.                     $('.slide').each(function () {
  398.                         $(this).css('display', 'none');
  399.                     })
  400.                     $('#' + $id).css('display', 'block');
  401.         {% endif %}
  402.                 });
  403.                 //
  404.                 //
  405.                 // showSlides(slideIndex);
  406.                 // Next/previous controls
  407.                 function plusSlides(n) {
  408.                     showSlides(slideIndex += n);
  409.                 }
  410.                 // Thumbnail image controls
  411.                 function currentSlide(n) {
  412.                     showSlides(slideIndex = n);
  413.                 }
  414.                 function showSlides(n) {
  415.                     var i;
  416.                     var slides = document.getElementsByClassName("slide");
  417.                     if (n > slides.length) {
  418.                         slideIndex = 1
  419.                     }
  420.                     if (n < 1) {
  421.                         slideIndex = slides.length
  422.                     }
  423.                     for (i = 0; i < slides.length; i++) {
  424.                         slides[i].style.display = "none";
  425.                     }
  426.                     slides[slideIndex - 1].style.display = "block";
  427.                 }
  428.                 function showSlidePreci(n) {
  429.                     console.log(n);
  430.                     var idSLide = "";
  431.                     $('.slide').each(function () {
  432.                         $(this).css('display', 'none');
  433.                         if ($(this).attr('id').indexOf(n) !== -1) {
  434.                             idSLide = $(this).attr('id');
  435.                         }
  436.                         $('#' + idSLide).css('display', 'block');
  437.                     });
  438.                 }
  439.     </script>
  440.     <script src="{{ asset('js/product-gallery-optimizations.js') }}"></script>
  441. {% endblock %}