var/cache/dev/twig/8e/8ea84dce6b2b1bdc25a5102f37b3a94470ed654c3c5eecdd6d0f62306389f92a.php line 145

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. /* header.html.twig */
  15. class __TwigTemplate_8778dc5ecfcc975644268486144483bb6a510061a486626fc568c01802029d89 extends Template
  16. {
  17.     private $source;
  18.     private $macros = [];
  19.     public function __construct(Environment $env)
  20.     {
  21.         parent::__construct($env);
  22.         $this->source $this->getSourceContext();
  23.         $this->parent false;
  24.         $this->blocks = [
  25.         ];
  26.     }
  27.     protected function doDisplay(array $context, array $blocks = [])
  28.     {
  29.         $macros $this->macros;
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""header.html.twig"));
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""header.html.twig"));
  34.         // line 1
  35.         yield "<!doctype html>
  36. <html lang=\"";
  37.         // line 2
  38.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse2), "locale", [], "any"falsefalsefalse2), "html"nulltrue);
  39.         yield "\">
  40. <head>
  41.     <meta charset=\"UTF-8\">
  42.     ";
  43.         // line 5
  44.         if (((=== CoreExtension::compare($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("front_homepage"), "https://www.jihoceskejerky.cz/")) || (=== CoreExtension::compare($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("front_homepage"), "http://www.jihoceskejerky.cz/")))) {
  45.             // line 6
  46.             yield "        <meta name=\"robots\" content=\"index,follow\"/>
  47.     ";
  48.         } else {
  49.             // line 8
  50.             yield "        <meta name=\"robots\" content=\"noindex,nofollow\"/>
  51.     ";
  52.         }
  53.         // line 10
  54.         yield "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  55.     <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">
  56.     ";
  57.         // line 13
  58.         if (array_key_exists("meta"$context)) {
  59.             // line 14
  60.             yield "        <title>";
  61.             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"falsefalsefalse14);
  62.             yield "</title>
  63.         <meta property=\"og:title\" content=\"";
  64.             // line 15
  65.             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"falsefalsefalse15);
  66.             yield "\"/>
  67.     ";
  68.         }
  69.         // line 17
  70.         yield "    ";
  71.         if (array_key_exists("meta"$context)) {
  72.             // line 18
  73.             yield "        <meta name=\"description\" content=\"";
  74.             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"falsefalsefalse18);
  75.             yield "\">
  76.         <meta property=\"og:description\" content=\"";
  77.             // line 19
  78.             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"falsefalsefalse19);
  79.             yield "\" />
  80.     ";
  81.         }
  82.         // line 21
  83.         yield "    ";
  84.         if (array_key_exists("meta"$context)) {
  85.             // line 22
  86.             yield "        <meta name=\"keywords\" content=\"";
  87.             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"falsefalsefalse22);
  88.             yield "\">
  89.     ";
  90.         }
  91.         // line 24
  92.         yield "    <meta property=\"og:type\" content=\"website\" />
  93.     <meta name=\"author\" content=\"NexGen IT s.r.o. (info@nexgen.cz)\"/>
  94.     <link rel=\"stylesheet\" href=\"";
  95.         // line 28
  96.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/theme/dist/all.min.css"), "html"nulltrue);
  97.         yield "\">
  98.     <link rel=\"shortcut icon\" href=\"";
  99.         // line 29
  100.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/theme/favicon.ico"), "html"nulltrue);
  101.         yield "\">
  102.     ";
  103.         // line 30
  104.         if ((=== CoreExtension::compare(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse30), "getSchemeAndHttpHost", [], "method"falsefalsefalse30), "http://localhost:8000"))) {
  105.             // line 31
  106.             yield "        <script src=\"http://localhost:35731/livereload.js\"></script>
  107.     ";
  108.         }
  109.         // line 33
  110.         yield "    ";
  111.         yield $this->extensions['NexCRM\WebBundle\Twig\MarketingTwigExtension']->marketing("head_end");
  112.         yield "
  113. </head>
  114. <body>
  115. ";
  116.         // line 36
  117.         yield $this->extensions['NexCRM\WebBundle\Twig\MarketingTwigExtension']->marketing("body_start");
  118.         yield "
  119. <header class=\"header\">
  120.     <div class=\"container\">
  121.         <a href=\"";
  122.         // line 39
  123.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("front_homepage");
  124.         yield "\" class=\"header__logo\">
  125.             <img src=\"";
  126.         // line 40
  127.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/theme/img/logo/logo.svg"), "html"nulltrue);
  128.         yield "\" alt=\"logo\">
  129.         </a>
  130.         ";
  131.         // line 43
  132.         yield from         $this->loadTemplate("front/snippet/basket.html.twig""header.html.twig"43)->unwrap()->yield($context);
  133.         // line 44
  134.         yield "        ";
  135.         $context["nonActiveLangs"] = [];
  136.         // line 45
  137.         yield "        ";
  138.         $context["activeLang"] = [];
  139.         // line 46
  140.         yield "        ";
  141.         $context['_parent'] = $context;
  142.         $context['_seq'] = CoreExtension::ensureTraversable(((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse46), "get", ["nexsys.langs"], "method"truetruefalse46)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse46), "get", ["nexsys.langs"], "method"falsefalsefalse46), [])) : ([])));
  143.         foreach ($context['_seq'] as $context["_key"] => $context["lang"]) {
  144.             // line 47
  145.             if ((=== CoreExtension::compare(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse47), "locale", [], "any"falsefalsefalse47), CoreExtension::getAttribute($this->env$this->source$context["lang"], "iso2", [], "any"falsefalsefalse47)))) {
  146.                 // line 48
  147.                 $context["activeLang"] = $context["lang"];
  148.             } else {
  149.                 // line 50
  150.                 $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"]]);
  151.             }
  152.         }
  153.         $_parent $context['_parent'];
  154.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lang'], $context['_parent'], $context['loop']);
  155.         $context array_intersect_key($context$_parent) + $_parent;
  156.         // line 53
  157.         yield "        <nav class=\"nav\">
  158.             <div class=\"nav__scroll\">
  159.                 <ul>
  160.                     ";
  161.         // line 56
  162.         $context['_parent'] = $context;
  163.         $context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::filter($this->envCoreExtension::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"falsefalsefalse56), function ($__menu__) use ($context$macros) { $context["menu"] = $__menu__; return Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env$this->source$context["menu"], "parent", [], "any"falsefalsefalse56)); }));
  164.         foreach ($context['_seq'] as $context["_key"] => $context["menu"]) {
  165.             // line 57
  166.             yield "                        <li>
  167.                             <a href=\"";
  168.             // line 58
  169.             yield $this->extensions['NexCRM\WebBundle\Twig\TwigExtension']->getUrl($context["menu"]);
  170.             yield "\">";
  171.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source$context["menu"], "translate", [], "any"falsefalsefalse58), "name", [], "any"falsefalsefalse58), "html"nulltrue);
  172.             yield "</a>
  173.                         </li>
  174.                     ";
  175.         }
  176.         $_parent $context['_parent'];
  177.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['menu'], $context['_parent'], $context['loop']);
  178.         $context array_intersect_key($context$_parent) + $_parent;
  179.         // line 61
  180.         yield "
  181.                     <li><a href=\"";
  182.         // line 62
  183.         if (CoreExtension::getAttribute($this->env$this->source, ($context["pt"] ?? null), "shop", [], "array"truetruefalse62)) {
  184.             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"falsefalsefalse62)), "html"nulltrue);
  185.         }
  186.         yield "\"><span class=\"button button--buy\">";
  187.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Koupit"), "html"nulltrue);
  188.         yield "</span></a>
  189.                     <li><span>";
  190.         // line 63
  191.         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"falsefalsefalse63), "html"nulltrue);
  192.         yield "</span>
  193.                         <ul>
  194.                             ";
  195.         // line 65
  196.         $context['_parent'] = $context;
  197.         $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); })()));
  198.         foreach ($context['_seq'] as $context["_key"] => $context["lang"]) {
  199.             // line 66
  200.             yield "                                ";
  201.             if (CoreExtension::getAttribute($this->env$this->source$context["lang"], "active", [], "any"falsefalsefalse66)) {
  202.                 // line 67
  203.                 yield "                                    <li>
  204.                                         <a href=\"";
  205.                 // line 68
  206.                 if (array_key_exists("page"$context)) {
  207.                     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"falsefalsefalse68)), "html"nulltrue);
  208.                 } else {
  209.                     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"falsefalsefalse68)]), "html"nulltrue);
  210.                 }
  211.                 yield "\">
  212.                                             ";
  213.                 // line 69
  214.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->source$context["lang"], "iso2", [], "any"falsefalsefalse69), "html"nulltrue);
  215.                 yield "
  216.                                         </a>
  217.                                     </li>
  218.                                 ";
  219.             }
  220.             // line 73
  221.             yield "                            ";
  222.         }
  223.         $_parent $context['_parent'];
  224.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['lang'], $context['_parent'], $context['loop']);
  225.         $context array_intersect_key($context$_parent) + $_parent;
  226.         // line 74
  227.         yield "                        </ul>
  228.                     </li>
  229.                 </ul>
  230.             </div>
  231.         </nav>
  232.         <div class=\"burger\">
  233.             <a href='#' class=\"burger__nav js-burger\">
  234.                 <span></span>
  235.             </a>
  236.         </div>
  237.     </div>
  238. </header>
  239. ";
  240.         
  241.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  242.         
  243.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  244.         return; yield '';
  245.     }
  246.     /**
  247.      * @codeCoverageIgnore
  248.      */
  249.     public function getTemplateName()
  250.     {
  251.         return "header.html.twig";
  252.     }
  253.     /**
  254.      * @codeCoverageIgnore
  255.      */
  256.     public function isTraitable()
  257.     {
  258.         return false;
  259.     }
  260.     /**
  261.      * @codeCoverageIgnore
  262.      */
  263.     public function getDebugInfo()
  264.     {
  265.         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,);
  266.     }
  267.     public function getSourceContext()
  268.     {
  269.         return new Source("<!doctype html>
  270. <html lang=\"{{ app.request.locale }}\">
  271. <head>
  272.     <meta charset=\"UTF-8\">
  273.     {% if url('front_homepage') == \"https://www.jihoceskejerky.cz/\" or url('front_homepage') == \"http://www.jihoceskejerky.cz/\" %}
  274.         <meta name=\"robots\" content=\"index,follow\"/>
  275.     {% else %}
  276.         <meta name=\"robots\" content=\"noindex,nofollow\"/>
  277.     {% endif %}
  278.     <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  279.     <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">
  280.     {% if meta is defined %}
  281.         <title>{{ meta.title|raw }}</title>
  282.         <meta property=\"og:title\" content=\"{{- meta.title|raw }}\"/>
  283.     {% endif %}
  284.     {% if meta is defined %}
  285.         <meta name=\"description\" content=\"{{ meta.description|raw }}\">
  286.         <meta property=\"og:description\" content=\"{{ meta.description|raw }}\" />
  287.     {% endif %}
  288.     {% if meta is defined %}
  289.         <meta name=\"keywords\" content=\"{{ meta.keywords|raw }}\">
  290.     {% endif %}
  291.     <meta property=\"og:type\" content=\"website\" />
  292.     <meta name=\"author\" content=\"NexGen IT s.r.o. (info@nexgen.cz)\"/>
  293.     <link rel=\"stylesheet\" href=\"{{ asset('assets/theme/dist/all.min.css') }}\">
  294.     <link rel=\"shortcut icon\" href=\"{{ asset('assets/theme/favicon.ico') }}\">
  295.     {% if app.request.getSchemeAndHttpHost() == \"http://localhost:8000\" %}
  296.         <script src=\"http://localhost:35731/livereload.js\"></script>
  297.     {% endif %}
  298.     {{ marketing('head_end') }}
  299. </head>
  300. <body>
  301. {{ marketing('body_start') }}
  302. <header class=\"header\">
  303.     <div class=\"container\">
  304.         <a href=\"{{ path('front_homepage') }}\" class=\"header__logo\">
  305.             <img src=\"{{ asset('assets/theme/img/logo/logo.svg') }}\" alt=\"logo\">
  306.         </a>
  307.         {% include 'front/snippet/basket.html.twig' %}
  308.         {% set nonActiveLangs = [] %}
  309.         {% set activeLang = {} %}
  310.         {% for lang in app.request.get('nexsys.langs')|default([])%}
  311.             {%- if app.request.locale == lang.iso2 -%}
  312.                 {% set activeLang = lang %}
  313.             {%- else -%}
  314.                 {% set nonActiveLangs = nonActiveLangs|merge([lang]) %}
  315.             {%- endif -%}
  316.         {% endfor %}
  317.         <nav class=\"nav\">
  318.             <div class=\"nav__scroll\">
  319.                 <ul>
  320.                     {% for menu in menus['header_menu']|filter(menu => menu.parent is empty) %}
  321.                         <li>
  322.                             <a href=\"{{ menu|get_url|raw }}\">{{ menu.translate.name }}</a>
  323.                         </li>
  324.                     {% endfor %}
  325.                     <li><a href=\"{% if pt['shop'] is defined %}{{ pt['shop']|trans_path }}{% endif %}\"><span class=\"button button--buy\">{{ 'Koupit'|trans }}</span></a>
  326.                     <li><span>{{ activeLang.iso2 }}</span>
  327.                         <ul>
  328.                             {% for lang in nonActiveLangs %}
  329.                                 {% if lang.active %}
  330.                                     <li>
  331.                                         <a href=\"{% if page is defined %}{{ page|trans_path(lang.iso2) }}{% else %}{{ path('front_basket', {'_locale': lang.iso2}) }}{% endif %}\">
  332.                                             {{ lang.iso2 }}
  333.                                         </a>
  334.                                     </li>
  335.                                 {% endif %}
  336.                             {% endfor %}
  337.                         </ul>
  338.                     </li>
  339.                 </ul>
  340.             </div>
  341.         </nav>
  342.         <div class=\"burger\">
  343.             <a href='#' class=\"burger__nav js-burger\">
  344.                 <span></span>
  345.             </a>
  346.         </div>
  347.     </div>
  348. </header>
  349. ""header.html.twig""/home/web/nexgen.cz/dev58/templates/header.html.twig");
  350.     }
  351. }