{#
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.
#}
<!-- FONT -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@500;700;900&Heebo:wght@400;700;900&display=swap" rel="stylesheet">
<link href="https://fonts.cdnfonts.com/css/druk-trial" rel="stylesheet">
<!-- CSS -->
<link rel="stylesheet" href="/assets/scss/style.css">
<link rel="stylesheet" href="/assets/scss/sp.css">
<!-- JS ------------------->
<script src="/assets/js/common.js"></script>
<script src="https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script>
{% set Categories = repository('Eccube\\Entity\\Category').getList() %}
{% macro tree(Category) %}
{% from _self import tree %}
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
{{ Category.name }}
</a>
{% if Category.children|length > 0 %}
<ul>
{% for ChildCategory in Category.children %}
<li>
{{ tree(ChildCategory) }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
<header id="header">
<h1>
<a href="{{ url('homepage') }}"><img src="/assets/images/logo.svg" alt="{{ BaseInfo.shop_name }}"></a>
</h1>
<nav>
<ul>
<li><a href="{{ url('product_list') }}">ITEM</a></li>
<!--li>
<a href="">CATEGORY</a>
<ul>
{% for Category in Categories %}
<li>{{ tree(Category) }}</li>
{% endfor %}
</ul>
</li-->
<li><a href="{{ url('help_about') }}">ABOUT</a></li>
<li><a href="{{ url('contact') }}">CONTACT</a></li>
<li class="member">
<div class="mypage">
{% if is_granted('ROLE_USER') %}
<a href="{{ url('mypage') }}">
<img class="icon" src="/assets/images/icon-mypage.svg">
<span>{{ 'MYPAGE'|trans }}</span>
</a>
{% else %}
<a href="{{ url('mypage_login') }}">
<img class="icon" src="/assets/images/icon-mypage.svg">
<span> {{ 'LOGIN'|trans }}</span>
</a>
{% endif %}
</div><!-- /mypage -->
<div class="cart">
{{ include('Block/cart.twig') }}
</div><!-- /cart -->
</li><!-- /member -->
</ul>
</nav>
<div class="sp member">
<ul>
<li class="mypage">
{% if is_granted('ROLE_USER') %}
<a href="{{ url('mypage') }}"><img class="icon" src="/assets/images/icon-mypage.svg"></a>
{% else %}
<a href="{{ url('mypage_login') }}"><img class="icon" src="/assets/images/icon-mypage.svg"></a>
{% endif %}
</li><!-- /mypage -->
<li class="cart">{{ include('Block/cart.twig') }}</li>
</ul>
<a class="menu-trigger" onclick="Menu.Swap()">
<div>
<span></span>
<span></span>
<span></span>
</div>
</a>
</div><!-- /sp -->
</header><!-- /header -->