templates/AtechNetCoreBundle/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="{{( app.request.locale == 'cz' ? 'cs' : app.request.locale )}}">
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.         <title>{% block title %}furbify{% endblock %}</title>
  7.         {% set domainId = app.session.get('domainId') %}
  8.         {% set customerTypeId = app.session.get('customerTypeId') %}
  9.         <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700,800&amp;subset=latin-ext&amp;display=swap" defer media="all" rel="stylesheet">
  10.         {% block meta %}
  11.             {% set domainTLD = app.request.session.get('defaultLocale') %}
  12.             {% if domainTLD == 'en' %}
  13.                 {% set domainTLD = 'eu' %}
  14.             {% endif %}
  15.             <meta name="description" content="" />
  16.             <meta property="og:url" content="{{ app.request.uri }}" />
  17.             <meta property="og:type" content="website" />
  18.             <meta property="og:locale" content="{{ app.request.locale |ogLocale }}" />
  19.             <meta property="og:title" content="furbify" />
  20.             <meta property="og:description" content="" />
  21.             <meta property="og:image" content="https://www.furbify.{{ domainTLD }}/theme/images/furbify-share-image.png" />
  22.         {% endblock %}
  23.         {% block stylesheets %}
  24.             <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous" defer async media="all">
  25.             <link rel="stylesheet" href="{{ asset('theme/css/bundle.min.css')|appendAssetCache }}" defer async media="all">
  26.         {% endblock %}
  27.         {% block canonical %}{% endblock %}
  28.         {% block categoryListLinks %}{% endblock %}
  29.         {% block robots %}
  30.             {% if 
  31.                 ( domainId in [ const('Domain::DOMAIN_ID_RT_SK'), const('Domain::DOMAIN_ID_WS_SK') ] and app.request.locale != 'sk' ) or 
  32.                 ( domainId in [ const('Domain::DOMAIN_ID_RT_HU'), const('Domain::DOMAIN_ID_WS_HU') ] and app.request.locale != 'hu' ) or 
  33.                 ( domainId in [ const('Domain::DOMAIN_ID_RT_CZ'), const('Domain::DOMAIN_ID_WS_CZ') ] and app.request.locale != 'cz' ) or 
  34.                 ( domainId in [ const('Domain::DOMAIN_ID_RT_EU'), const('Domain::DOMAIN_ID_WS_EU') ] and app.request.locale != 'en' ) 
  35.             %}
  36.                 <meta name="robots" content="noindex, nofollow, noarchive">
  37.             {% endif %}
  38.         {% endblock %}
  39.         {% block schema %}
  40.         {% set _baseUrl = app.request.schemeAndHttpHost %}
  41.         <script type="application/ld+json">
  42.         {
  43.             "@context": "https://schema.org",
  44.             "@type": "Organization",
  45.             "@id": "{{ _baseUrl }}/#organization",
  46.             "name": "Furbify",
  47.             "url": "{{ _baseUrl }}",
  48.             "logo": {
  49.                 "@type": "ImageObject",
  50.                 "url": "{{ _baseUrl }}/theme/images/furbify-logo.svg",
  51.                 "width": 143,
  52.                 "height": 37
  53.             },
  54.             "image": "{{ _baseUrl }}/theme/images/furbify-share-image.png",
  55.             "description": "Furbify is a leading European retailer of refurbished notebooks, used computers, and renewed electronics with warranty and free shipping.",
  56.             "slogan": "Premium renewed electronics",
  57.             "foundingDate": "2015",
  58.             "contactPoint": [{
  59.                 "@type": "ContactPoint",
  60.                 "telephone": "+421-220-512-060",
  61.                 "contactType": "customer service",
  62.                 "availableLanguage": ["English", "Slovak", "German", "Hungarian", "Czech", "Polish"],
  63.                 "areaServed": "EU"
  64.             }],
  65.             "sameAs": [
  66.                 "https://www.facebook.com/furbify",
  67.                 "https://www.instagram.com/furbify",
  68.                 "https://www.linkedin.com/company/furbify"
  69.             ]
  70.         }
  71.         </script>
  72.         <script type="application/ld+json">
  73.         {
  74.             "@context": "https://schema.org",
  75.             "@type": "WebSite",
  76.             "@id": "{{ _baseUrl }}/#website",
  77.             "name": "Furbify",
  78.             "url": "{{ _baseUrl }}",
  79.             "publisher": {"@id": "{{ _baseUrl }}/#organization"},
  80.             "inLanguage": "{{ app.request.locale == 'cz' ? 'cs' : app.request.locale }}",
  81.             "potentialAction": {
  82.                 "@type": "SearchAction",
  83.                 "target": {
  84.                     "@type": "EntryPoint",
  85.                     "urlTemplate": "{{ _baseUrl }}/product-search?fs={search_term_string}"
  86.                 },
  87.                 "query-input": "required name=search_term_string"
  88.             }
  89.         }
  90.         </script>
  91.         {% endblock %}
  92.         <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon.png">
  93.         <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32{% if app.environment == 'dev' %}-dev{% endif %}.png">
  94.         <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16{% if app.environment == 'dev' %}-dev{% endif %}.png">
  95.         <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
  96.         <meta name="msapplication-TileColor" content="#00a300">
  97.         <meta name="theme-color" content="#73af1c">
  98.         <style>
  99.             body, html {
  100.                 overflow-x: hidden;
  101.             }
  102.         </style>
  103.         {% if app.environment == 'prod' %}
  104.             <script>
  105.                 var priceMode = '{% if customerTypeId == 1 %}jf0jeid0s09ir32{% else %}rj43r232kf4r0of{% endif %}';
  106.             </script>
  107.             {% if google_tag_manager_id[domainId] is defined %}
  108.                 <!-- Google Tag Manager -->
  109.                 <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  110.                             new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  111.                         j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  112.                         'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  113.                     })(window,document,'script','dataLayer','{{ google_tag_manager_id[domainId] }}');</script>
  114.                 <!-- End Google Tag Manager -->
  115.             {% endif %}
  116.             {% if customerTypeId == 1 and domainId == 3 %}
  117.                 <meta name="google-site-verification" content="gtRiB7pWJhpVRAmzfPf7RkdNMhH1VJysCtQKqVINXgQ" />
  118.             {% endif %}
  119.             {% if domainId == 9 %}
  120.                 <script type="text/javascript" src="https://c.seznam.cz/js/rc.js"></script>
  121.                 <script>
  122.                     var retargetingConf = {
  123.                         rtgId: 159093
  124.                     };
  125.                     if (window.rc && window.rc.retargetingHit) {
  126.                         window.rc.retargetingHit(retargetingConf);
  127.                     }
  128.                 </script>
  129.             {% endif %}
  130.         {% endif %}
  131.         {% block headScript %}{% endblock %}
  132.         {% block dataLayer %}{% endblock %}
  133.         {% if app.environment == 'prod' and domainId in [const('Domain::DOMAIN_ID_RT_HU')] %}
  134.             <script>
  135.                 (function(w,d,s,r,n){w.TrustpilotObject=n;w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)};
  136.                     a=d.createElement(s);a.async=1;a.src=r;a.type='text/java'+s;f=d.getElementsByTagName(s)[0];
  137.                     f.parentNode.insertBefore(a,f)})(window,document,'script', 'https://invitejs.trustpilot.com/tp.min.js', 'tp');
  138.                     tp('register', 'CWIfeStWG0soKXlo');
  139.             </script>
  140.         {% endif %}
  141.         <!-- Cookie Consent 1/2 -->
  142.         <script>if(typeof gtag==='undefined'){function gtag(){}}</script>
  143.         <!-- Klaviyo Sing-up forms -->
  144.         {# klaviyo['prod'] -> we create forms only in prod if u want to test some u can change it to dev #}
  145.         <script async type='text/javascript' src='https://static.klaviyo.com/onsite/js/klaviyo.js?company_id={{ klaviyo['prod'].public_key }}'></script>
  146.         <!-- MolinAi chat -->
  147.         {% if app.environment == 'prod' %}
  148.             {% if domainId in [1, 2] %}
  149.                 <script type="module" src="https://widget.molin.ai/shop-ai.js?w=67uaezes"></script>
  150.                 {% elseif domainId in [3, 4] %}
  151.                 <script type="module" src="https://widget.molin.ai/shop-ai.js?w=yuhr7bac"></script>
  152.                 {% elseif domainId in [5, 9] %}
  153.                 <script type="module" src="https://widget.molin.ai/shop-ai.js?w=lvygigw9"></script>
  154.             {% endif %}
  155.         {% endif %}
  156.         {% if app.request.requestUri == '/' and app.environment == 'prod' %}
  157.             {% include('AtechNetCoreBundle/Widgets/TrustIndex/TrustedShopBadge.html.twig') %}
  158.         {% endif %}
  159.     </head>
  160.     <body class="{% if app.environment == 'dev' %}dev {% endif %}{% if customerTypeId == 2 %}partner-body {% endif %}{% block bodyClass %}{% endblock %}">
  161.         {% if app.environment == 'prod' and google_tag_manager_id[domainId] is defined %}
  162.             <!-- Google Tag Manager (noscript) -->
  163.             <noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ google_tag_manager_id[domainId] }}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  164.             <!-- End Google Tag Manager (noscript) -->
  165.         {% endif %}
  166.         {% block header %}{% endblock %}
  167.         <div class="wrapper">
  168.             <div class="modal fade" id="notification" tabindex="-1" data-bs-backdrop="static" aria-hidden="true"></div>
  169.             {% block content %}{% endblock %}
  170.         </div>
  171.         {% block footer %}{% endblock %}
  172.         {% block javascripts %}
  173.             <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha512-bnIvzh6FU75ZKxp0GXLH9bewza/OIw6dLVh9ICg0gogclmYGguQJWl8U30WpbsGTqbIiAwxTsbe76DErLq5EDQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  174.             <script
  175.                 src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
  176.                 integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
  177.                 crossorigin="anonymous">
  178.             </script>
  179.             {% set adminLogin = app.session.get('isAdminLogin') %}
  180.             <script>const isAdminLogin = '{{ adminLogin }}';</script>
  181.             {% set domainId = app.session.get('domainId') %}
  182.             <script type="text/javascript">
  183.                 baseOptions = {
  184.                     translations: {
  185.                         "Go_to_slide": "{{ 'Go to slide'|trans }}",
  186.                         "Previous_slide": "{{ 'Previous slide'|trans }}",
  187.                         "Next_slide": "{{ 'Next slide'|trans }}",
  188.                         "Decrease_value": "{{ 'Decrease value'|trans }}",
  189.                         "Increase_value": "{{ 'Increase value'|trans }}",
  190.                     }
  191.                 }
  192.             </script>
  193.             <script defer src="{{ asset('theme/js/bundle.min.js'|appendAssetCache) }}"></script>
  194.             <!-- Cookie Consent 2/2 -->
  195.             <script type="text/javascript">
  196.                 window.addEventListener('DOMContentLoaded', (event) => {
  197.                     const cookieBanner = document.getElementById('cookie-consent');
  198.                     if (!cookieBanner || cookieBanner.offsetHeight === 0) {
  199.                         $("#cookie-consent-shield").hide();
  200.                     }
  201.                 });
  202.                 const applyUserCookieConsent = (consent) => {
  203.                     let googleTagManagerConsent = false;
  204.                     let consentData = {
  205.                         event: 'consentUpdate', 
  206.                         ad_storage: 'denied',
  207.                         analytics_storage: 'denied',
  208.                         ad_user_data: 'denied',
  209.                         ad_personalization: 'denied',
  210.                         personalization_storage: 'granted',
  211.                         functionality_storage: 'granted',
  212.                         security_storage: 'granted'
  213.                     };
  214.                     const loadScript = (script) => {
  215.                         script.setAttribute('type', 'text/javascript');
  216.                         script.removeAttribute('data-category');
  217.                         // Create fresh script element
  218.                         let freshScript = document.createElement('script');
  219.                         freshScript.textContent = script.innerHTML;
  220.                         // Copy Attributes
  221.                         (function(destination, source) {
  222.                             let attributes = source.attributes;
  223.                             let len = attributes.length;
  224.                             for ( let i = 0; i < len; i++ ) {
  225.                                 let attributeName = attributes[i].nodeName;
  226.                                 destination.setAttribute(attributeName , source[attributeName] || source.getAttribute(attributeName));
  227.                             }
  228.                         })(freshScript, script);
  229.                         // Load
  230.                         freshScript.onload = () => {
  231.                             freshScript.onload = null;
  232.                         };
  233.                         // Replace current "sleeping" script with the new "revived" one
  234.                         script.parentNode.replaceChild(freshScript, script);
  235.                     };
  236.                     // Statistical Cookies
  237.                     if ( consent.accept || ( consent.custom && "acceptStatisticalCookies" in consent.custom )) {
  238.                         googleTagManagerConsent = true;
  239.                         let script = document.querySelector('script[data-category="analytics"]');
  240.                         if ( script ) {
  241.                             loadScript(script);
  242.                         }
  243.                         consentData.analytics_storage = 'granted';
  244.                     }
  245.                     // Marketing Cookies
  246.                     if ( consent.accept || ( consent.custom && "acceptMarketingCookie" in consent.custom )) {
  247.                         googleTagManagerConsent = true;
  248.                         consentData.ad_storage = 'granted';
  249.                         consentData.ad_user_data = 'granted';
  250.                         consentData.ad_personalization = 'granted';
  251.                     }
  252.                     // Necessary Cookie
  253.                     let script = document.querySelector('script[data-category="chat"]');
  254.                     if ( script ) {
  255.                         loadScript(script);
  256.                     }
  257.                     dataLayer.push(consentData);
  258.                     $("#cookie-consent-shield").hide();
  259.                 };
  260.             </script>
  261.             {# Klaviyo #}
  262.             <script async type="text/javascript" src="//static.klaviyo.com/onsite/js/{{ klaviyo[app.environment].public_key }}/klaviyo.js"></script>
  263.             <script type="text/javascript">
  264.                 !function () {
  265.                     if (!window.klaviyo) {
  266.                         window._klOnsite = window._klOnsite || [];
  267.                         try {
  268.                             window.klaviyo = new Proxy({}, {
  269.                                 get: function (n, i) {
  270.                                     return "push" === i ? function () {
  271.                                         var n;
  272.                                         (n = window._klOnsite).push.apply(n, arguments)
  273.                                     } : function () {
  274.                                         for (var n = arguments.length, o = new Array(n), w = 0; w < n; w++) o[w] = arguments[w];
  275.                                         var t = "function" == typeof o[o.length - 1] ? o.pop() : void 0,
  276.                                                 e = new Promise((function (n) {
  277.                                                     window._klOnsite.push([i].concat(o, [function (i) {
  278.                                                         t && t(i), n(i)
  279.                                                     }]))
  280.                                                 }));
  281.                                         return e
  282.                                     }
  283.                                 }
  284.                             })
  285.                         } catch (n) {
  286.                             window.klaviyo = window.klaviyo || [], window.klaviyo.push = function () {
  287.                                 var n;
  288.                                 (n = window._klOnsite).push.apply(n, arguments)
  289.                             }
  290.                         }
  291.                     }
  292.                 }();
  293.             </script>
  294.             {% if app.user %}
  295.                 <script type="text/javascript">
  296.                     klaviyo.identify({
  297.                         'email' : '{{ app.user.email }}'
  298.                     })
  299.                 </script>
  300.             {% endif %}
  301.             {# Klaviyo help function #}
  302.             <script type="text/javascript">
  303.                 function convertCurrency(currency) {
  304.                     switch (currency) {
  305.                         case '€':
  306.                             return 'EUR';
  307.                         case 'Ft':
  308.                             return 'HUF';
  309.                         case 'Kč':
  310.                             return 'CZK';
  311.                         default:
  312.                             return currency;
  313.                     }
  314.                 }
  315.             </script>
  316.             {#Grade Translations#}
  317.             <script>
  318.                 const GRADE_TRANSLATIONS = {
  319.                     'A': '{{ 'grades.A'|trans }}',
  320.                     'B': '{{ 'grades.B'|trans }}',
  321.                     'C': '{{ 'grades.C'|trans }}',
  322.                     'New': '{{ 'grades.New'|trans }}',
  323.                     'Bazaar': '{{ 'grades.Bazaar'|trans }}',
  324.                     'condition': '{{ 'condition'|trans }}'
  325.                 }
  326.             </script>
  327.         {% endblock %}
  328.     </body>
  329. </html>