完善功能
This commit is contained in:
28
web10/resources/views/frontend/partials/sidebar.blade.php
Normal file
28
web10/resources/views/frontend/partials/sidebar.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="sidebar-block">
|
||||
<div class="sidebar-title">分类导航</div>
|
||||
<div class="category-list">
|
||||
@foreach($sidebarCategories as $category)
|
||||
<details class="category-group" @if($loop->first) open @endif>
|
||||
<summary>
|
||||
<span>
|
||||
@if($category->icon)
|
||||
<span class="icon">{{ $category->icon }}</span>
|
||||
@endif
|
||||
{{ $category->name }}
|
||||
</span>
|
||||
<span class="count">{{ $category->products_count }}</span>
|
||||
</summary>
|
||||
<ul>
|
||||
@foreach($category->children as $child)
|
||||
<li>
|
||||
<a href="{{ route('categories.show', $child->slug) }}">
|
||||
{{ $child->name }}
|
||||
<span class="count">{{ $child->products_count }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</details>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user