templates/transportdefond/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}SVS - {{"TRANSPORT DE FOND"|trans}}{% endblock %}
  3. {% block body %}
  4.     <style>
  5.         {% include "transportdefond/transportdefond.css" %}
  6.     </style>
  7.     <!-- Element -->
  8.     <div class="element1">
  9.         {% include "transportdefond/4/refait.html.twig" %}
  10.     </div>
  11.     <!-- Element -->
  12.     <div class="appElement element2 element_transportdefond_about">
  13.         {% include "transportdefond/apropostransportdefond/index.html.twig" %}
  14.     </div>
  15.     <!-- Element -->
  16.     <div class="appElement element3 element_transportdefond_icons">
  17.         {% include "transportdefond/serviceIcons/index.html.twig" %}
  18.     </div>
  19.     <!-- Element -->
  20.     <div class="appElement element4 element_transportdefond_section">
  21.         <div class="position1"></div>
  22.         {% include "transportdefond/cadreSVS/element.html.twig" %}
  23.     </div>
  24. <!-- EXECUTE SCRIPT FOR TRANSPORTDEFOND PAGE -->
  25. <script>
  26.     // HERE @VAR IMPORTANT FOR THIS SCRIPT
  27.     var viewportHeight = window.innerHeight;
  28.     var hasTitleAboutRun = false; // Variable pour suivre si initTitle_transportdefond_about a déjà été exécutée.
  29.     var hasTitleIconsRun = false; // Variable pour suivre si initTitle_transportdefond_icons a déjà été exécutée.
  30.     var hasTitleSectionRun = false; // Variable pour suivre si initTitle_transportdefond_section a déjà été exécutée.
  31.     // HERE FUNCTION TITLE_transportdefond_ABOUT
  32.     function initTitle_transportdefond_about() {
  33.         var typed_transportdefond_about = new Typed('.typed_transportdefond_about', {
  34.             strings: ['{{"Transport sécurisée,"|trans}}<br><span>{{"garentir l\'intégrité des biens en mouvement"|trans}}</span>'],
  35.             typeSpeed: 20,
  36.             startDelay: 250,
  37.             backDelay: 2500,
  38.             loop: false,
  39.             cursorChar: '<i class="fas fa-circle"></i>',
  40.         });
  41.     }
  42.     // HERE FUNCTION TITLE_transportdefond_ICONS
  43.     function initTitle_transportdefond_icons() {
  44.         var typed_transportdefond_icons = new Typed('.typed_transportdefond_icons', {
  45.             strings: ['{{"Sécurité sans compromis"|trans}}<br><span>{{"l\'excellence de la planification à la satisfaction"|trans}}</span>'],
  46.             typeSpeed: 25,
  47.             startDelay: 250,
  48.             backDelay: 2500,
  49.             loop: false,
  50.             cursorChar: '<i class="fas fa-circle"></i>',
  51.         });
  52.     }
  53.     // HERE FUNCTION TITLE_transportdefond_SECTION
  54.     function initTitle_transportdefond_section() {
  55.         var typed_transportdefond_section = new Typed('.typed_transportdefond_section', {
  56.             strings: ['{{"Sécurité et Confidentialité"|trans}}<br><span>{{"un duo indispensable"|trans}}</span>'],
  57.             typeSpeed: 25,
  58.             startDelay: 250,
  59.             backDelay: 2500,
  60.             loop: false,
  61.             cursorChar: '<i class="fas fa-circle"></i>',
  62.         });
  63.     }
  64.     // HERE EXECUTION OF SCRIPT @HOME
  65.     window.addEventListener('scroll', function() {
  66.         // HERE @VAR FOR element_transportdefond_about ELEMENT RECTANGLE
  67.         var element_transportdefond_about = document.querySelector('.element_transportdefond_about');
  68.         var rectangle_about = element_transportdefond_about.getBoundingClientRect();
  69.         if (!hasTitleAboutRun && rectangle_about.top < viewportHeight && rectangle_about.bottom > 0) {
  70.             initTitle_transportdefond_about();
  71.             hasTitleAboutRun = true; // Marquer que la fonction a été exécutée.
  72.         }
  73.         // HERE @VAR FOR element_transportdefond_icons ELEMENT RECTANGLE
  74.         var element_transportdefond_icons = document.querySelector('.element_transportdefond_icons');
  75.         var rectangle_icons = element_transportdefond_icons.getBoundingClientRect();
  76.         if (!hasTitleIconsRun && rectangle_icons.top < viewportHeight && rectangle_icons.bottom > 0) {
  77.             initTitle_transportdefond_icons();
  78.             hasTitleIconsRun = true; // Marquer que la fonction a été exécutée.
  79.         }
  80.         // HERE @VAR FOR element_transportdefond_section ELEMENT RECTANGLE
  81.         var element_transportdefond_section = document.querySelector('.element_transportdefond_section');
  82.         var rectangle_section = element_transportdefond_section.getBoundingClientRect();
  83.         if (!hasTitleSectionRun && rectangle_section.top < viewportHeight && rectangle_section.bottom > 0) {
  84.             initTitle_transportdefond_section();
  85.             hasTitleSectionRun = true; // Marquer que la fonction a été exécutée.
  86.         }
  87.     });
  88. </script>
  89. {% endblock %}