<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* header.html.twig */
class __TwigTemplate_8778dc5ecfcc975644268486144483bb6a510061a486626fc568c01802029d89 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "header.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "header.html.twig"));
// line 1
yield "<!doctype html>
<html lang=\"";
// line 2
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 2, $this->source); })()), "request", [], "any", false, false, false, 2), "locale", [], "any", false, false, false, 2), "html", null, true);
yield "\">
<head>
<meta charset=\"UTF-8\">
";
// line 5
if (((0 === CoreExtension::compare($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("front_homepage"), "https://www.jihoceskejerky.cz/")) || (0 === CoreExtension::compare($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("front_homepage"), "http://www.jihoceskejerky.cz/")))) {
// line 6
yield " <meta name=\"robots\" content=\"index,follow\"/>
";
} else {
// line 8
yield " <meta name=\"robots\" content=\"noindex,nofollow\"/>
";
}
// line 10
yield " <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">
";
// line 13
if (array_key_exists("meta", $context)) {
// line 14
yield " <title>";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["meta"]) || array_key_exists("meta", $context) ? $context["meta"] : (function () { throw new RuntimeError('Variable "meta" does not exist.', 14, $this->source); })()), "title", [], "any", false, false, false, 14);
yield "</title>
<meta property=\"og:title\" content=\"";
// line 15
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["meta"]) || array_key_exists("meta", $context) ? $context["meta"] : (function () { throw new RuntimeError('Variable "meta" does not exist.', 15, $this->source); })()), "title", [], "any", false, false, false, 15);
yield "\"/>
";
}
// line 17
yield " ";
if (array_key_exists("meta", $context)) {
// line 18
yield " <meta name=\"description\" content=\"";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["meta"]) || array_key_exists("meta", $context) ? $context["meta"] : (function () { throw new RuntimeError('Variable "meta" does not exist.', 18, $this->source); })()), "description", [], "any", false, false, false, 18);
yield "\">
<meta property=\"og:description\" content=\"";
// line 19
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["meta"]) || array_key_exists("meta", $context) ? $context["meta"] : (function () { throw new RuntimeError('Variable "meta" does not exist.', 19, $this->source); })()), "description", [], "any", false, false, false, 19);
yield "\" />
";
}
// line 21
yield " ";
if (array_key_exists("meta", $context)) {
// line 22
yield " <meta name=\"keywords\" content=\"";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["meta"]) || array_key_exists("meta", $context) ? $context["meta"] : (function () { throw new RuntimeError('Variable "meta" does not exist.', 22, $this->source); })()), "keywords", [], "any", false, false, false, 22);
yield "\">
";
}
// line 24
yield " <meta property=\"og:type\" content=\"website\" />
<meta name=\"author\" content=\"NexGen IT s.r.o. (info@nexgen.cz)\"/>
<link rel=\"stylesheet\" href=\"";
// line 28
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/theme/dist/all.min.css"), "html", null, true);
yield "\">
<link rel=\"shortcut icon\" href=\"";
// line 29
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/theme/favicon.ico"), "html", null, true);
yield "\">
";
// line 30
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 30, $this->source); })()), "request", [], "any", false, false, false, 30), "getSchemeAndHttpHost", [], "method", false, false, false, 30), "http://localhost:8000"))) {
// line 31
yield " <script src=\"http://localhost:35731/livereload.js\"></script>
";
}
// line 33
yield " ";
yield $this->extensions['NexCRM\WebBundle\Twig\MarketingTwigExtension']->marketing("head_end");
yield "
</head>
<body>
";
// line 36
yield $this->extensions['NexCRM\WebBundle\Twig\MarketingTwigExtension']->marketing("body_start");
yield "
<header class=\"header\">
<div class=\"container\">
<a href=\"";
// line 39
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_homepage");
yield "\" class=\"header__logo\">
<img src=\"";
// line 40
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/theme/img/logo/logo.svg"), "html", null, true);
yield "\" alt=\"logo\">
</a>
";
// line 43
yield from $this->loadTemplate("front/snippet/basket.html.twig", "header.html.twig", 43)->unwrap()->yield($context);
// line 44
yield " ";
$context["nonActiveLangs"] = [];
// line 45
yield " ";
$context["activeLang"] = [];
// line 46
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, true, false, 46), "get", ["nexsys.langs"], "method", true, true, false, 46)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, true, false, 46), "get", ["nexsys.langs"], "method", false, false, false, 46), [])) : ([])));
foreach ($context['_seq'] as $context["_key"] => $context["lang"]) {
// line 47
if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 47, $this->source); })()), "request", [], "any", false, false, false, 47), "locale", [], "any", false, false, false, 47), CoreExtension::getAttribute($this->env, $this->source, $context["lang"], "iso2", [], "any", false, false, false, 47)))) {
// line 48
$context["activeLang"] = $context["lang"];
} else {
// line 50
$context["nonActiveLangs"] = Twig\Extension\CoreExtension::merge((isset($context["nonActiveLangs"]) || array_key_exists("nonActiveLangs", $context) ? $context["nonActiveLangs"] : (function () { throw new RuntimeError('Variable "nonActiveLangs" does not exist.', 50, $this->source); })()), [$context["lang"]]);
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lang'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 53
yield " <nav class=\"nav\">
<div class=\"nav__scroll\">
<ul>
";
// line 56
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::filter($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["menus"]) || array_key_exists("menus", $context) ? $context["menus"] : (function () { throw new RuntimeError('Variable "menus" does not exist.', 56, $this->source); })()), "header_menu", [], "array", false, false, false, 56), function ($__menu__) use ($context, $macros) { $context["menu"] = $__menu__; return Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["menu"], "parent", [], "any", false, false, false, 56)); }));
foreach ($context['_seq'] as $context["_key"] => $context["menu"]) {
// line 57
yield " <li>
<a href=\"";
// line 58
yield $this->extensions['NexCRM\WebBundle\Twig\TwigExtension']->getUrl($context["menu"]);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["menu"], "translate", [], "any", false, false, false, 58), "name", [], "any", false, false, false, 58), "html", null, true);
yield "</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['menu'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 61
yield "
<li><a href=\"";
// line 62
if (CoreExtension::getAttribute($this->env, $this->source, ($context["pt"] ?? null), "shop", [], "array", true, true, false, 62)) {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['NexCRM\WebBundle\Twig\TwigExtension']->transPath(CoreExtension::getAttribute($this->env, $this->source, (isset($context["pt"]) || array_key_exists("pt", $context) ? $context["pt"] : (function () { throw new RuntimeError('Variable "pt" does not exist.', 62, $this->source); })()), "shop", [], "array", false, false, false, 62)), "html", null, true);
}
yield "\"><span class=\"button button--buy\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Koupit"), "html", null, true);
yield "</span></a>
<li><span>";
// line 63
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeLang"]) || array_key_exists("activeLang", $context) ? $context["activeLang"] : (function () { throw new RuntimeError('Variable "activeLang" does not exist.', 63, $this->source); })()), "iso2", [], "any", false, false, false, 63), "html", null, true);
yield "</span>
<ul>
";
// line 65
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["nonActiveLangs"]) || array_key_exists("nonActiveLangs", $context) ? $context["nonActiveLangs"] : (function () { throw new RuntimeError('Variable "nonActiveLangs" does not exist.', 65, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["lang"]) {
// line 66
yield " ";
if (CoreExtension::getAttribute($this->env, $this->source, $context["lang"], "active", [], "any", false, false, false, 66)) {
// line 67
yield " <li>
<a href=\"";
// line 68
if (array_key_exists("page", $context)) {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['NexCRM\WebBundle\Twig\TwigExtension']->transPath((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 68, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["lang"], "iso2", [], "any", false, false, false, 68)), "html", null, true);
} else {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_basket", ["_locale" => CoreExtension::getAttribute($this->env, $this->source, $context["lang"], "iso2", [], "any", false, false, false, 68)]), "html", null, true);
}
yield "\">
";
// line 69
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["lang"], "iso2", [], "any", false, false, false, 69), "html", null, true);
yield "
</a>
</li>
";
}
// line 73
yield " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lang'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 74
yield " </ul>
</li>
</ul>
</div>
</nav>
<div class=\"burger\">
<a href='#' class=\"burger__nav js-burger\">
<span></span>
</a>
</div>
</div>
</header>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "header.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 240 => 74, 234 => 73, 227 => 69, 219 => 68, 216 => 67, 213 => 66, 209 => 65, 204 => 63, 196 => 62, 193 => 61, 182 => 58, 179 => 57, 175 => 56, 170 => 53, 163 => 50, 160 => 48, 158 => 47, 153 => 46, 150 => 45, 147 => 44, 145 => 43, 139 => 40, 135 => 39, 129 => 36, 122 => 33, 118 => 31, 116 => 30, 112 => 29, 108 => 28, 102 => 24, 96 => 22, 93 => 21, 88 => 19, 83 => 18, 80 => 17, 75 => 15, 70 => 14, 68 => 13, 63 => 10, 59 => 8, 55 => 6, 53 => 5, 47 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("<!doctype html>
<html lang=\"{{ app.request.locale }}\">
<head>
<meta charset=\"UTF-8\">
{% if url('front_homepage') == \"https://www.jihoceskejerky.cz/\" or url('front_homepage') == \"http://www.jihoceskejerky.cz/\" %}
<meta name=\"robots\" content=\"index,follow\"/>
{% else %}
<meta name=\"robots\" content=\"noindex,nofollow\"/>
{% endif %}
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">
{% if meta is defined %}
<title>{{ meta.title|raw }}</title>
<meta property=\"og:title\" content=\"{{- meta.title|raw }}\"/>
{% endif %}
{% if meta is defined %}
<meta name=\"description\" content=\"{{ meta.description|raw }}\">
<meta property=\"og:description\" content=\"{{ meta.description|raw }}\" />
{% endif %}
{% if meta is defined %}
<meta name=\"keywords\" content=\"{{ meta.keywords|raw }}\">
{% endif %}
<meta property=\"og:type\" content=\"website\" />
<meta name=\"author\" content=\"NexGen IT s.r.o. (info@nexgen.cz)\"/>
<link rel=\"stylesheet\" href=\"{{ asset('assets/theme/dist/all.min.css') }}\">
<link rel=\"shortcut icon\" href=\"{{ asset('assets/theme/favicon.ico') }}\">
{% if app.request.getSchemeAndHttpHost() == \"http://localhost:8000\" %}
<script src=\"http://localhost:35731/livereload.js\"></script>
{% endif %}
{{ marketing('head_end') }}
</head>
<body>
{{ marketing('body_start') }}
<header class=\"header\">
<div class=\"container\">
<a href=\"{{ path('front_homepage') }}\" class=\"header__logo\">
<img src=\"{{ asset('assets/theme/img/logo/logo.svg') }}\" alt=\"logo\">
</a>
{% include 'front/snippet/basket.html.twig' %}
{% set nonActiveLangs = [] %}
{% set activeLang = {} %}
{% for lang in app.request.get('nexsys.langs')|default([])%}
{%- if app.request.locale == lang.iso2 -%}
{% set activeLang = lang %}
{%- else -%}
{% set nonActiveLangs = nonActiveLangs|merge([lang]) %}
{%- endif -%}
{% endfor %}
<nav class=\"nav\">
<div class=\"nav__scroll\">
<ul>
{% for menu in menus['header_menu']|filter(menu => menu.parent is empty) %}
<li>
<a href=\"{{ menu|get_url|raw }}\">{{ menu.translate.name }}</a>
</li>
{% endfor %}
<li><a href=\"{% if pt['shop'] is defined %}{{ pt['shop']|trans_path }}{% endif %}\"><span class=\"button button--buy\">{{ 'Koupit'|trans }}</span></a>
<li><span>{{ activeLang.iso2 }}</span>
<ul>
{% for lang in nonActiveLangs %}
{% if lang.active %}
<li>
<a href=\"{% if page is defined %}{{ page|trans_path(lang.iso2) }}{% else %}{{ path('front_basket', {'_locale': lang.iso2}) }}{% endif %}\">
{{ lang.iso2 }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
</ul>
</div>
</nav>
<div class=\"burger\">
<a href='#' class=\"burger__nav js-burger\">
<span></span>
</a>
</div>
</div>
</header>
", "header.html.twig", "/home/web/nexgen.cz/dev58/templates/header.html.twig");
}
}