templates/public/head.html.twig line 1

Open in your IDE?
  1. <title>{{ title|default('Klaravik') }}</title>
  2. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  3. <meta name="keywords" content="{{ keywords|default('')|escape }}">
  4. <meta name="description" content="{{ description|default('')|escape }}">
  5. {# Canonical URL - prevents duplicate content issues #}
  6. {# Include curpage parameter in canonical URL when pagination exists #}
  7. {% set baseCanonical = canonicalUrl|default(app.request.schemeAndHttpHost ~ app.request.pathInfo) %}
  8. {% set curpage = app.request.query.get('curpage') %}
  9. {% if curpage and curpage > 1 %}
  10.     {% set canonicalWithPage = baseCanonical ~ '?curpage=' ~ curpage %}
  11. {% else %}
  12.     {% set canonicalWithPage = baseCanonical %}
  13. {% endif %}
  14. <link rel="canonical" href="{{ canonicalWithPage }}" />
  15. {% if app.request.attributes.get('requestParams').page is defined and app.request.attributes.get('requestParams').page is same as 'vendor' %}
  16.     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, viewport-fit=cover" />
  17. {% else %}
  18.     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=10, user-scalable=1, viewport-fit=cover">
  19. {% endif %}
  20. <meta name="format-detection" content="telephone=no" />
  21. {# Open Graph Meta Tags #}
  22. <meta property="og:title" content="{{ shortTitle|default(title|default('Klaravik')) }}" />
  23. <meta property="og:type" content="{{ ogType|default('website') }}" />
  24. <meta property="og:url" content="{{ canonicalWithPage }}" />
  25. <meta property="og:description" content="{{ description|default('')|escape }}" />
  26. <meta property="og:site_name" content="Klaravik" />
  27. <meta property="og:locale" content="{{ app.request.locale|default('sv_SE') }}" />
  28. {% if products_id is defined and products_id is not empty %}
  29.     <meta property="og:image" content="{{ ogImage }}" />
  30.     <meta property="og:image:width" content="900" />
  31.     <meta property="og:image:height" content="675" />
  32.     <meta property="og:image:alt" content="{{ shortTitle|default('')|escape }}" />
  33. {% elseif ogImage is defined and ogImage is not empty %}
  34.     <meta property="og:image" content="{{ ogImage }}"/>
  35.     <meta property="og:image:width" content="200" />
  36.     <meta property="og:image:height" content="200" />
  37. {% else %}
  38.     <meta property="og:image" content="{{ app.request.schemeAndHttpHost }}/images/klaravik-og-default.png" />
  39.     <meta property="og:image:width" content="1200" />
  40.     <meta property="og:image:height" content="630" />
  41. {% endif %}
  42. {# Twitter Card Meta Tags #}
  43. <meta name="twitter:card" content="{{ twitterCardType|default('summary_large_image') }}" />
  44. <meta name="twitter:title" content="{{ shortTitle|default(title|default('Klaravik')) }}" />
  45. <meta name="twitter:description" content="{{ description|default('')|escape }}" />
  46. {% if products_id is defined and products_id is not empty %}
  47.     <meta name="twitter:image" content="{{ ogImage }}" />
  48.     <meta name="twitter:image:alt" content="{{ shortTitle|default('')|escape }}" />
  49. {% elseif ogImage is defined and ogImage is not empty %}
  50.     <meta name="twitter:image" content="{{ ogImage }}" />
  51. {% endif %}
  52. {% if not constant('DEV_MODE') %}
  53.     <script type="text/JavaScript" data-cookieconsent="ignore">
  54.         window.addEventListener('CookiebotOnDialogInit', () => {
  55.           window.addEventListener('CookiebotOnAccept', () => {
  56.               location.reload()
  57.           })
  58.         })
  59.     </script>
  60. {% endif %}
  61. {# This script makes it possible to use Fontawesome Pro icons #}
  62. <script src="https://kit.fontawesome.com/aa499cc0ce.js" crossorigin="anonymous"></script>
  63. {# Slick Carousel CSS #}
  64. <link rel="stylesheet" href="{{ getFileVersion('/css/slick.css') }}">
  65. {# UI Tooltip CSS  #}
  66. <link rel="stylesheet" type="text/css" media="screen" href="{{ getFileVersion('/css/tool-tip.css') }}" />
  67. {# TODO: use remixicon via NPM package when possible #}
  68. <link rel="preload" href="/fonts/RemixIcon/remixicon.woff2" as="font" type="font/woff2" crossorigin>
  69. <link rel="preload" href="/fonts/KlaravikSans/KlaravikSans-Light.woff2" as="font" type="font/woff2" crossorigin>
  70. <link rel="preload" href="/fonts/KlaravikSans/KlaravikSans-Regular.woff2" as="font" type="font/woff2" crossorigin>
  71. <link rel="preload" href="/fonts/KlaravikSans/KlaravikSans-SemiBold.woff2" as="font" type="font/woff2" crossorigin>
  72. <link rel="preload" href="/fonts/KlaravikSans/KlaravikSans-Bold.woff2" as="font" type="font/woff2" crossorigin>
  73. <link rel="preload" href="/fonts/KlaravikSans/KlaravikSans-ExtraBold.woff2" as="font" type="font/woff2" crossorigin>
  74. <link rel="stylesheet" href="/fonts/RemixIcon/remixicon.css?v=1">
  75. <link rel="stylesheet" type="text/css" href="/fonts/Authenia-Textured/stylesheet.css">
  76. <link rel="stylesheet" type="text/css" media="screen" href="{{ getFileVersion('/css/foundation.css') }}" />
  77. <link rel="stylesheet" type="text/css" media="screen" href="{{ getFileVersion('/css/uni-form.css') }}" />
  78. <link rel="stylesheet" type="text/css" media="screen" href="{{ getFileVersion('/css/default.uni-form.css') }}" id="formStyle" />
  79. {% if (currentPage is same as "auction" and products_id is defined) or currentPage is same as "vendor" %}
  80.     <link rel="stylesheet" type="text/css" media="all" href="{{ getFileVersion('/dist/css/fancybox.css') }}" />
  81.     <link rel="stylesheet" type="text/css" media="all" href="{{ getFileVersion('/dist/css/carousel.css') }}" />
  82. {% endif %}
  83. <link rel="stylesheet" type="text/css" media="all" href="{{ getFileVersion('/dist/css/stylesheet.css') }}" />
  84. {# apple-touch-icon defines an icon for adding Klaravik to the homescreen for iPhone/iPad #}
  85. <link rel="apple-touch-icon" sizes="80x80" href="/klaravik-web-icon-80x80.png">
  86. <link rel="apple-touch-icon" sizes="120x120" href="/klaravik-web-icon-120x120.png">
  87. <link rel="apple-touch-icon" sizes="152x152" href="/klaravik-web-icon-152x152.png">
  88. <link rel="apple-touch-icon" sizes="167x167" href="/klaravik-web-icon-167x167.png">
  89. <link rel="apple-touch-icon" sizes="180x180" href="/klaravik-web-icon-180x180.png">
  90. <link rel="apple-touch-icon" sizes="192x192" href="/klaravik-web-icon-192x192.png">
  91. <link rel="icon" type="image/png" href="{{ getFileVersion('/favicon-32x32.png') }}" sizes="32x32">
  92. <link rel="icon" type="image/png" href="{{ getFileVersion('/favicon-16x16.png') }}" sizes="16x16">
  93. {# Manifest link defines "add to homescreen" (PWA) attributes for Android #}
  94. <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#008540">
  95. {% for css in includedCSS|default([]) %}
  96.     <link rel="stylesheet" type="text/css" media="{{ css["media"] }}" href="{{ getFileVersion(css["url"]) }}" />
  97. {% endfor %}
  98. {{ manifestAssets.renderCss() }}
  99. <meta name="theme-color" content="#ffffff">
  100. <style>
  101.     @media only screen and (max-width: 1024px) {
  102.     {# Label the data for mybids table #}
  103.         body .mybids td:nth-of-type(1):before { content: "{{ 'ALIAS_BUYER_TH_PRODUCT'|trans }}"; }
  104.         body .mybids td:nth-of-type(2):before { content: "{{ 'ALIAS_BUYER_TH_AUCTIONEND'|trans }}"; }
  105.         body .mybids td:nth-of-type(3):before { content: "{{ 'ALIAS_BUYER_TH_YOURMAXBID'|trans }}"; }
  106.         body .mybids td:nth-of-type(4):before { content: "{{ 'ALIAS_BUYER_TH_YOURBID'|trans }}"; }
  107.         body .mybids td:nth-of-type(5):before { content: "{{ 'ALIAS_BUYER_TH_HIGHBID'|trans }}"; }
  108.         body .mybids td:nth-of-type(6):before { content: "{{ 'ALIAS_BUYER_TH_RESPRICE'|trans }}"; }
  109.         body .mybids td:nth-of-type(7):before { content: "{{ 'ALIAS_BUYER_TH_STATUS'|trans }}"; }
  110.     {# Label the data for myorders table #}
  111.         body .myorders td:nth-of-type(1):before { content: "{{ 'ALIAS_BUYER_TH_PRODUCT'|trans }}"; }
  112.         body .myorders td:nth-of-type(2):before { content: "{{ 'ALIAS_BUYER_TH_AUCTIONEND'|trans }}"; }
  113.         body .myorders td:nth-of-type(3):before { content: "{{ 'ALIAS_BUYER_TH_YOURMAXBID'|trans }}"; }
  114.         body .myorders td:nth-of-type(4):before { content: "{{ 'ALIAS_BUYER_TH_YOURBID'|trans }}"; }
  115.         body .myorders td:nth-of-type(5):before { content: "{{ 'ALIAS_BUYER_TH_HIGHBID'|trans }}"; }
  116.         body .myorders td:nth-of-type(6):before { content: "{{ 'ALIAS_BUYER_TH_RESPRICE'|trans }}"; }
  117.         body .myorders td:nth-of-type(7):before { content: "{{ 'ALIAS_BUYER_TH_INVOICE'|trans }}"; }
  118.         body .myorders td:nth-of-type(8):before { content: "{{ 'ALIAS_BUYER_TH_PAYMENT'|trans }}"; }
  119.         body .myorders td:nth-of-type(9):before { content: "{{ 'ALIAS_BUYER_TH_RECIEPT'|trans }}"; }
  120.         body .myorders td:nth-of-type(10):before { content: "{{ 'info_label_app-index_myorders-object-picked-up'|trans }}"; }
  121.     }
  122. </style>
  123. {# Google Tag Manager #}
  124. {% if GTM_SERVERSIDE is defined and GTM_SERVERSIDE %}
  125. <script>
  126.     (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  127.             new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  128.         j=d.createElement(s);j.async=true;j.src=
  129.         "https://load.ss.klaravik.se/6ksghucrnc.js?"+i;f.parentNode.insertBefore(j,f);
  130.     })(window,document,'script','dataLayer','3pab=CgpPJCElSiNVPSRRTSRBBV5cXFJTDAlOCAITERQeDhhNHRc%3D');
  131. </script>
  132. {% elseif GTM_ID is defined and GTM_ID is not empty %}
  133. <script>
  134.     (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  135.       new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  136.     j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  137.     'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  138.   })(window,document,'script','dataLayer', '{{ GTM_ID }}');
  139. </script>
  140. {% endif %}
  141. {# End Google Tag Manager #}
  142. <script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
  143. {# Structured Data (JSON-LD) for SEO/AIO #}
  144. {# On product pages, we skip Organization schema (product location differs from Klaravik HQ) #}
  145. {# Product pages output their own Product, Breadcrumb, and Event schemas #}
  146. {# Note: Address intentionally omitted as auction items are not at Klaravik's physical location #}
  147. {# Contact info comes from centralized .env configuration #}
  148. {% set instance = instance|default('se') %}
  149. {% set isProductPage = products_id is defined and products_id is not empty %}
  150. {% if not isProductPage %}
  151. <script type="application/ld+json">
  152. {
  153.     "@context": "https://schema.org",
  154.     "@graph": [
  155.         {
  156.             "@type": "Organization",
  157.             "name": "Klaravik",
  158.             "url": "{{ app.request.schemeAndHttpHost }}",
  159.             "logo": {
  160.                 "@type": "ImageObject",
  161.                 "url": "{{ app.request.schemeAndHttpHost }}/images/klaravik-logo.svg",
  162.                 "width": 200,
  163.                 "height": 60
  164.             },
  165.             {% if instance == 'se' %}
  166.             "description": "Klaravik är Skandinaviens ledande onlineauktionshus för begagnade maskiner, fordon och utrustning.",
  167.             "sameAs": [
  168.                 "https://www.facebook.com/Klaravik.se",
  169.                 "https://www.linkedin.com/company/klaravikab/",
  170.                 "https://www.instagram.com/klaravik.se/"
  171.             ]
  172.             {% elseif instance == 'dk' %}
  173.             "description": "Klaravik er Skandinaviens førende online auktionshus for brugte maskiner, køretøjer og udstyr.",
  174.             "sameAs": [
  175.                 "https://www.facebook.com/klaraviknetauktion",
  176.                 "https://www.linkedin.com/company/klaravik-danmark/",
  177.                 "https://www.instagram.com/klaravik.dk/"
  178.             ]
  179.             {% endif %}
  180.             {% if contactPhone is defined and contactEmail is defined %}
  181.             ,"contactPoint": {
  182.                 "@type": "ContactPoint",
  183.                 "telephone": "{{ contactPhone }}",
  184.                 "contactType": "customer service",
  185.                 "email": "{{ contactEmail }}",
  186.                 "availableLanguage": {% if instance == 'se' %}["Swedish", "English"]{% elseif instance == 'dk' %}["Danish", "English"]{% else %}["English"]{% endif %}
  187.             }
  188.             {% endif %}
  189.         },
  190.         {
  191.             "@type": "WebSite",
  192.             "name": "Klaravik",
  193.             "url": "{{ app.request.schemeAndHttpHost }}",
  194.             "potentialAction": {
  195.                 "@type": "SearchAction",
  196.                 "target": {
  197.                     "@type": "EntryPoint",
  198.                     "urlTemplate": "{{ url('app.legacy.auction.listing') }}?q={search_term_string}"
  199.                 },
  200.                 "query-input": "required name=search_term_string"
  201.             }
  202.         }
  203.     ]
  204. }
  205. </script>
  206. {% endif %}