47 lines
1.5 KiB
PHP
47 lines
1.5 KiB
PHP
<!-- <img class="mian-nav-cover" src="{{ $parent->cover_path }}" alt="导航封面"> -->
|
|
@if (getCateChild($category->id)->isNotEmpty())
|
|
<div class="mian-nav-title">
|
|
{{ $category->title }}
|
|
</div>
|
|
<ul class="mian-nav-ul">
|
|
|
|
@foreach (getCateChild($category->id) as $children)
|
|
<li class="show">
|
|
<a href="{{ $children->link }}">{{ $children->title }}</a>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
|
|
@else
|
|
<div class="mian-nav-title">
|
|
{{ $parent->title }}
|
|
</div>
|
|
<ul class="mian-nav-ul">
|
|
@foreach (getCateChild($parent->id) as $children)
|
|
<li class="show">
|
|
<a href="{{ $children->link }}">{{ $children->title }}</a>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
|
|
@endif
|
|
|
|
{{--<div class="mian-nav-title">--}}
|
|
{{-- {{ $category->title }}--}}
|
|
{{--</div>--}}
|
|
{{--<ul class="mian-nav-ul">--}}
|
|
{{-- @if (getCateChild($category->id)->isNotEmpty())--}}
|
|
{{-- @foreach (getCateChild($category->id) as $children)--}}
|
|
{{-- <li class="show">--}}
|
|
{{-- <a href="{{ $children->link }}">{{ $children->title }}</a>--}}
|
|
{{-- </li>--}}
|
|
{{-- @endforeach--}}
|
|
{{-- @else--}}
|
|
{{-- @foreach (getCateChild($category->parent->id) as $children)--}}
|
|
{{-- <li class="show">--}}
|
|
{{-- <a href="{{ $children->link }}">{{ $children->title }}</a>--}}
|
|
{{-- </li>--}}
|
|
{{-- @endforeach--}}
|
|
{{-- @endif--}}
|
|
{{--</ul>--}}
|