templates/front/_common/_base.html.twig line 1

Open in your IDE?
  1. {% set STATIC_URL = asset('static/') %}
  2. {% set BUILD_ID = '1' %}
  3. <!DOCTYPE html>
  4. <html lang="{{ app.request.locale }}">
  5. <head>
  6.     <meta charset="utf-8">
  7.     <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"/>
  8.     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  9.     <meta name="theme-color" content="#000000"/>
  10.     {% set seo = null %}
  11.     {% if app.request.attributes.get('_route') != '' %}
  12.         {% set url_seo = path(app.request.attributes.get('_route'),
  13.             app.request.attributes.get('_route_params')) %}
  14.         {% set seo = url_seo|metatags %}
  15.     {% endif %}
  16.     {% block linkcanonical %}{% endblock %}
  17.     {% include 'front/_common/_metatags.html.twig' %}
  18.     {% if info.scriptsMeta %}
  19.         {{ info.scriptsMeta|raw }}
  20.     {% endif %}
  21.     {% if seo is not null and seo.scriptsMeta %}
  22.         {{ seo.scriptsMeta|raw }}
  23.     {% endif %}
  24.     {% if info.seoFavicon %}
  25.         {# TODO: Check thumbnail #}
  26.         <!-- inicio favicon  iphone retina, ipad, iphone en orden-->
  27.         <link rel="icon" type="image/png" href="{{ asset(info.seoFavicon|image_path) }}"/>
  28.         <link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{ asset(info.seoFavicon|image_path) }}">
  29.         <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ asset(info.seoFavicon|image_path) }}">
  30.         <link rel="apple-touch-icon-precomposed" href="{{ asset(info.seoFavicon|image_path) }}">
  31.         <!-- end favicon -->
  32.     {% endif %}
  33.     <link rel="stylesheet" href="{{ asset('static/js/validationform/validationEngine.jquery.css') }}">
  34.     <link rel="stylesheet" href="{{ asset('static/css/styles.css') }}">
  35.     <link rel="stylesheet" href="{{ asset('static/css/blocks_styl.css') }}">
  36.     {% block cssadicional %}{% endblock %}
  37.     {% if info.scriptsHeader %}
  38.         {{ info.scriptsHeader|raw }}
  39.     {% endif %}
  40.     {% if seo is not null and seo.scriptsHeader %}
  41.         {{ seo.scriptsHeader|raw }}
  42.     {% endif %}
  43. </head>
  44. <body class="{{ (referer_euro or app.session.get('referer_euro')) ? 'header_btn_back_hide' }} {% block classbody %}{% endblock %}">
  45. {% if info.scriptsBody %}
  46.     {{ info.scriptsBody|raw }}
  47. {% endif %}
  48. {% if seo is not null and seo.scriptsBody %}
  49.     {{ seo.scriptsBody|raw }}
  50. {% endif %}
  51. {% include 'front/_common/_header.html.twig' %}
  52. {% block content %}{% endblock %}
  53. {% include 'front/_common/_footer.html.twig' %}
  54. <script src="{{ asset('static/js/jquery-3.2.1.min.js') }}"></script>
  55. <script src="{{ asset('static/js/main.js') }}"></script>
  56. <script src="{{ asset('static/js/header.js') }}"></script>
  57. {% block jsfinal %}{% endblock %}
  58. <script>
  59.     $(function(){
  60.         //+++ FOOTER RESPONSIVE - ACORDEON +++
  61.         if($(window).innerWidth() < 1025){
  62.             $('.footer_subtitle_resp').on('click', function(event){
  63.                 console.log("footer aquiiiii");
  64.                 if ($(this).hasClass('active')) {
  65.                     $(this).removeClass('active').parent().find('.footer_menu').stop().slideUp();
  66.                 }else{
  67.                     $('.footer_subtitle_resp').removeClass('active');
  68.                     $('.footer_menu').stop().slideUp();
  69.                     $(this).addClass('active').parent().find('.footer_menu').stop().slideToggle();
  70.                 };
  71.             })
  72.         }
  73.         //<<< END >>>
  74.     });
  75.     function storeUtms($data) {
  76.         $.ajax({
  77.             url: '{{ path('store_utms') }}',
  78.             type: 'get',
  79.             dataType: 'json',
  80.             data: $data,
  81.             success: function (data) {
  82.                 updateUtm(data);
  83.             }
  84.         })
  85.     }
  86.     function updateUtm(data) {
  87.         if (data['utm_source']) {
  88.             $('.form_utmsource').val(data['utm_source']);
  89.         }
  90.         if (data['utm_medium']) {
  91.             $('.form_utmmedium').val(data['utm_medium']);
  92.         }
  93.         if (data['utm_source']) {
  94.             $('.form_utmsource').val(data['utm_source']);
  95.         }
  96.         if (data['utm_campaign']) {
  97.             $('.form_utmcampaign').val(data['utm_campaign']);
  98.         }
  99.         if (data['utm_term']) {
  100.             $('.form_utmterm').val(data['utm_term']);
  101.         }
  102.         if (data['utm_content']) {
  103.             $('.form_utmcontent').val(data['utm_content']);
  104.         }
  105.         if (data['utm_gclid']) {
  106.             $('.form_gclid').val(data['utm_gclid']);
  107.         }
  108.     }
  109.     let utm_data = {};
  110.     {% set utm_params = ['utm_source', 'utm_campaign', 'utm_medium', 'utm_term', 'utm_content', 'gclid'] %}
  111.     {% for u in utm_params %}
  112.     {% if app.request.get(u)|default('') %}
  113.     utm_data['{{ u }}'] = '{{ app.request.get(u) }}';
  114.     {% endif %}
  115.     {% endfor %}
  116.     if (!$.isEmptyObject(utm_data)) {
  117.         storeUtms(utm_data);
  118.     }
  119.     {% include 'front/templates/utms.html.twig' %}
  120. </script>
  121. {% if info.scriptsFooter %}
  122.     {{ info.scriptsFooter|raw }}
  123. {% endif %}
  124. {% if seo is not null and seo.scriptsFooter %}
  125.     {{ seo.scriptsFooter|raw }}
  126. {% endif %}
  127. </body>
  128. </html>