<?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_42cad215c33100922ffa4eaa4762497a 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 = [
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
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
$this->displayBlock('javascript', $context, $blocks);
// line 30
$context["totalQuantity"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_quantity();
// line 31
$context["categories"] = [0 => ["name" => "お仏壇", "id" => "1"], 1 => ["name" => "お位牌", "id" => "2"], 2 => ["name" => "仏具", "id" => "3"], 3 => ["name" => "セット", "id" => "4"], 4 => ["name" => "手元供養", "id" => "21"]];
// line 53
echo "
";
// line 54
$this->displayBlock('main', $context, $blocks);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 11
public function block_javascript($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(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 12
echo "\t";
// line 13
echo "\t<script>
\t\t\$(document).ready(function () {
\$(\".navigation\").hide();
\$(function () {
\$('.js-hamburger-menu').on('click', function () {
\$('.navigation').slideToggle(500)
\$('.navigation').toggleClass('active')
\$('.hamburger-menu-top').toggleClass('top-0 top-3 lg:top-4 rotate-45 rotate-0')
\$('.hamburger-menu-middle').toggleClass('hidden')
\$('.hamburger-menu-bottom').toggleClass('-rotate-45 rotate-0 lg:top-4')
\$('.hamburger-menu-text').toggleClass('opacity-0 opacity-100')
});
});
});
\t</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 54
public function block_main($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(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 55
echo "\t<div class=\"bg-white h-[82px] bg-opacity-95 fixed z-20 w-full px-6 lg:px-2 lg:h-[56px] py-4\">
\t\t<a href=\"";
// line 56
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\" class=\"hover w-[298px] lg:w-[180px] absolute -translate-x-1/2 left-1/2 mx-auto my-[6px] lg:my-1\">
\t\t\t<img src=\"";
// line 57
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/header/site-logo.png"), "html", null, true);
echo "\" alt=\"site_logo on Header\" class=\"\">
\t\t</a>
\t\t<div class=\"flex items-center justify-between\">
\t\t\t<a href=\"tel:0355795671\" class=\"lg:hidden hover flex gap-3 items-center\">
\t\t\t\t<i class=\"fas fa-phone fa-flip-horizontal fa-lg\" style=\"color: #585858;\"></i>
\t\t\t\t<p class=\"text-[#0F0F0F] font-extralight text-sm tracking-[4.4px]\">03-5579-5671</p>
\t\t\t</a>
\t\t\t";
// line 65
echo "\t\t\t<div class=\"lg:flex hidden cursor-pointer w-7 items-center justify-center\">
\t\t\t\t<button class=\"relative js-hamburger-menu h-7 w-7\">
\t\t\t\t\t<span class=\"hamburger-menu-top h-[0.8px] absolute top-0 right-0 bg-black w-7 inline-block rotate-0 duration-300\"></span>
\t\t\t\t\t<span class=\"hamburger-menu-middle h-[0.8px] absolute top-[9px] right-0 bg-black w-7 inline-block duration-300\"></span>
\t\t\t\t\t<span class=\"hamburger-menu-bottom h-[0.8px] absolute top-[18px] right-0 bg-black w-7 inline-block rotate-0 duration-300\"></span>
\t\t\t\t</button>
\t\t\t</div>
\t\t\t<div class=\"flex items-center gap-10 lg:gap-3\">
\t\t\t\t<a href=\"";
// line 73
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
echo " /mypage ";
} else {
echo " /mypage/login ";
}
echo "\" class=\"hover h-fit flex\">
\t\t\t\t\t";
// line 74
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
// line 75
echo "\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" viewbox=\"0 0 512 512\" class=\"w-6\"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path fill=\"#585858\" d=\"M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z\"/></svg>
\t\t\t\t\t";
} else {
// line 77
echo "\t\t\t\t\t\t<div class=\"flex gap-2 border-[#EFEFEF] border rounded py-3 lg:py-2 px-7 items-center lg:hidden\">
\t\t\t\t\t\t\t<img src=\"";
// line 78
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/header/heroicons-solid/user.svg"), "html", null, true);
echo "\" alt=\"register_login_btn on Header\" class=\"w-6 h-auto\">
\t\t\t\t\t\t\t<p class=\"font-light font-notosans text-xs\">会員登録・ログイン</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<img src=\"";
// line 81
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/header/heroicons-solid/user.svg"), "html", null, true);
echo "\" alt=\"register_login_btn on Header\" class=\"lg:block hidden w-6 h-6\">
\t\t\t\t\t";
}
// line 83
echo "\t\t\t\t</a>
\t\t\t\t<div class=\"flex items-center gap-8\">
\t\t\t\t\t<a href=\"";
// line 85
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
echo "\" class=\"relative cursor-pointer\">
\t\t\t\t\t\t<img src=\"";
// line 86
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/header/cart.png"), "html", null, true);
echo "\" alt=\"cart on Header\">
\t\t\t\t\t\t<span class=\"absolute -right-1 -bottom-3 bg-white rounded-[50%] w-5 h-5 text-center text-xs leading-5 shadow-md\">
\t\t\t\t\t\t\t";
// line 88
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["totalQuantity"]) || array_key_exists("totalQuantity", $context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.', 88, $this->source); })()), 88, $this->source)), "html", null, true);
echo "
\t\t\t\t\t\t</span>
\t\t\t\t\t</a>
\t\t\t\t\t<div class=\"lg:hidden cursor-pointer pt-2\">
\t\t\t\t\t\t<button class=\"relative js-hamburger-menu h-4 w-full\">
\t\t\t\t\t\t\t<span class=\"hamburger-menu-top h-px absolute top-0 right-0 bg-black w-9 inline-block rotate-0 duration-300\"></span>
\t\t\t\t\t\t\t<span class=\"hamburger-menu-middle h-px absolute top-1.5 right-0 bg-black w-9 inline-block duration-300\"></span>
\t\t\t\t\t\t\t<span class=\"hamburger-menu-bottom h-px absolute top-3 right-0 bg-black w-9 inline-block rotate-0 duration-300\"></span>
\t\t\t\t\t\t</button>
\t\t\t\t\t\t<p class=\"hamburger-menu-text text-[11px] font-bold duration-300 opacity-100\">MENU</p>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t<nav class=\"navigation fixed hidden top-[82px] left-0 z-20 bg-white h-[calc(100%-81px)] w-full bg-opacity-95 py-20 overflow-y-scroll lg:h-[calc(100%-44px)] lg:top-[56px] lg:py-6\">
\t\t";
// line 104
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "hamburger.twig");
echo "
\t</nav>
\t<div class=\"opacity-0 h-[164px] lg:h-[52px]\">ヘッダーの高さ分の要素</div>
";
// line 107
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "sticky-nav.twig");
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Block/header.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 207 => 107, 201 => 104, 182 => 88, 177 => 86, 173 => 85, 169 => 83, 164 => 81, 158 => 78, 155 => 77, 151 => 75, 149 => 74, 141 => 73, 131 => 65, 121 => 57, 117 => 56, 114 => 55, 104 => 54, 78 => 13, 76 => 12, 66 => 11, 56 => 54, 53 => 53, 51 => 31, 49 => 30, 47 => 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.
#}
{% block javascript %}
\t{# ハンバーガーメニュー開閉の処理 #}
\t<script>
\t\t\$(document).ready(function () {
\$(\".navigation\").hide();
\$(function () {
\$('.js-hamburger-menu').on('click', function () {
\$('.navigation').slideToggle(500)
\$('.navigation').toggleClass('active')
\$('.hamburger-menu-top').toggleClass('top-0 top-3 lg:top-4 rotate-45 rotate-0')
\$('.hamburger-menu-middle').toggleClass('hidden')
\$('.hamburger-menu-bottom').toggleClass('-rotate-45 rotate-0 lg:top-4')
\$('.hamburger-menu-text').toggleClass('opacity-0 opacity-100')
});
});
});
\t</script>
{% endblock javascript %}
{% set totalQuantity = get_carts_total_quantity() %}
{% set categories = [
{
'name': 'お仏壇',
'id':'1',
},
{
'name': 'お位牌',
'id':'2',
},
{
'name': '仏具',
'id':'3',
},
{
'name': 'セット',
'id':'4',
},
{
'name': '手元供養',
'id':'21',
},
] %}
{% block main %}
\t<div class=\"bg-white h-[82px] bg-opacity-95 fixed z-20 w-full px-6 lg:px-2 lg:h-[56px] py-4\">
\t\t<a href=\"{{url('homepage')}}\" class=\"hover w-[298px] lg:w-[180px] absolute -translate-x-1/2 left-1/2 mx-auto my-[6px] lg:my-1\">
\t\t\t<img src=\"{{ asset('assets/img/header/site-logo.png') }}\" alt=\"site_logo on Header\" class=\"\">
\t\t</a>
\t\t<div class=\"flex items-center justify-between\">
\t\t\t<a href=\"tel:0355795671\" class=\"lg:hidden hover flex gap-3 items-center\">
\t\t\t\t<i class=\"fas fa-phone fa-flip-horizontal fa-lg\" style=\"color: #585858;\"></i>
\t\t\t\t<p class=\"text-[#0F0F0F] font-extralight text-sm tracking-[4.4px]\">03-5579-5671</p>
\t\t\t</a>
\t\t\t{# SP時のハンバーガー #}
\t\t\t<div class=\"lg:flex hidden cursor-pointer w-7 items-center justify-center\">
\t\t\t\t<button class=\"relative js-hamburger-menu h-7 w-7\">
\t\t\t\t\t<span class=\"hamburger-menu-top h-[0.8px] absolute top-0 right-0 bg-black w-7 inline-block rotate-0 duration-300\"></span>
\t\t\t\t\t<span class=\"hamburger-menu-middle h-[0.8px] absolute top-[9px] right-0 bg-black w-7 inline-block duration-300\"></span>
\t\t\t\t\t<span class=\"hamburger-menu-bottom h-[0.8px] absolute top-[18px] right-0 bg-black w-7 inline-block rotate-0 duration-300\"></span>
\t\t\t\t</button>
\t\t\t</div>
\t\t\t<div class=\"flex items-center gap-10 lg:gap-3\">
\t\t\t\t<a href=\"{% if is_granted('ROLE_USER') %} /mypage {% else %} /mypage/login {% endif %}\" class=\"hover h-fit flex\">
\t\t\t\t\t{% if is_granted('ROLE_USER') %}
\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" viewbox=\"0 0 512 512\" class=\"w-6\"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path fill=\"#585858\" d=\"M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z\"/></svg>
\t\t\t\t\t{% else %}
\t\t\t\t\t\t<div class=\"flex gap-2 border-[#EFEFEF] border rounded py-3 lg:py-2 px-7 items-center lg:hidden\">
\t\t\t\t\t\t\t<img src=\"{{ asset('assets/img/header/heroicons-solid/user.svg') }}\" alt=\"register_login_btn on Header\" class=\"w-6 h-auto\">
\t\t\t\t\t\t\t<p class=\"font-light font-notosans text-xs\">会員登録・ログイン</p>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<img src=\"{{ asset('assets/img/header/heroicons-solid/user.svg') }}\" alt=\"register_login_btn on Header\" class=\"lg:block hidden w-6 h-6\">
\t\t\t\t\t{% endif %}
\t\t\t\t</a>
\t\t\t\t<div class=\"flex items-center gap-8\">
\t\t\t\t\t<a href=\"{{url('cart')}}\" class=\"relative cursor-pointer\">
\t\t\t\t\t\t<img src=\"{{ asset('assets/img/header/cart.png') }}\" alt=\"cart on Header\">
\t\t\t\t\t\t<span class=\"absolute -right-1 -bottom-3 bg-white rounded-[50%] w-5 h-5 text-center text-xs leading-5 shadow-md\">
\t\t\t\t\t\t\t{{ totalQuantity|number_format }}
\t\t\t\t\t\t</span>
\t\t\t\t\t</a>
\t\t\t\t\t<div class=\"lg:hidden cursor-pointer pt-2\">
\t\t\t\t\t\t<button class=\"relative js-hamburger-menu h-4 w-full\">
\t\t\t\t\t\t\t<span class=\"hamburger-menu-top h-px absolute top-0 right-0 bg-black w-9 inline-block rotate-0 duration-300\"></span>
\t\t\t\t\t\t\t<span class=\"hamburger-menu-middle h-px absolute top-1.5 right-0 bg-black w-9 inline-block duration-300\"></span>
\t\t\t\t\t\t\t<span class=\"hamburger-menu-bottom h-px absolute top-3 right-0 bg-black w-9 inline-block rotate-0 duration-300\"></span>
\t\t\t\t\t\t</button>
\t\t\t\t\t\t<p class=\"hamburger-menu-text text-[11px] font-bold duration-300 opacity-100\">MENU</p>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
\t<nav class=\"navigation fixed hidden top-[82px] left-0 z-20 bg-white h-[calc(100%-81px)] w-full bg-opacity-95 py-20 overflow-y-scroll lg:h-[calc(100%-44px)] lg:top-[56px] lg:py-6\">
\t\t{{ include('hamburger.twig') }}
\t</nav>
\t<div class=\"opacity-0 h-[164px] lg:h-[52px]\">ヘッダーの高さ分の要素</div>
{{ include('sticky-nav.twig') }}
{% endblock %}
", "Block/header.twig", "/home/xs082386/manaka-store.com/public_html/stg-renewal.manaka-store.com/src/Eccube/Resource/template/default/Block/header.twig");
}
public function checkSecurity()
{
static $tags = array("block" => 11, "set" => 30, "if" => 73);
static $filters = array("escape" => 57, "number_format" => 88);
static $functions = array("get_carts_total_quantity" => 30, "url" => 56, "asset" => 57, "is_granted" => 73, "include" => 104);
try {
$this->sandbox->checkSecurity(
['block', 'set', 'if'],
['escape', 'number_format'],
['get_carts_total_quantity', 'url', 'asset', 'is_granted', 'include']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}