custom/plugins/Theme3S/src/Resources/views/storefront/layout/meta.html.twig line 139

  1. {% block layout_head_inner %}
  2. {% set metaInformation = page.metaInformation %}
  3. {% set basicConfig = config('core.basicInformation') %}
  4. {% set maxLength = config('seo.descriptionMaxLength') %}
  5. {% set metaDescription = metaInformation.metaDescription|striptags|trim|u.truncate(maxLength ?? 255, '…') %}
  6. {% set metaTitle = metaInformation.metaTitle|striptags|trim %}
  7. {% set metaKeywords = metaInformation.metaKeywords|striptags|trim %}
  8. <head>
  9. {% block layout_head_meta_tags %}
  10. {% block layout_head_meta_tags_charset %}
  11. <meta charset="utf-8">
  12. {% endblock %}
  13. {% block layout_head_meta_tags_viewport %}
  14. <meta name="viewport"
  15. content="width=device-width, initial-scale=1, shrink-to-fit=no">
  16. {% endblock %}
  17. {% block layout_head_meta_tags_general %}
  18. <meta name="author"
  19. content="{% block layout_head_meta_tags_general_author %}{{ metaInformation.author|striptags }}{% endblock %}"/>
  20. <meta name="robots"
  21. content="{% block layout_head_meta_tags_robots %}{{ metaInformation.robots }}{% endblock %}"/>
  22. <meta name="revisit-after"
  23. content="{% block layout_head_meta_tags_general_revisit %}{{ metaInformation.revisit|striptags }}{% endblock %}"/>
  24. <meta name="keywords"
  25. content="{% block layout_head_meta_tags_keywords %}
  26. {{ metaKeywords }}
  27. {% endblock %}"/>
  28. <meta name="description" content="{% block layout_head_meta_tags_description %}
  29. {{ metaDescription }}
  30. {% endblock %}"/>
  31. {% endblock %}
  32. {% block layout_head_meta_tags_opengraph %}
  33. <meta property="og:url"
  34. content="{% block layout_head_meta_tags_url_og %}{{ (page.metaInformation.canonical is defined) ? page.metaInformation.canonical : app.request.uri }}{% endblock %}"/>
  35. <meta property="og:type"
  36. content="{% block layout_head_meta_tags_type_og %}website{% endblock %}"/>
  37. <meta property="og:site_name"
  38. content="{% block layout_head_meta_tags_sitename_og %}{{ basicConfig.shopName }}{% endblock %}"/>
  39. <meta property="og:title"
  40. content="{% block layout_head_meta_tags_title_og %}{{ metaTitle }}{% endblock %}"/>
  41. <meta property="og:description"
  42. content="{% block layout_head_meta_tags_description_og %}
  43. {{ metaDescription }}
  44. {% endblock %}"/>
  45. <meta property="og:image"
  46. content="{% block layout_head_meta_tags_image_og %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  47. <meta name="twitter:card"
  48. content="{% block layout_head_meta_tags_card_twitter %}summary{% endblock %}"/>
  49. <meta name="twitter:site"
  50. content="{% block layout_head_meta_tags_sitename_twitter %}{{ basicConfig.shopName }}{% endblock %}"/>
  51. <meta name="twitter:title"
  52. content="{% block layout_head_meta_tags_title_twitter %}{{ metaTitle }}{% endblock %}"/>
  53. <meta name="twitter:description"
  54. content="{% block layout_head_meta_tags_description_twitter %}
  55. {{ metaDescription }}
  56. {% endblock %}"/>
  57. <meta name="twitter:image"
  58. content="{% block layout_head_meta_tags_image_twitter %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  59. {% endblock %}
  60. {% block layout_head_meta_tags_schema_webpage %}
  61. <meta itemprop="copyrightHolder"
  62. content="{% block layout_head_meta_tags_copyright_holder %}{{ basicConfig.shopName }}{% endblock %}"/>
  63. <meta itemprop="copyrightYear"
  64. content="{% block layout_head_meta_tags_copyright_year %}{{ metaInformation.copyrightYear|striptags }}{% endblock %}"/>
  65. <meta itemprop="isFamilyFriendly"
  66. content="{% block layout_head_meta_tags_family_friendly %}{% if basicConfig.familyFriendly %}true{% else %}false{% endif %}{% endblock %}"/>
  67. <meta itemprop="image"
  68. content="{% block layout_head_meta_tags_image_meta %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  69. {% endblock %}
  70. {% block layout_head_meta_tags_hreflangs %}
  71. {% for link in hrefLang %}
  72. <link rel="alternate" hreflang="{{ link.locale }}" href="{{ link.url }}" />
  73. {% endfor %}
  74. {% endblock %}
  75. {% endblock %}
  76. {% block layout_head_favicon %}
  77. <link rel="shortcut icon"
  78. href="{{ theme_config('sw-logo-favicon') }}">
  79. {% endblock %}
  80. {% block layout_head_apple %}
  81. {% if theme_config('sw-logo-share') %}
  82. <link rel="apple-touch-icon"
  83. sizes="180x180"
  84. href="{{ theme_config('sw-logo-share') }}">
  85. {% endif %}
  86. {% endblock %}
  87. {% block layout_head_android %}
  88. {# @deprecated tag:v6.5.0 - Use the block above, "layout_head_apple", instead #}
  89. {% endblock %}
  90. {% block layout_head_canonical %}
  91. {% if page.metaInformation.canonical %}
  92. <link rel="canonical" href="{{ page.metaInformation.canonical }}" />
  93. {% endif %}
  94. {% endblock %}
  95. {% block layout_head_title %}
  96. <title itemprop="name">{% apply spaceless %}
  97. {% block layout_head_title_inner %}
  98. Shop
  99. {% endblock %}
  100. {% endapply %} :: 3S-Arbeitsschutz</title>
  101. {% endblock %}
  102. {% block layout_head_stylesheet %}
  103. {% if isHMRMode %}
  104. {# CSS will be loaded from the JS automatically #}
  105. {% else %}
  106. {% set assets = theme_config('assets.css') %}
  107. {% for file in assets %}
  108. <link rel="stylesheet"
  109. href="{{ asset(file, 'theme') }}">
  110. {% endfor %}
  111. {% endif %}
  112. {% endblock %}
  113. {% block layout_head_javascript_feature %}
  114. {% sw_include "@Storefront/storefront/component/feature.html.twig" %}
  115. {% endblock %}
  116. {# Block for tracking scripts which are required to include in the `head` section of the document #}
  117. {% block layout_head_javascript_tracking %}
  118. {% sw_include "@Storefront/storefront/component/analytics.html.twig" %}
  119. {% endblock %}
  120. {% block layout_head_javascript_recaptcha %}
  121. {% sw_include "@Storefront/storefront/component/recaptcha.html.twig" %}
  122. {% endblock %}
  123. {% block layout_head_javascript_token %}
  124. {% endblock %}
  125. {% if config('core.basicInformation.useDefaultCookieConsent') %}
  126. {% block layout_head_javascript_cookie_state %}
  127. <script>
  128. window.useDefaultCookieConsent = true;
  129. </script>
  130. {% endblock %}
  131. {% endif %}
  132. {% if feature('FEATURE_NEXT_15917') %}
  133. {% block layout_head_javascript_router %}
  134. {# Register all routes that will be needed in JavaScript to the window.router object #}
  135. <script>
  136. window.activeNavigationId = '{{ page.header.navigation.active.id }}';
  137. window.router = {
  138. 'frontend.cart.offcanvas': '{{ path('frontend.cart.offcanvas') }}',
  139. 'frontend.cookie.offcanvas': '{{ path('frontend.cookie.offcanvas') }}',
  140. 'frontend.checkout.finish.page': '{{ path('frontend.checkout.finish.page') }}',
  141. 'frontend.checkout.info': '{{ path('frontend.checkout.info') }}',
  142. 'frontend.menu.offcanvas': '{{ path('frontend.menu.offcanvas') }}',
  143. 'frontend.cms.page': '{{ path('frontend.cms.page') }}',
  144. 'frontend.cms.navigation.page': '{{ path('frontend.cms.navigation.page') }}',
  145. 'frontend.account.addressbook': '{{ path('frontend.account.addressbook') }}',
  146. {# @deprecated tag:v6.5.0 - Route frontend.csrf.generateToken will be removed. #}
  147. 'frontend.csrf.generateToken': '{{ path('frontend.csrf.generateToken') }}',
  148. 'frontend.country.country-data': '{{ path('frontend.country.country.data') }}',
  149. 'frontend.store-api.proxy': '{{ path('frontend.store-api.proxy') }}',
  150. };
  151. {# @deprecated tag:v6.5.0 - storeApiProxyToken will be removed. #}
  152. window.storeApiProxyToken = '{{ sw_csrf("frontend.store-api.proxy", {"mode": "token"}) }}';
  153. window.salesChannelId = '{{ app.request.attributes.get('sw-sales-channel-id') }}';
  154. </script>
  155. {% endblock %}
  156. {% block layout_head_javascript_breakpoints %}
  157. {# Register the available viewport breakpoints the window.breakpoints object #}
  158. <script>
  159. {% set breakpoint = {
  160. 'xs': theme_config('breakpoint.xs'),
  161. 'sm': theme_config('breakpoint.sm'),
  162. 'md': theme_config('breakpoint.md'),
  163. 'lg': theme_config('breakpoint.lg'),
  164. 'xl': theme_config('breakpoint.xl')
  165. } %}
  166. window.breakpoints = {{ breakpoint|json_encode()|raw }};
  167. </script>
  168. {% endblock %}
  169. {# @deprecated tag:v6.5.0 - Block layout_head_javascript_csrf will be removed. #}
  170. {% block layout_head_javascript_csrf %}
  171. <script>
  172. window.csrf = {
  173. 'enabled': '{{ shopware.csrfEnabled }}',
  174. 'mode': '{{ shopware.csrfMode }}'
  175. }
  176. </script>
  177. {% endblock %}
  178. {% if config('core.cart.wishlistEnabled') %}
  179. {% block layout_head_javascript_wishlist_state %}
  180. <script>
  181. window.customerLoggedInState = {{ context.customer is not null and not context.customer.guest ? 1 : 0 }};
  182. window.wishlistEnabled = {{ config('core.cart.wishlistEnabled') }};
  183. </script>
  184. {% endblock %}
  185. {% endif %}
  186. {# @internal tag:v6.5.0 - jQuery will be removed from the core. This block can be used to add jQuery as a `<script>`. #}
  187. {% block layout_head_javascript_jquery %}
  188. {% endblock %}
  189. {% block layout_head_javascript_hmr_mode %}
  190. {% if isHMRMode %}
  191. <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-node.js" defer></script>
  192. <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-shared.js" defer></script>
  193. <script type="text/javascript" src="/_webpack_hot_proxy_/js/runtime.js" defer></script>
  194. <script type="text/javascript" src="/_webpack_hot_proxy_/js/app.js" defer></script>
  195. {# The storefront entry is a combined entry point which contains all plugins & themes #}
  196. <script type="text/javascript" src="/_webpack_hot_proxy_/js/storefront.js" defer></script>
  197. {% else %}
  198. {% for file in theme_config('assets.js') %}
  199. <script type="text/javascript" src="{{ asset(file, 'theme') }}" defer></script>
  200. {% endfor %}
  201. {% endif %}
  202. {% endblock %}
  203. {% endif %}
  204. <meta name="viewport" content="width=device-width, initial-scale=1">
  205. <meta name="google-site-verification" content="tBnLAyB2oR8Q8p2l_9XKYtlgPCRI54x4ZA6t_U30tCw" />
  206. <meta name="facebook-domain-verification" content="tam2l1n8pe89fq3j91oa13uaezix8n" />
  207. <script>
  208. const CookieData = document.cookie.split(";");
  209. var ShowFBPixel = false;
  210. CookieData.forEach(CheckForFbPixel);
  211. function CheckForFbPixel(item, index){
  212. const CookieValues = item.split("=");
  213. var CookieName = CookieValues[0].replace(/\s/g, '');
  214. if(CookieName === "FB-Pixel"){
  215. var CookieValue = CookieValues[1].replace(/\s/g, '');
  216. if(CookieValue === "active"){
  217. ShowFBPixel = true;
  218. }
  219. }
  220. }
  221. if(ShowFBPixel === true){
  222. !function(f,b,e,v,n,t,s)
  223. {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  224. n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  225. if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  226. n.queue=[];t=b.createElement(e);t.async=!0;
  227. t.src=v;s=b.getElementsByTagName(e)[0];
  228. s.parentNode.insertBefore(t,s)}(window, document,'script',
  229. 'https://connect.facebook.net/en_US/fbevents.js');
  230. fbq('init', '4047956485431151');
  231. fbq('track', 'PageView');
  232. }
  233. </script>
  234. </head>
  235. {% endblock %}