<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* Block/header.twig */
class __TwigTemplate_88bf0d28e854925cf563f9d83e8ee6de extends \Eccube\Twig\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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/header.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/header.twig"));
// line 11
echo "
<div>
\t<div class=\"header-bar bg-blue\">
\t\t<p class=\"d-none d-md-block\">電機工事に安心して使える厳選した電材をお値打ちな価格でネット通販|電材Blue Wood</p>
\t</div>
\t<nav class=\"header-navi container\">
\t\t<div class=\"d-flex justify-content-between align-items-center w-100\">
\t\t\t<div>
\t\t\t\t<div class=\"d-flex align-items-center\">
\t\t\t\t\t";
// line 21
echo "\t \t\t\t\t";
echo twig_include($this->env, $context, "Block/nav_sp.twig");
echo "
\t\t\t\t\t<div class=\"logo-wrapper\">
\t\t\t\t\t\t<a href=\"";
// line 23
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" aria-label=\"電材Blue Wood トップページへ移動します\">
\t\t\t\t\t\t\t<img src=\"";
// line 24
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/logo.svg", "user_data"), "html", null, true);
echo "\" alt=\"電材Blue Wood\" class=\"logo\"/>
\t\t\t\t\t\t</a>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"d-none d-md-block\">
\t\t\t\t\t\t";
// line 28
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
echo "
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t\t<div>
\t\t\t\t<div class=\"hedaer-trailing\">
\t\t\t\t\t";
// line 34
echo twig_include($this->env, $context, "Block/login.twig");
echo "
\t\t\t\t\t";
// line 35
echo twig_include($this->env, $context, "Block/cart.twig");
echo "
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</nav>
\t";
// line 42
echo "\t<div class=\"d-md-none mt-6 xs-gutter\">
\t\t";
// line 43
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
echo "
\t</div>
\t";
// line 47
echo "\t";
$context["request_uri"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($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), "server", [], "any", false, false, false, 47), "get", [0 => "REQUEST_URI"], "method", false, false, false, 47);
// line 48
echo "\t";
if (((isset($context["request_uri"]) || array_key_exists("request_uri", $context) ? $context["request_uri"] : (function () { throw new RuntimeError('Variable "request_uri" does not exist.', 48, $this->source); })()) == "/")) {
// line 49
echo "\t";
$context["NewsList"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\News"), "getList", [], "method", false, false, false, 49);
// line 50
echo "\t<div class=\"mt-4 mt-md-0 xs-gutter\">
\t\t<div id=\"header-news\" class=\"header-news\">
\t\t\t";
// line 52
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList", $context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.', 52, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
// line 53
echo "\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 53) == 1)) {
// line 54
echo " \t<a href=";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("news_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["News"], "id", [], "any", false, false, false, 54)]), "html", null, true);
echo " class=\"header-news__text\">
\t\t\t\t\t";
// line 55
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "title", [], "any", false, false, false, 55), "html", null, true);
echo "
\t\t\t\t</a>
\t\t\t\t";
}
// line 58
echo "\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 59
echo "\t\t</div>
\t</div>
\t";
}
// line 62
echo "
<div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "Block/header.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 165 => 62, 160 => 59, 146 => 58, 140 => 55, 135 => 54, 132 => 53, 115 => 52, 111 => 50, 108 => 49, 105 => 48, 102 => 47, 96 => 43, 93 => 42, 84 => 35, 80 => 34, 71 => 28, 64 => 24, 60 => 23, 54 => 21, 43 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
<div>
\t<div class=\"header-bar bg-blue\">
\t\t<p class=\"d-none d-md-block\">電機工事に安心して使える厳選した電材をお値打ちな価格でネット通販|電材Blue Wood</p>
\t</div>
\t<nav class=\"header-navi container\">
\t\t<div class=\"d-flex justify-content-between align-items-center w-100\">
\t\t\t<div>
\t\t\t\t<div class=\"d-flex align-items-center\">
\t\t\t\t\t{# ハンバーガー #}
\t \t\t\t\t{{ include('Block/nav_sp.twig') }}
\t\t\t\t\t<div class=\"logo-wrapper\">
\t\t\t\t\t\t<a href=\"{{ url('homepage') }}\" aria-label=\"電材Blue Wood トップページへ移動します\">
\t\t\t\t\t\t\t<img src=\"{{ asset('assets/img/logo.svg','user_data') }}\" alt=\"電材Blue Wood\" class=\"logo\"/>
\t\t\t\t\t\t</a>
\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"d-none d-md-block\">
\t\t\t\t\t\t{{ render(path('block_search_product')) }}
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t\t<div>
\t\t\t\t<div class=\"hedaer-trailing\">
\t\t\t\t\t{{ include('Block/login.twig') }}
\t\t\t\t\t{{ include('Block/cart.twig') }}
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</nav>
\t{# SP用検索フォーム #}
\t<div class=\"d-md-none mt-6 xs-gutter\">
\t\t{{ render(path('block_search_product')) }}
\t</div>
\t{# トップエージ以外はnewsを表示しない #}
\t{% set request_uri = app.request.server.get('REQUEST_URI') %}
\t{% if request_uri == '/' %}
\t{% set NewsList = repository('Eccube\\\\Entity\\\\News').getList() %}
\t<div class=\"mt-4 mt-md-0 xs-gutter\">
\t\t<div id=\"header-news\" class=\"header-news\">
\t\t\t{% for News in NewsList %}
\t\t\t\t{% if loop.index == 1 %}
\t<a href={{ url('news_detail', {'id': News.id}) }} class=\"header-news__text\">
\t\t\t\t\t{{ News.title }}
\t\t\t\t</a>
\t\t\t\t{% endif %}
\t\t\t{% endfor %}
\t\t</div>
\t</div>
\t{% endif %}
<div>
", "Block/header.twig", "/home/xs804421/stg.denzai-bluewood.com/public_html/app/template/default/Block/header.twig");
}
}