src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/layout/head.html.twig line 55

Open in your IDE?
  1. <meta charset="UTF-8">
  2. {% if not editmode %}
  3.     {{ elements_head_title() }}
  4.     {{ elements_head_meta() }}
  5.     {{ elements_canonical() }}
  6.     {% if not deactivateHrefland|default(false) %}
  7.         {{ elements_hreflang() }}
  8.     {% endif %}
  9.     {% set img = demi_core_configuration('getOgImage',[]) %}
  10.     {% if img is not null %}
  11.         {% do elements_opengraph().addImage(app.request.getHost() ~ img.getThumbnail('ogimages')) %}
  12.     {% endif %}
  13.     {{ elements_opengraph() }}
  14. {% endif %}
  15. <!-- prevent underline numbers in edge -->
  16. <meta name="format-detection" content="telephone=no"/>
  17. <link rel="apple-touch-icon" sizes="152x152" href="/static/img/favicons/apple-touch-icon-152x152.png">
  18. <link rel="apple-touch-icon" sizes="180x180" href="/static/img/favicons/apple-touch-icon-180x180.png">
  19. <link rel="icon" type="image/png" href="/static/img/favicons/favicon-32x32.png" sizes="32x32">
  20. <link rel="icon" type="image/png" href="/static/img/favicons/android-chrome-192x192.png" sizes="192x192">
  21. <link rel="icon" type="image/png" href="/static/img/favicons/favicon-96x96.png" sizes="96x96">
  22. <link rel="manifest" href="/manifest.json">
  23. <link rel="mask-icon" href="/static/img/favicons/safari-pinned-tab.svg">
  24. {% if pimcore_device().isTablet() %}
  25.     <meta name="viewport" content="user-scalable=no">
  26. {% else %}
  27.     <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">
  28. {% endif %}
  29. {{ include('@ElementsDemiFrontend/Includes/layout/headCss.html.twig') }}
  30. {% if editmode %}
  31.     <link rel="stylesheet" href="/static/css/editmode.css">
  32. {% endif %}
  33. <script type="text/javascript" data-cookieconsent="ignore">
  34.     var supportsWoff2=function(){if(!("FontFace"in window))return!1;var e=new window.FontFace("t",'url( "data:application/font-woff2," ) format( "woff2" )',{});return e.load()["catch"](function(){})};!function(){"use strict";function e(){var e=navigator.userAgent.toLowerCase();return-1!=e.indexOf("msie")&&8==parseInt(e.split("msie")[1])?"ie8":supportsWoff2()?"blink":"default"}function t(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function n(e){if(window.XMLHttpRequest){var n=new XMLHttpRequest,i=e[1]+"?dc="+e[0].split("--")[0];n.open("GET",i,!0),t(n,"load",function(){4===n.readyState&&a(n.responseText,e[0])}),n.send()}else{var o=document.createElement("link");o.href=e[1],o.rel="stylesheet",o.type="text/css",document.getElementsByTagName("head")[0].appendChild(o),document.cookie=e[0]}}function a(t,n){if(document.getElementById(n)&&"ie8"!=e())document.getElementById(n).innerHTML=t;else{var a=document.createElement("style");a.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(a)}}var i=[];if("ie8"!==e()){for(var o=document.getElementsByClassName("js-style"),r=0;r<o.length;r++)o[r].getAttribute("data-font")?i.push([o[r].getAttribute("id"),o[r].getAttribute("data-href")+e()+".css"]):i.push([o[r].getAttribute("id"),o[r].getAttribute("data-href")]);for(var s in i)if("ie8"==e()){var d=document.createElement("link");d.href=i[s][1],d.rel="stylesheet",d.type="text/css",document.getElementsByTagName("head")[0].appendChild(d)}else t(window,"load",n(i[s]))}}();
  35. </script>
  36. {% if not editmode %}
  37.     <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="1ade52b6-e8d9-4dc2-92e0-3c43c1fd8cd4" data-blockingmode="auto" type="text/javascript"></script>
  38. {% endif %}
  39. {{ include('@ElementsDemiFrontend/Includes/layout/js-config.html.twig') }}
  40. {%  set route = app.request.get('_route') %}
  41. {% if not 'demi_checkout' in route %}
  42.     {# nothing here #}
  43. {% else  %}
  44.     {% do jsConfig('_initialState').add(demi_getSearchArray()) %}
  45. {% endif %}
  46. {#
  47. TODO
  48. $tz = date_default_timezone_get();
  49. $timezoneHere = new DateTimeZone($tz);
  50. $timezoneUtc = new DateTimeZone("UTC");
  51. $dateTimeUtc = new DateTime("now", $dateTimeUtc);
  52. $offset = $timezoneHere->getOffset($dateTimeUtc);
  53. $this->jsConfig('_config')->add(['timezoneOffset'=>(int)$offset])
  54. #}
  55. {% do jsConfig('_translations').add(demi_getAllDemiTranslationKeys()) %}
  56. {% set local = app.request.locale ~ '-' ~ demi_findFirstRegionforLanguage(app.request.locale) %}
  57. {%  if local == "en-US" %}
  58.     {% set local = "en-GB" %}
  59. {% endif %}
  60. {% do jsConfig().add({'local': local}) %}
  61. {% do jsConfig().add({'useDataLayerTracking': 'gtm' in demi_core_configuration('getTrackingSystem',[])  ? true : false}) %}
  62. {% do jsConfig().add({'ga4Tracking': demi_core_configuration('getTrackingSystem',[]) == 'gtm-ga4'  ? true : false}) %}
  63. {# todo: delete the following block & add it to the dummy project #}
  64. {#{% do jsConfig('_config').add('cookieServices', {#}
  65. {#    matomo: {#}
  66. {#        isAllowed: false,#}
  67. {#        isReadOnly: false,#}
  68. {#        text: "Matomo",#}
  69. {#    },#}
  70. {#    google: {#}
  71. {#        isAllowed: false,#}
  72. {#        isReadOnly: false,#}
  73. {#        text: "Goolge",#}
  74. {#    }#}
  75. {#}) %}#}
  76. {{ jsConfig() }}