Files
ABSDEV/resources/themes/saasland/views/partials/navigation-items.blade.php
T
2026-07-24 15:16:10 +01:00

21 lines
951 B
PHP

@foreach ($items as $item)
@if (!empty($item['children']))
<div class="nav-dropdown" x-data="{ open: false }" @mouseenter="open = true" @mouseleave="open = false">
<button type="button" class="nav-dropdown-toggle" @click="open = ! open" :aria-expanded="open">
{{ $item['label'] }} <span aria-hidden="true">⌄</span>
</button>
<div class="nav-dropdown-menu" x-show="open" x-cloak>
@foreach ($item['children'] as $child)
<a href="{{ $child['url'] }}" @if($child['target']) target="{{ $child['target'] }}" rel="noopener" @endif>
{{ $child['label'] }}
</a>
@endforeach
</div>
</div>
@else
<a href="{{ $item['url'] }}" @if($item['target']) target="{{ $item['target'] }}" rel="noopener" @endif>
{{ $item['label'] }}
</a>
@endif
@endforeach