templates/alkanbari/_includes/footer.html.twig line 1

Open in your IDE?
  1.     
  2.     {% if editmode %}
  3.     <div class="pim-tooltip">
  4.       <div class="row">
  5.         <div class="col-9">
  6.           <div class="tooltip-description">
  7.             Footer Hintergrundbild:
  8.           </div>
  9.           {{ pimcore_relation("footer-bg-image", {"types":["asset"],"subtypes":{"asset":["image"]},"reload":true} ) }}
  10.         </div>
  11.         <div class="col-3">
  12.           <div class="tooltip-description">
  13.             Footer Schriftfarbe:
  14.           </div>
  15.           {{ pimcore_select("footer-font-color", {
  16.               "store" : [  
  17.                   ['', 'Standard'],
  18.                   ['white', 'Hell'],
  19.                   ['dark', 'Dunkel']
  20.               ],
  21.               "defaultValue" : "",
  22.               "reload" : true
  23.           }) }}
  24.         </div>
  25.       </div>
  26.     </div>
  27.     {% endif %}
  28.     {% set bgImage = pimcore_relation('footer-bg-image').getElement() is instanceof('\\Pimcore\\Model\\Asset') ? 'background-image:url(https://'~config.websiteDomain~pimcore_relation('footer-bg-image').getElement()~')' : '' %}    
  29.     <footer class="bg-dark p-5 {{ pimcore_select('footer-font-color').getData }}" style="{{bgImage}}">
  30.       <div class="container">
  31.         <div class="row">
  32.           <div class="col-12 col-sm-12 col-lg-4">
  33.             {{ pimcore_inc('/alkanbari/Home/footer/footer-left') }}
  34.           </div>
  35.           <div class="col-12 col-sm-6 col-lg-4">
  36.             {{ pimcore_inc('/alkanbari/Home/footer/footer-center') }} 
  37.           </div>
  38.           <div class="col-12 col-sm-6 col-lg-4">
  39.             {{ pimcore_inc('/alkanbari/Home/footer/footer-right') }}  
  40.           </div>
  41.         </div>
  42.         <div class="copyright">
  43.           <div class="row">
  44.             <div class="col-12 text-center">
  45.               &copy; 2023 {{'alkanbari-contact-company'|trans}} | {{'alkanbari-contact-name'|trans}} | <a href="#" data-bs-toggle="modal" data-bs-target="#modalImpressum">{{ 'alkanbari-impressum'|trans }}</a> | <a href="#" data-bs-toggle="modal" data-bs-target="#modalDatenschutz">{{ 'alkanbari-datenschutz'|trans }}</a>
  46.             </div>
  47.           </div>
  48.         </div>
  49.       </div>
  50.       <a class="scroll-top" href="#start"><span class="lsf">up</span></a>
  51.     </footer>
  52.     <!-- Modals -->
  53.     <div class="modal fade" id="modalImpressum" tabindex="-1" aria-labelledby="modalImpressumLabel" aria-hidden="true">
  54.       <div class="modal-dialog">
  55.         <div class="modal-content">
  56.           <div class="modal-header">
  57.             <h5 class="modal-title" id="modalImpressumLabel">{{ 'alkanbari-impressum'|trans }}</h5>
  58.             <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  59.           </div>
  60.           <div class="modal-body">
  61.             {{ pimcore_inc(config.siteImprintPath) }}
  62.           </div>
  63.           <div class="modal-footer">
  64.           </div>
  65.         </div>
  66.       </div>
  67.     </div>
  68.     
  69.     <div class="modal fade" id="modalDatenschutz" tabindex="-1" aria-labelledby="modalDatenschutzLabel" aria-hidden="true">
  70.       <div class="modal-dialog">
  71.         <div class="modal-content">
  72.           <div class="modal-header">
  73.             <h5 class="modal-title" id="modalDatenschutzLabel">{{ 'alkanbari-datenschutz'|trans }}</h5>
  74.             <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  75.           </div>
  76.           <div class="modal-body">
  77.             {{ pimcore_inc(config.sitePrivacyPath) }}
  78.           </div>
  79.           <div class="modal-footer">
  80.           </div>
  81.         </div>
  82.       </div>
  83.     </div>
  84.     
  85.     <!-- let's start javascripting -->
  86.     <script src="/themes/{{ config.template }}/js/jquery-3.6.0.min.js"></script>
  87.     <script src="/themes/{{ config.template }}/js/bootstrap.bundle.min.js"></script>
  88.     <script src="/themes/{{ config.template }}/js/jquery-scrollto.js"></script>
  89.     <script src="/themes/{{ config.template }}/js/jquery.inview.min.js"></script>
  90.     <script src="/themes/{{ config.template }}/js/jquery.fancybox.min.js"></script>
  91.     <script>
  92.     
  93.     $().ready(function() {
  94.     
  95.       // get enviroment dimensions
  96.       var viewportHeight  = $(window).height();
  97.       var viewportWidth   = $(window).width();
  98.       var displayHeight   = $('html').height();     
  99.       // re-adjust on resize ...  
  100.       $(window).resize(function() 
  101.       {
  102.           var viewportHeight  = $(window).height();
  103.           var viewportWidth   = $('html').width();           
  104.       });
  105.       // navbar
  106.       $('#nav-icon3').click(function(){
  107.             $(this).toggleClass('open');
  108.         });
  109.       $('.navbar .nav-link').click(function() {
  110.           $('.navbar-collapse').removeClass('show');
  111.           $('#nav-icon3').removeClass('open');
  112.       });
  113.       
  114.       // set gutters
  115.       $('.container-fluid.no-padding').addClass('gx-0');
  116.       // background images
  117.       $('.section-bg-image').each(function() {
  118.           var img = $(this).data('src');
  119.           $(this).css("background-image", "url('" + img + "')");
  120.       });
  121.       // scroll to
  122.       $('a[href*=\\#]').bind("click", function(event) {
  123.               event.preventDefault();
  124.               var target = $(this).attr("href");  
  125.           
  126.           if (!target.match(/slider(.*)/i)) { 
  127.                   $('html,body').animate({
  128.                        scrollTop: $(target).offset().top
  129.                   }, 2000);
  130.           }       
  131.       });
  132.       
  133.       $('.btn-continue').click(function() {
  134.           $(this).addClass('animate__animated animate__zoomOut');
  135.       });
  136.       // top bar
  137.       var minified = false;
  138.       $(window).scroll(function() {
  139.           var y = $(window).scrollTop();
  140.           // console.log('Y: ' + y);
  141.           if ( y > viewportHeight*.75 )
  142.           {             
  143.               if ( minified == false )
  144.               {
  145.                   $('.site-logo').addClass('logo-minified');
  146.                   $('.navbar').addClass('navbar-minified');
  147.                   minified = true;
  148.               }              
  149.           }
  150.           else
  151.           {
  152.               $('.site-logo').removeClass('logo-minified');
  153.               $('.navbar').removeClass('navbar-minified');
  154.               minified = false;
  155.           }
  156.       });
  157.       
  158.       // gallery
  159.       $('.gallery-image').mouseover(function() {
  160.           var e = $(this).find('.icon');
  161.           e.fadeIn();
  162.       }).mouseleave(function() {
  163.           var e = $(this).find('.icon');
  164.           e.fadeOut();    
  165.       });
  166.       // animate on scroll
  167.       // animate on scroll
  168.       $('.scroll-animated').bind('inview', function(event, visible) {
  169.           if ( visible ) { 
  170.               $(this).animate({
  171.                   top: '0px',
  172.                   opacity: 1
  173.               }, 600, 'swing');
  174.           }
  175.       });
  176.       
  177.       // init animated
  178.       $('.animated').each(function() {
  179.           var a = $(this).data('animation');
  180.           $(this).addClass(a);
  181.       });
  182.       
  183.       $('.animate__blurred').hide().fadeIn(4000);
  184.       
  185.       // animate
  186.       $('.animated').bind('inview', function(event, visible) {
  187.           if ( visible ) { 
  188.               var a = $(this).data('animation'); 
  189.               var d = ($(this).data('delay') != undefined && $(this).data('delay') != '') ? parseInt($(this).data('delay')) : 100;
  190.               var t = ($(this).data('timing') != undefined && $(this).data('timing') != '') ? parseInt($(this).data('timing')) : 500;
  191.               switch(a) {
  192.                   case 'animate__fadeIn' :
  193.                       $(this).delay(d).animate({
  194.                           opacity: 1
  195.                       }, t);
  196.                       break;
  197.                   case 'animate__slideInUp' :
  198.                       $(this).delay(d).animate({
  199.                           top: '0px',
  200.                           opacity: 1
  201.                       }, t);   
  202.                       break; 
  203.                   case 'animate__slideInLeft' :
  204.                       $(this).delay(d).animate({
  205.                           left: '0px',
  206.                           opacity: 1
  207.                       }, t);   
  208.                       break; 
  209.                   case 'animate__slideInRight' :
  210.                       $(this).delay(d).animate({
  211.                           right: '0px',
  212.                           opacity: 1
  213.                       }, t);   
  214.                       break; 
  215.               };
  216.           }
  217.       });
  218.       // check form input
  219.       var formComplete = false;
  220.       $('.check-finput').keyup(function() {
  221.           $('.check-finput').each(function() {          
  222.               // console.log('Check input: ' + $(this).attr('name') + ' -> ' + $(this).val() );          
  223.               if ( $(this).attr('type')=='checkbox' && $(this).prop('checked')=='1' )
  224.                   formComplete = true;
  225.               else if ( $(this).val() != '' )
  226.                   formComplete = true;
  227.               else
  228.                   formComplete = false;                  
  229.           });         
  230.           if ( formComplete === true )
  231.               $('#submitBookingForm').animate({opacity:1}, 300);  // fadeIn();
  232.           else
  233.               $('#submitBookingForm').animate({opacity:0}, 300);  // fadeOut();                        
  234.       });
  235.       
  236.       // submit form data
  237.       $('#submitBookingForm').click(function() {          
  238.           var formToken = $('#contactToken').val();
  239.           var formFirstname = $('#contactFirstname').val();
  240.           var formLastname = $('#contactLastname').val();
  241.           var formEmail = $('#contactEmail').val();
  242.           var formEmailAddress = $('#emailAddress').val();
  243.           var formMessage = $('#contactMessage').val();
  244.           
  245.           let formId = 'bookingForm';
  246.           let formFields = $('#'+formId).find('.check-finput').toArray();
  247.           let formQueryString = {};
  248.           for (i = 0; i < formFields.length; i += 1) {
  249.               console.log('Parse element ' + formFields[i].getAttribute('name') + ' -> value: ' + formFields[i].value);
  250.               input_id = formFields[i].getAttribute('name');
  251.               input_value = formFields[i].value;              
  252.               formQueryString[input_id] = input_value;      
  253.           } 
  254.           
  255.           $.ajax({
  256.               url : "/contact/alkanbari/sendmail",
  257.               type : "POST",
  258.               data : formQueryString,
  259.               dataType : "text",
  260.               success : function(data, jqXHR) {
  261.                   
  262.                   console.log('Response: ' + data);                  
  263.                   var r = data;
  264.                   var s = JSON.parse(r);
  265.                   
  266.                   console.log('Json: ' + s);                                   
  267.                   if (s.code == '400')
  268.                       $('#submitContactMessage').html(s.message).fadeIn();
  269.                   else
  270.                       $('#bookingForm').html(s.message);  
  271.               },
  272.               error : function(XMLHttpRequest, textStatus, errorThrown) {
  273.                   $('#bookingForm').html('Es ist ein Fehler aufgetreten. Bitte kontaktieren Sie uns telefonisch oder per E-Mail');
  274.               }
  275.           });           
  276.       });    
  277.       
  278.     });
  279.     
  280.     </script>
  281.     
  282.     <script language="javascript">
  283.       function setCookie(cname, cvalue, exdays) {
  284.         var d = new Date();
  285.         d.setTime(d.getTime() + (exdays*24*60*60*1000));
  286.         var expires = "expires="+ d.toUTCString();
  287.         document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
  288.       }
  289.       
  290.       function getCookie(c_name) {
  291.         var i, x, y, ARRcookies = document.cookie.split(";");
  292.         for (i = 0; i < ARRcookies.length; i++) {
  293.           x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
  294.           y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
  295.           x = x.replace(/^\s+|\s+$/g, "");
  296.           if (x == c_name) {
  297.               return unescape(y);
  298.           }
  299.         }
  300.       }
  301.       function validateEmail(email)
  302.       {
  303.           // var mailformat = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
  304.           if( email.match( /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ ) )         
  305.               return true;
  306.           else
  307.               return false;
  308.       }
  309.       
  310.       {% if loadOSM is defined and loadOSM == true %}
  311.       let map = L.map('osmMap', {center: [50.2039, 9.8878], zoom: 7, });
  312.       L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
  313.           maxZoom: 19,
  314.           attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
  315.       }).addTo(map);
  316.       {% for i,marker in locations %}
  317.       let marker{{i}} = L.marker([{{marker.getGeoData()|replace({";":","})}}],{'title':'{{marker.getName()}}'}).addTo(map).bindPopup('{{marker.getDescription()|replace({"\n":", "})|striptags}}');
  318.       {% endfor %}
  319.       
  320.       // let latlngs = [[49.689429253827676, 8.980653446951512], [49.65004724900781, 8.9808893017223], [49.6502763063044, 9.018390210277586], [49.69064989162164, 9.019097774589948]];
  321.       // let polygon = L.polygon(latlngs, {color: 'blue'}).addTo(map).bindPopup('Gebiet Michelstadt <a href="/praxiseinrichtung" target="_blank">Mehr erfahren</a>');
  322.       // zoom the map to the polygon
  323.       // map.fitBounds(polygon.getBounds());
  324.       
  325.       setTimeout(() => {
  326.           map.invalidateSize();
  327.       }, 100)
  328.       {% endif %}
  329.     
  330.     </script>