|
|
@@ -30,18 +30,11 @@
|
|
|
@if(count($subCategories) > 0)
|
|
|
<div class="row row-cards mb-4">
|
|
|
@foreach($subCategories as $subCategory)
|
|
|
- <div class="col-sm-6 col-lg-4">
|
|
|
+ <div class="col-sm-6 col-lg-3">
|
|
|
<div class="card">
|
|
|
<div class="card-body text-center">
|
|
|
- <div class="avatar avatar-lg mb-3 mx-auto">
|
|
|
- <svg class="icon" width="24" height="24">
|
|
|
- <use xlink:href="#tabler-folder"></use>
|
|
|
- </svg>
|
|
|
- </div>
|
|
|
- <h4 class="card-title">{{ $subCategory['name'] }}</h4>
|
|
|
- <p class="text-muted">{{ $subCategory['description'] ?? '' }}</p>
|
|
|
<a href="{{ route('category.show', $subCategory['id']) }}" class="btn btn-primary">
|
|
|
- 进入分类
|
|
|
+ {{ $subCategory['name'] }}
|
|
|
</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -51,35 +44,13 @@
|
|
|
@endif
|
|
|
|
|
|
@if(count($categoryBooks) > 0)
|
|
|
+
|
|
|
<div class="card">
|
|
|
<div class="card-header">
|
|
|
<h3 class="card-title">图书列表</h3>
|
|
|
</div>
|
|
|
<div class="card-body">
|
|
|
- <div class="row row-cards">
|
|
|
- @foreach($categoryBooks as $book)
|
|
|
- <div class="col-sm-6 col-lg-4">
|
|
|
- <div class="card book-card h-100">
|
|
|
- <a href="{{ route('book.show', $book['id']) }}">
|
|
|
- <img src="{{ $book['cover'] }}" class="card-img-top book-cover" alt="{{ $book['title'] }}">
|
|
|
- </a>
|
|
|
- <div class="card-body d-flex flex-column">
|
|
|
- <h4 class="card-title">
|
|
|
- <a href="{{ route('book.show', $book['id']) }}" class="text-decoration-none">
|
|
|
- {{ $book['title'] }}
|
|
|
- </a>
|
|
|
- </h4>
|
|
|
- <div class="text-muted">{{ $book['author'] }}</div>
|
|
|
- <div class="mt-auto pt-2">
|
|
|
- <a href="{{ route('book.show', $book['id']) }}" class="btn btn-sm btn-outline-primary">
|
|
|
- 查看详情
|
|
|
- </a>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- @endforeach
|
|
|
- </div>
|
|
|
+ @include('components.book-list', ['books' => $categoryBooks])
|
|
|
</div>
|
|
|
</div>
|
|
|
@endif
|