src/Aviatur/TwigBundle/Resources/views/aviatur/Flux/App/front_blog.html.twig line 1

Open in your IDE?
  1. {% extends twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/App/base.html.twig') %}
  2. {# head #}
  3. {% if pdfGenerator is not defined %}
  4. {% block head_title %}{% if seo_title is defined %}{{seo_title}}{% else %}Tiquetes Baratos, Hoteles, Paquetes Turísticos y Viajes | Aviatur{% endif %}{% endblock head_title %}
  5. {% block head_description_content %}{% if seo_description is defined %}{{seo_description}}{% else %}Agencia de viajes Aviatur. Encuentra ofertas de vuelos, hoteles, paquetes turísticos, cruceros, autos y más. Tiquetes baratos Nacionales e Internacionales{% endif %}{% endblock head_description_content %}
  6. {% block head_meta_title %}{% if seo_meta_title is defined %}{{seo_meta_title}}{% endif %}{% endblock head_meta_title %}
  7.     {% if is_mobile() %}
  8.         {% block head_viewport %}
  9.             <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
  10.             <link rel="apple-touch-icon" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-iphone.png')) }}">
  11.             <link rel="apple-touch-icon" sizes="76x76" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-ipad.png')) }}">
  12.             <link rel="apple-touch-icon" sizes="120x120" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-iphone-retina.png')) }}">
  13.             <link rel="apple-touch-icon" sizes="152x152" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-ipad-retina.png')) }}">
  14.             <link rel="apple-touch-icon" sizes="180x180" href="{{ absolute_url(asset('assets/'~ agency_folder.assetStyle() ~'/img/ios/touch-icon-iphone-plus-retina.png')) }}">
  15.         {% endblock head_viewport %}
  16.     {% endif %}
  17. {% endif %}
  18. {#{% block stylesheets %}
  19.     <link type="text/css" rel="stylesheet" href="{{ absolute_url(asset('assets/common_assets/css/vendor/owl-carousel/owl.carousel.css')) }}"/>
  20.     <link type="text/css" rel="stylesheet" href="{{ absolute_url(asset('assets/common_assets/css/vendor/owl-carousel/owl.theme.css')) }}"/>
  21.     {{ parent() }}
  22. {% endblock stylesheets %}#}
  23. {# END head #}
  24. {% block head_meta_label %}
  25.     <meta name="robots" content="index, follow">
  26. {% endblock head_meta_label %}
  27. {% block base_content %}
  28.     {% if pdfGenerator is not defined %}
  29.         <!--[if (!IE)|(gt IE 8)]><!-->
  30.         {% block header %}
  31.             {% set linkHeader = path('homepage') %}
  32.             {% set specialStyle = '' %}
  33.             {% set classMainNav = '' %}
  34.             {% set logoVersion = '' %}
  35.             <header class="page-head{{ specialStyle }}">
  36.                 <div class="page-head__bg-container hidden-palm">
  37.                    <div class="page-head__bg__img bg-img_blog js-headerImg"></div>
  38.                 </div>
  39.                 {% if app.session.has('operatorId') != 1 %}
  40.                     {% include twig_exists('@AviaturTwig/'~ agency_folder.twigStyle() ~'/App/header_blog.html.twig') %}
  41.                     {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/Blog/Includes/modalBlog.html.twig') %}
  42.                 {% endif %}
  43.                 {% block searcher_header %}
  44.                 {% endblock %}
  45.             </header>
  46.         {% endblock %}
  47.     {% else %}
  48.         <section>
  49.         </section>
  50.     {% endif %}
  51.     {% set displayState = '' %}
  52.     {% if 'aviatur_general_homepage' in app.request.attributes.get('_route') and not app.request.query.has('anchor') %}
  53.         {% set displayState = 'hidden-palm' %}
  54.     {% endif %}
  55.     <div class="page__body js-page-body-toggle pt-[17px]{{ displayState }}">
  56.         <div class="ajax-loader spinOverlay sp-offset--big js-loadingChangeCoin" style="display: none;"></div>
  57.         {% block body %}{% endblock body %}
  58.         <div class="hidden-portable">
  59.             {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/App/needHelp.html.twig') %}
  60.         </div>
  61.     </div>
  62.     {% if pdfGenerator is not defined %}
  63.         {% if app.session.has('operatorId') != 1 and app.session.has('whitemark') != 1 %}
  64.             {% block footer %}
  65.                 {% include twig_exists('@AviaturTwig/'~ agency_folder.twigStyle() ~'/App/footer_blog.html.twig') %}
  66.             {% endblock footer %}
  67.         {% endif %}
  68.         {% block modal %}
  69.             {{ parent()}}
  70.             {% include twig_exists('@AviaturTwig/'~ agency_folder.twigFlux() ~'/General/Components/callUsModal.html.twig') %}
  71.         {% endblock modal %}
  72.     {% endif %}
  73. {% endblock base_content %}
  74. {% block javascripts_bottom %}
  75.     {{ parent() }}
  76.     <script>
  77.         let miBoton = document.getElementById("miBoton");
  78.         let help = document.getElementById("needHelp");
  79.         let iconCall = document.getElementById("iconCall");
  80.         let openCall = document.getElementById("openCall");
  81.         let callDarkOpen = document.getElementById("callDarkOpen");
  82.         let callMenu = document.getElementById("callMenu");
  83.         let loLlamamos = document.getElementById("loLlamamos");
  84.         let loLlamamos_soporte_linea = document.getElementById("loLlamamos_soporte_linea");
  85.         let loLlamamos_palm = document.getElementById("loLlamamos_palm");
  86.         let loLlamamos_palm_soporte_linea = document.getElementById("loLlamamos_palm_soporte_linea");
  87.         let wsp = document.getElementById("wsp");
  88.         let comuniquese = document.getElementById("comuniquese");
  89.         let comuniquese_palm = document.getElementById("comuniquese_palm");
  90.         let showLoLlamamos = document.getElementById("showLoLlamamos");
  91.         let divFormLoLlamamos = document.getElementById("divFormLoLlamamos");
  92.         let formLoLlamamos = document.getElementById("formLoLlamamos");
  93.         let resultLoLlamamos = document.getElementById("resultLoLlamamos");
  94.         let closeModal = document.getElementById("closeModal");
  95.         let okCloseModal = document.getElementById("okCloseModal");
  96.         let showComuniquese = document.getElementById("showComuniquese");
  97.         let closeModalComuniquese = document.getElementById("closeModalComuniquese");
  98.         let screenWidth = window.innerWidth;
  99.         //boton principal ayuda
  100.         let activeCall = false;
  101.         miBoton.addEventListener("click", () => {
  102.             activeCall = !activeCall;
  103.             if (activeCall) {
  104.                 miBoton.classList.add("call-btn--close_active");
  105.                 help.style.display = "none";
  106.                 iconCall.setAttribute("width", "38")
  107.                 iconCall.setAttribute("height", "30")
  108.                 iconCall.style.viewBox = "0 -2 20 23"
  109.                 openCall.classList.add("call_bg--open")
  110.                 callDarkOpen.classList.add("call_bg-dark__open")
  111.                 callMenu.classList.add("call-menu--active")
  112.             } else {
  113.                 miBoton.classList.remove("call-btn--close_active");
  114.                 help.style.display = "block";
  115.                 iconCall.setAttribute("width", "22")
  116.                 iconCall.setAttribute("height", "20")
  117.                 openCall.classList.remove("call_bg--open")
  118.                 callDarkOpen.classList.remove("call_bg-dark__open")
  119.                 callMenu.classList.remove("call-menu--active")
  120.             }
  121.         });
  122.         wsp.addEventListener("click", () => {
  123.             if (screenWidth < 723) {
  124.                 wsp.setAttribute("href", "https://api.whatsapp.com/send?phone=5713821616&text=")
  125.             } else {
  126.                 wsp.setAttribute("href", "https://web.whatsapp.com/send?phone=5713821616&amp;text=")
  127.             }
  128.         })
  129.         // modal lo llamamos
  130.         let modalLoLlamamos = false
  131.         let openModalLollamamos = () =>{
  132.             modalLoLlamamos = !modalLoLlamamos;
  133.                 if (modalLoLlamamos) {
  134.                     showLoLlamamos.style.display = "flex";
  135.                 } else {
  136.                     showLoLlamamos.style.display = "none";
  137.                 }
  138.         }
  139.         formLoLlamamos.addEventListener('submit', function(event) {
  140.             event.preventDefault();
  141.             modalLoLlamamos = false;
  142.             if (formLoLlamamos.checkValidity()) {
  143.                 const nombre = formLoLlamamos.elements['Nombre'].value;
  144.                 const numeroCelular = formLoLlamamos.elements['NumeroCelular'].value;
  145.                 resultLoLlamamos.style.display = "block";
  146.                 divFormLoLlamamos.style.display = "none";
  147.                 jQuery.post("/formularios/llamar", ({
  148.                     "name": nombre,
  149.                     "phone": numeroCelular
  150.                 }), function(res){
  151.                     // alert(res);
  152.                 }).fail(function(xhr, status, error) {
  153.                     console.log('Error en la petición POST');
  154.                     console.error('Error en la petición POST:', error);
  155.                 });
  156.             } else {
  157.                 formLoLlamamos.reportValidity();
  158.             }
  159.         });
  160.         // Validador del tipo de texto que se permite en el input
  161.         const validationInputType = (e, type = "text") => {
  162.             if (type === "text") {
  163.                 if (!(e.which > 64 && e.which < 91) && e.which != 8 && e.which != 20 && e.which !== 32 && e.which !== 9) {
  164.                     e.preventDefault();
  165.                 }
  166.             }
  167.             if (type === "phone") {
  168.                 if (!(e.key > -1 && e.key < 10) && e.which != 8 && !(e.which > 95 && e.which < 106) && e.which !== 9) {
  169.                     e.preventDefault();
  170.                 }
  171.             }
  172.         }
  173.         closeModal.addEventListener("click", () => {
  174.             modalLoLlamamos = false
  175.             if (!modalLoLlamamos) {
  176.                 showLoLlamamos.style.display = "none";
  177.             }
  178.         })
  179.         okCloseModal.addEventListener("click", () => {
  180.             resultLoLlamamos.style.display = "none";
  181.             divFormLoLlamamos.style.display = "block"
  182.             formLoLlamamos.elements['Nombre'].value = '';
  183.             formLoLlamamos.elements['NumeroCelular'].value = '';
  184.             modalLoLlamamos = false
  185.             if (!modalLoLlamamos) {
  186.                 showLoLlamamos.style.display = "none";
  187.             }
  188.         })
  189.         // modal comuniquese
  190.         let modalComuniquese = false
  191.         const openModalComuniquese = () => {
  192.             modalComuniquese = !modalComuniquese;
  193.                 if (modalComuniquese) {
  194.                     showComuniquese.style.display = "flex";
  195.                 } else {
  196.                     showComuniquese.style.display = "none";
  197.                 }
  198.         }
  199.         closeModalComuniquese.addEventListener("click", () => {
  200.             modalComuniquese = false
  201.             if (!modalComuniquese) {
  202.                 showComuniquese.style.display = "none";
  203.             }
  204.         })
  205.         // desktop lo llamamos
  206.         loLlamamos.addEventListener("click", openModalLollamamos)
  207.         loLlamamos_soporte_linea.addEventListener("click", openModalLollamamos)
  208.         // desktop comuniquese
  209.         comuniquese.addEventListener("click", openModalComuniquese)
  210.         if (screenWidth < 1024) {
  211.             // mobile lo llamamos
  212.             comuniquese_palm.addEventListener("click", openModalComuniquese)
  213.             // mobile comuniquese
  214.             loLlamamos_palm.addEventListener("click", openModalLollamamos)
  215.             loLlamamos_palm_soporte_linea.addEventListener("click", openModalLollamamos)
  216.         }
  217.     </script>
  218. {% endblock javascripts_bottom %}