{% import 'app/_inc/macros.html.twig' as m %}
<nav class="nav-main">
<ul class="nav-list">
<li class="collapse-nav level-1">
<button class="collapse-button">
{{ 'nav.act'|trans|raw }}
</button>
<ul>
{% for category in categories %}
{% if category.childrens|length > 0 %}
<li class="collapse-nav level-2">
<button class="collapse-button"><span>{{ category.translate.title }}</span></button>
<ul>
{% for child in category.childrens|filter(child => child.isDeleted is same as(false)) %}
{{ m.li(child.translate.title, path('activiteShow', {'id':child.id})) }}
{% endfor %}
</ul>
</li>
{% else %}
<li class="collapse-nav level-2">
<a class="collapse-button"
href="{{ path('activiteShow', {'id':category.id}) }}">{{ category.translate.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{{ m.li('Nos réalisations', path('realisations')) }}
{{ m.li('nav.contact', path('contact')) }}
</ul>
</nav>