templates/header.html.twig line 43

Open in your IDE?
  1. <!doctype html>
  2. <html lang="{{ app.request.locale }}">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     {% if url('front_homepage') == "https://www.jihoceskejerky.cz/" or url('front_homepage') == "http://www.jihoceskejerky.cz/" %}
  6.         <meta name="robots" content="index,follow"/>
  7.     {% else %}
  8.         <meta name="robots" content="noindex,nofollow"/>
  9.     {% endif %}
  10.     <meta name="viewport" content="width=device-width, initial-scale=1">
  11.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  12.     {% if meta is defined %}
  13.         <title>{{ meta.title|raw }}</title>
  14.         <meta property="og:title" content="{{- meta.title|raw }}"/>
  15.     {% endif %}
  16.     {% if meta is defined %}
  17.         <meta name="description" content="{{ meta.description|raw }}">
  18.         <meta property="og:description" content="{{ meta.description|raw }}" />
  19.     {% endif %}
  20.     {% if meta is defined %}
  21.         <meta name="keywords" content="{{ meta.keywords|raw }}">
  22.     {% endif %}
  23.     <meta property="og:type" content="website" />
  24.     <meta name="author" content="NexGen IT s.r.o. (info@nexgen.cz)"/>
  25.     <link rel="stylesheet" href="{{ asset('assets/theme/dist/all.min.css') }}">
  26.     <link rel="shortcut icon" href="{{ asset('assets/theme/favicon.ico') }}">
  27.     {% if app.request.getSchemeAndHttpHost() == "http://localhost:8000" %}
  28.         <script src="http://localhost:35731/livereload.js"></script>
  29.     {% endif %}
  30.     {{ marketing('head_end') }}
  31. </head>
  32. <body>
  33. {{ marketing('body_start') }}
  34. <header class="header">
  35.     <div class="container">
  36.         <a href="{{ path('front_homepage') }}" class="header__logo">
  37.             <img src="{{ asset('assets/theme/img/logo/logo.svg') }}" alt="logo">
  38.         </a>
  39.         {% include 'front/snippet/basket.html.twig' %}
  40.         {% set nonActiveLangs = [] %}
  41.         {% set activeLang = {} %}
  42.         {% for lang in app.request.get('nexsys.langs')|default([])%}
  43.             {%- if app.request.locale == lang.iso2 -%}
  44.                 {% set activeLang = lang %}
  45.             {%- else -%}
  46.                 {% set nonActiveLangs = nonActiveLangs|merge([lang]) %}
  47.             {%- endif -%}
  48.         {% endfor %}
  49.         <nav class="nav">
  50.             <div class="nav__scroll">
  51.                 <ul>
  52.                     {% for menu in menus['header_menu']|filter(menu => menu.parent is empty) %}
  53.                         <li>
  54.                             <a href="{{ menu|get_url|raw }}">{{ menu.translate.name }}</a>
  55.                         </li>
  56.                     {% endfor %}
  57.                     <li><a href="{% if pt['shop'] is defined %}{{ pt['shop']|trans_path }}{% endif %}"><span class="button button--buy">{{ 'Koupit'|trans }}</span></a>
  58.                     <li><span>{{ activeLang.iso2 }}</span>
  59.                         <ul>
  60.                             {% for lang in nonActiveLangs %}
  61.                                 {% if lang.active %}
  62.                                     <li>
  63.                                         <a href="{% if page is defined %}{{ page|trans_path(lang.iso2) }}{% else %}{{ path('front_basket', {'_locale': lang.iso2}) }}{% endif %}">
  64.                                             {{ lang.iso2 }}
  65.                                         </a>
  66.                                     </li>
  67.                                 {% endif %}
  68.                             {% endfor %}
  69.                         </ul>
  70.                     </li>
  71.                 </ul>
  72.             </div>
  73.         </nav>
  74.         <div class="burger">
  75.             <a href='#' class="burger__nav js-burger">
  76.                 <span></span>
  77.             </a>
  78.         </div>
  79.     </div>
  80. </header>