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="robots" content="all, index, follow">
  8.     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  9.     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10.     <meta name="theme-color" content="#000000"/>
  11.     {% set seo = null %}
  12.     {% if app.request.attributes.get('_route') != '' %}
  13.         {% set url_seo = path(app.request.attributes.get('_route'),
  14.             app.request.attributes.get('_route_params')) %}
  15.         {% set seo = url_seo|metatags %}
  16.     {% endif %}
  17.     {% block linkcanonical %}{% endblock %}
  18.     {% include 'front/_common/_metatags.html.twig' %}
  19.     {% if info.scriptsMeta %}
  20.         {{ info.scriptsMeta|raw }}
  21.     {% endif %}
  22.     {% if seo is not null and seo.scriptsMeta %}
  23.         {{ seo.scriptsMeta|raw }}
  24.     {% endif %}
  25.     {% if info.seoFavicon %}
  26.         {# TODO: Check thumbnail #}
  27.         <!-- inicio favicon iphone retina, ipad, iphone en orden-->
  28.         <link rel="icon" type="image/png" href="{{ asset(info.seoFavicon|image_path) }}"/>
  29.         <link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{ asset(info.seoFavicon|image_path) }}">
  30.         <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ asset(info.seoFavicon|image_path) }}">
  31.         <link rel="apple-touch-icon-precomposed" href="{{ asset(info.seoFavicon|image_path) }}">
  32.         <!-- end favicon -->
  33.     {% endif %}
  34.     {% block cssadicional %}{% endblock %}
  35.     {# Start CSS Links #}
  36.     <link rel="stylesheet" type="text/css" href="{{ asset('assets/css/main.min.css') }}"/>
  37.     <link rel="stylesheet" type="text/css" href="{{ asset('assets/css/front.css') }}"/>
  38.     <link rel="preconnect" href="https://fonts.googleapis.com">
  39.     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  40.     <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
  41.     <style>
  42.         @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
  43.     </style>
  44.     {# End CSS Links #}
  45.     {% if info.scriptsHeader %}
  46.         {{ info.scriptsHeader|raw }}
  47.     {% endif %}
  48.     {% if seo is not null and seo.scriptsHeader %}
  49.         {{ seo.scriptsHeader|raw }}
  50.     {% endif %}
  51.     {% block jsaditional %}{% endblock %}
  52. </head>
  53. <body class="{% block classbody %}{% endblock %}">
  54. {% if info.scriptsBody %}
  55.     {{ info.scriptsBody|raw }}
  56. {% endif %}
  57. {% if seo is not null and seo.scriptsBody %}
  58.     {{ seo.scriptsBody|raw }}
  59. {% endif %}
  60. {% include 'front/_common/_header.html.twig' %}
  61. <main class="cnt_wrapper">
  62.     <div class="wrapper">
  63.         {% block content %}{% endblock %}
  64.         {% include 'front/_common/_footer.html.twig' %}
  65.     </div>
  66. </main>
  67. {% if info.showWhatsapp %}
  68.     <a href="{{ info.socialWhatsappNumber|whatsapp_url(info.socialWhatsappMessage) }}" class="generalWa" style="z-index: 10">
  69.         <i class="icon-ic_outline-whatsapp"></i>
  70.     </a>
  71. {% endif %}
  72. {# Start JS Links #}
  73. <script src="{{ asset('assets/js/jquery-3.7.1.min.js') }}?ver=1.0"></script>
  74. <script src="{{ asset('assets/js/main.min.js') }}?ver=1.0"></script>
  75. {# End JS Links #}
  76. {% block jsfinal %}{% endblock %}
  77. <script>
  78.     {# Start Custom JS Links #}
  79.     {# End Custom JS Links #}
  80.     function storeUtms($data) {
  81.         $.ajax({
  82.             url: '{{ path('store_utms') }}',
  83.             type: 'get',
  84.             dataType: 'json',
  85.             data: $data,
  86.             success: function (data) {
  87.                 updateUtm(data);
  88.             }
  89.         })
  90.     }
  91.     function updateUtm(data) {
  92.         if (data['utm_source']) {
  93.             $('.form_utmsource').val(data['utm_source']);
  94.         }
  95.         if (data['utm_medium']) {
  96.             $('.form_utmmedium').val(data['utm_medium']);
  97.         }
  98.         if (data['utm_source']) {
  99.             $('.form_utmsource').val(data['utm_source']);
  100.         }
  101.         if (data['utm_campaign']) {
  102.             $('.form_utmcampaign').val(data['utm_campaign']);
  103.         }
  104.         if (data['utm_term']) {
  105.             $('.form_utmterm').val(data['utm_term']);
  106.         }
  107.         if (data['utm_content']) {
  108.             $('.form_utmcontent').val(data['utm_content']);
  109.         }
  110.         if (data['utm_gclid']) {
  111.             $('.form_gclid').val(data['utm_gclid']);
  112.         }
  113.     }
  114.     let utm_data = {};
  115.     {% set utm_params = ['utm_source', 'utm_campaign', 'utm_medium', 'utm_term', 'utm_content', 'gclid'] %}
  116.     {% for u in utm_params %}
  117.     {% if app.request.get(u)|default('') %}
  118.     utm_data['{{ u }}'] = '{{ app.request.get(u) }}';
  119.     {% endif %}
  120.     {% endfor %}
  121.     if (!$.isEmptyObject(utm_data)) {
  122.         storeUtms(utm_data);
  123.     }
  124.     {% include 'front/templates/utms.html.twig' %}
  125. </script>
  126. {% if info.scriptsFooter %}
  127.     {{ info.scriptsFooter|raw }}
  128. {% endif %}
  129. {% if seo is not null and seo.scriptsFooter %}
  130.     {{ seo.scriptsFooter|raw }}
  131. {% endif %}
  132. </body>
  133. </html>