{#
This file is part of EC-CUBE
Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
http://www.lockon.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{#
{% set Categories = repository('Eccube\\Entity\\Category').getList() %}
{% macro tree(Category) %}
{% from _self import tree %}
{% if Category.children|length > 0 %}
<div class="b-category-nav-pc__contents">
<div class="b-category-nav-pc__heading js-category-nav-sp__heading mdc-ripple-surface">
<div class="b-category-nav-pc__heading-contents">
<span class="b-category-nav-pc__name">{{ Category.name }}</span>
<i class="b-category-nav-pc__icon c-animation--rotate-forward fas fa-angle-down"></i>
</div>
</div>
<ul class="b-category-nav-pc__list u-list-sanitize js-category-nav-sp__list">
<li class="b-category-nav-pc__list-item">
<a href="{{ url('product_list') }}?category_id={{ Category.id }}" class="b-category-nav-pc__link js-category-nav-sp__link">
<span class="b-category-nav-pc__name">すべて</span>
</a>
</li>
{% for ChildCategory in Category.children %}
<li class="b-category-nav-pc__list-item">
{{ tree(ChildCategory) }}
</li>
{% endfor %}
</ul>
</div>
{% else %}
<a class="b-category-nav-pc__link" href="{{ url('product_list') }}?category_id={{ Category.id }}">
<span class="b-category-nav-pc__name">{{ Category.name }}</span>
</a>
{% endif %}
{% endmacro %}
#}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{#
{% from _self import tree %}
<nav class="b-category-nav-pc">
<ul class="b-category-nav-pc__list u-list-sanitize js-category-nav-sp__list">
{% for Category in Categories %}
<li class="b-category-nav-pc__list-item">
{{ tree(Category) }}
</li>
{% endfor %}
</ul>
</nav>
#}