Files
opensem/resources/views/Shop/layout/partials/megamenu.blade.php
Ludovic CANDELLIER e4672a42d7 fixes
2022-04-22 02:32:53 +02:00

46 lines
2.2 KiB
PHP

<div class="container">
<div class="row rounded m-0 drop-shadow bg-white p-2">
<div class="col mb-4">
@for ($i = 0; $i < round(count($category['children']) / 3); $i++)
<strong>
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $category['children'][$i]['id']]) }}">
{{ $category['children'][$i]['name'] }}
</a>
</strong><br>
@foreach ($category['children'][$i]['children'] ?? [] as $leaf)
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $leaf['id']]) }}">
{{ $leaf['name'] }}
</a><br>
@endforeach
@endfor
</div>
<div class="col mb-4">
@for ($i = round(count($category['children']) / 3); $i < round(2 * count($category['children']) / 3); $i++)
<strong>
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $category['children'][$i]['id']]) }}">
{{ $category['children'][$i]['name'] }}
</a>
</strong><br>
@foreach ($category['children'][$i]['children'] ?? [] as $leaf)
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $leaf['id']]) }}">
{{ $leaf['name'] }}
</a><br>
@endforeach
@endfor
</div>
<div class="col mb-4">
@for ($i = round(2 * count($category['children']) / 3); $i < count($category['children']); $i++)
<strong>
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $category['children'][$i]['id']]) }}">
{{ $category['children'][$i]['name'] }}
</a>
</strong><br>
@foreach ($category['children'][$i]['children'] ?? [] as $leaf)
<a class="green-dark" href="{{ route('Shop.Categories.show', ['id' => $leaf['id']]) }}">
{{ $leaf['name'] }}
</a><br>
@endforeach
@endfor
</div>
</div>
</div>