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.     {% set seo = null %}
  10.     {% if app.request.attributes.get('_route') != '' %}
  11.         {% set url_seo = path(app.request.attributes.get('_route'),
  12.             app.request.attributes.get('_route_params')) %}
  13.         {% set seo = url_seo|metatags %}
  14.     {% endif %}
  15.     {% block linkcanonical %}{% endblock %}
  16.     {% include 'front/_common/_metatags.html.twig' %}
  17.     
  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.         <!-- inicio favicon  iphone retina, ipad, iphone en orden-->
  26.         <link rel="icon" type="image/png" href="{{ asset(info.seoFavicon|image_path) }}"/>
  27.         <link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{ asset(info.seoFavicon|image_path) }}">
  28.         <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ asset(info.seoFavicon|image_path) }}">
  29.         <link rel="apple-touch-icon-precomposed" href="{{ asset(info.seoFavicon|image_path) }}">
  30.         <!-- end favicon -->
  31.     {% endif %}
  32.     {% block cssadicional %}{% endblock %}
  33.     {# Start CSS Links #}
  34.     <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/styles.css?v={{ BUILD_ID }}"/>
  35.     <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/blocks_styl.css?v={{ BUILD_ID }}"/>
  36.     <!--[if lt IE 9]>
  37.         <script src="{{STATIC_URL}}/js/html5.js"></script>
  38.         <script src="{{STATIC_URL}}/js/respond.js" type="text/javascript"></script>
  39.         <link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/ie.css" />
  40.     <![endif]-->
  41.     {# End CSS Links #}
  42.     {% if info.scriptsHeader %}
  43.         {{ info.scriptsHeader|raw }}
  44.     {% endif %}
  45.     {% if seo is not null and seo.scriptsHeader %}
  46.         {{ seo.scriptsHeader|raw }}
  47.     {% endif %}
  48. </head>
  49. <body class="{% block classbody %}{% endblock %}">
  50. {% if info.scriptsBody %}
  51.     {{ info.scriptsBody|raw }}
  52. {% endif %}
  53. {% if seo is not null and seo.scriptsBody %}
  54.     {{ seo.scriptsBody|raw }}
  55. {% endif %}
  56. <div class="cnt-wrapper">
  57.     {% include 'front/_common/_header.html.twig' %}
  58.     <div class="wrapper">
  59.     {% block content %}{% endblock %}
  60.     </div>
  61.     {% include 'front/_common/_footer.html.twig' %}
  62. </div>
  63.     
  64. <div class="blockOverlay"></div>
  65.         <!-- POPUP VIDEOS -->
  66.         <div class="gPopupVideo">
  67.             <a href="#" class="icon-close closePopup"></a>
  68.             <iframe src="" class="youtubePopup" frameborder="0"></iframe>
  69.             <video
  70.                 src=""
  71.                 class="mp4Popup"
  72.                 autoplay
  73.                 loop
  74.                 playsinline
  75.                 preload="metadata"
  76.             ></video>
  77.         </div>
  78.         <!-- html solo para el menu responsive -->
  79.         <div class="menu-overlay"></div>
  80.         <!-- html solo para el menu responsive -->
  81.         <!-- contenedor del menu responsive -->
  82.         <div class="responsive-tool"></div>
  83.         <div class="menu-sidebar" style="display: none" data-menu="right-in">
  84.             <div class="menu-sidebar-cnt">
  85.                 <img src="{{ asset(info.mnuHeaderImg|image_path) }}" alt="{{ info.mnuHeaderImg|image_alt }}" class="sidebar__img"/>
  86.                 <div class="sidebar__info">
  87.                     <ul class="sidebar__links">
  88.                     {% if info.socialShow and info.socialHeaderShow %}
  89.                         {% if info.socialFbShow and info.socialFbUrl %}
  90.                         <li><a href="{{ info.socialFbUrl }}" target="_blank"><img src="{{STATIC_URL}}img/facebook.png" alt="facebook" /></a></li>
  91.                         {% endif %}
  92.                         {% if info.socialLdShow and info.socialLdUrl %}
  93.                         <li><a href="{{ info.socialLdUrl }}" target="_blank"><img src="{{STATIC_URL}}img/linkedin.png" alt="linkedin" /></a></li>
  94.                         {% endif %}
  95.                         {% if info.socialIgShow and info.socialIgUrl %}
  96.                         <li><a href="{{ info.socialIgUrl }}" target="_blank"><img src="{{STATIC_URL}}img/instagram.png" alt="instagram" /></a></li>
  97.                         {% endif %}
  98.                         {% if info.socialYtShow and info.socialYtUrl %}
  99.                         <li><a href="{{ info.socialYtUrl }}" target="_blank"><img src="{{STATIC_URL}}img/youtube.png" alt="youtube" /></a></li>
  100.                         {% endif %}
  101.                         {% if info.socialTtShow and info.socialTtUrl %}
  102.                         <li><a href="{{ info.socialTtUrl }}" target="_blank"><img src="{{STATIC_URL}}img/tiktoklogo.png" alt="tiktok" /></a></li>
  103.                         {% endif %}
  104.                     {% endif %}
  105.                     </ul>
  106.                 </div>
  107.                 
  108.                 <li class="sidebar-link menu-item">
  109.                     <a class="menu-link" href="{{ path('about') }}">Nosotros</a>
  110.                 </li>
  111.                 {% if info.blogShow and info.blogUrl %}
  112.                 <li class="sidebar-link menu-item">
  113.                     <a class="menu-link" href="{{ info.blogUrl }}" target="_blank">Blog</a>
  114.                 </li>
  115.                 {% endif %}
  116.                 {% if info.externalLinkSomenewsShow and info.externalLinkSomenews %}
  117.                 <li class="sidebar-link menu-item">
  118.                     <a class="menu-link external" href="{{ info.externalLinkSomenews }}" target="_blank">Seminuevos</a>
  119.                 </li>
  120.                 {% endif %}
  121.                 {% if info.externalLinkPartsShow and info.externalLinkParts %}
  122.                 <li class="sidebar-link menu-item">
  123.                     <a class="menu-link external" href="{{ info.externalLinkParts }}" target="_blank">Tienda de repuestos</a>
  124.                 </li>
  125.                 {% endif %}
  126.             </div>
  127.         </div>
  128.         <div class="b1Coockie">
  129.             <div class="wancho flex aic">
  130.                 <div class="gParrafo">
  131.                     <p>Este sitio usa cookies. <a href="{{ path('cookies') }}" target="_blank">Más información</a></p>
  132.                 </div>
  133.                 <div class="flex cookie__buttons">
  134.                     <a href="#" class="general_button white" id="noCookies">Rechazar</a>
  135.                     <a href="#" class="general_button clickCookie">Aceptar</a>
  136.                 </div>
  137.             </div>
  138.         </div>
  139.         {% if info.whatsappShow and info.whatsappNumber %}
  140.         {% set whatsapp_url = 'https://api.whatsapp.com/send?phone=' ~ info.whatsappNumber|only_numbers %}
  141.         {% set whatsapp_url = whatsapp_url ~ (info.whatsappText ? '&text=' ~ info.whatsappText|url_encode : '' ) %}
  142.         <a  href="{{ whatsapp_url }}" target="_blank" 
  143.             class="wsp__button icon-whatsapp1">
  144.         </a>
  145.         {% endif %}
  146.         <script
  147.             src="{{STATIC_URL}}/js/jquery-3.2.1.min.js"
  148.             type="text/javascript"
  149.         ></script>
  150.         <script src="{{STATIC_URL}}/js/main.js" type="text/javascript"></script>
  151. {% block jsfinal %}{% endblock %}
  152. <script type="text/javascript">
  153.     if (document.getElementsByClassName('clickCookie')[0]) {
  154.         let elCookie = document.getElementsByClassName('clickCookie')[0];
  155.         let elWrapCookie = document.getElementsByClassName('b1Coockie')[0];
  156.         elCookie.addEventListener('click', function (e) {
  157.             e.preventDefault();
  158.             this.parentNode.parentNode.parentNode.classList.add('disabledWrap');
  159.             localStorage.setItem('#stateE2i', true);
  160.         });
  161.         if (localStorage.getItem('#stateE2i') === 'true') {
  162.         } else {
  163.             elWrapCookie.classList.add('active');
  164.         }
  165.         function deleteAllCookies() {
  166.             var cookies = document.cookie.split(";");
  167.             for (var i = 0; i < cookies.length; i++) {
  168.                 var cookie = cookies[i];
  169.                 var eqPos = cookie.indexOf("=");
  170.                 var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
  171.                 document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
  172.             }
  173.         }
  174.         if (localStorage.getItem('#stateE2i') === 'No') {
  175.             deleteAllCookies();
  176.             elWrapCookie.classList.remove('active');
  177.         }
  178.         
  179.         $('#noCookies').click(function(e){
  180.             e.preventDefault();
  181.             deleteAllCookies();
  182.             localStorage.setItem('#stateE2i', 'No');
  183.             elWrapCookie.classList.remove('active');
  184.         });
  185.     }
  186.     
  187. </script>
  188. <script>
  189.     {# Start Custom JS Links #}
  190.     {# End Custom JS Links #}
  191.     function storeUtms($data) {
  192.         $.ajax({
  193.             url: '{{ path('store_utms') }}',
  194.             type: 'get',
  195.             dataType: 'json',
  196.             data: $data,
  197.             success: function (data) {
  198.                 updateUtm(data);
  199.             }
  200.         })
  201.     }
  202.     function updateUtm(data) {
  203.         if (data['utm_source']) {
  204.             $('.form_utmsource').val(data['utm_source']);
  205.         }
  206.         if (data['utm_medium']) {
  207.             $('.form_utmmedium').val(data['utm_medium']);
  208.         }
  209.         if (data['utm_source']) {
  210.             $('.form_utmsource').val(data['utm_source']);
  211.         }
  212.         if (data['utm_campaign']) {
  213.             $('.form_utmcampaign').val(data['utm_campaign']);
  214.         }
  215.         if (data['utm_term']) {
  216.             $('.form_utmterm').val(data['utm_term']);
  217.         }
  218.         if (data['utm_content']) {
  219.             $('.form_utmcontent').val(data['utm_content']);
  220.         }
  221.         if (data['utm_gclid']) {
  222.             $('.form_gclid').val(data['utm_gclid']);
  223.         }
  224.     }
  225.     let utm_data = {};
  226.     {% set utm_params = ['utm_source', 'utm_campaign', 'utm_medium', 'utm_term', 'utm_content', 'gclid'] %}
  227.     {% for u in utm_params %}
  228.     {% if app.request.get(u)|default('') %}
  229.     utm_data['{{ u }}'] = '{{ app.request.get(u) }}';
  230.     {% endif %}
  231.     {% endfor %}
  232.     if (!$.isEmptyObject(utm_data)) {
  233.         storeUtms(utm_data);
  234.     }
  235.     {% include 'front/templates/utms.html.twig' %}
  236. </script>
  237. {% if info.scriptsFooter %}
  238.     {{ info.scriptsFooter|raw }}
  239. {% endif %}
  240. {% if seo is not null and seo.scriptsFooter %}
  241.     {{ seo.scriptsFooter|raw }}
  242. {% endif %}
  243. </body>
  244. </html>