mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 02:04:03 +00:00
wip
This commit is contained in:
commit
b6ca271698
102 changed files with 53132 additions and 0 deletions
18
source/_nav/menu-item.blade.php
Normal file
18
source/_nav/menu-item.blade.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<li class="list-reset pl-4">
|
||||
@if ($url = is_string($item) ? $item : $item->url)
|
||||
{{-- Menu item with URL--}}
|
||||
<a href="{{ $page->url($url) }}"
|
||||
class="{{ 'lvl' . $level }} {{ $page->isActiveParent($item) ? 'lvl' . $level . '-active' : '' }} {{ $page->isActive($url) ? 'active font-semibold text-blue' : '' }} nav-menu__item hover:text-blue"
|
||||
>
|
||||
{{ $label }}
|
||||
</a>
|
||||
@else
|
||||
{{-- Menu item without URL--}}
|
||||
<p class="nav-menu__item text-grey-dark">{{ $label }}</p>
|
||||
@endif
|
||||
|
||||
@if (! is_string($item) && $item->children)
|
||||
{{-- Recursively handle children --}}
|
||||
@include('_nav.menu', ['items' => $item->children, 'level' => ++$level])
|
||||
@endif
|
||||
</li>
|
||||
Loading…
Add table
Add a link
Reference in a new issue