mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-02 23:56:56 +08:00
Made shelf listing more unique & efficient
- Now includes listing of all books within.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
<a href="{{ $book->getUrl() }}" class="book entity-list-item" data-entity-type="book" data-entity-id="{{$book->id}}">
|
||||
<div class="entity-list-item-image bg-book" style="background-image: url('{{ $book->getBookCover() }}')">
|
||||
@icon('book')
|
||||
</div>
|
||||
<div class="content">
|
||||
<h4 class="entity-list-item-name break-text">{{ $book->name }}</h4>
|
||||
|
@ -1,10 +1,21 @@
|
||||
<a href="{{ $shelf->getUrl() }}" class="shelf entity-list-item" data-entity-type="bookshelf" data-entity-id="{{$shelf->id}}">
|
||||
<div class="entity-list-item-image bg-shelf" style="background-image: url('{{ $shelf->getBookCover() }}')">
|
||||
<div class="entity-list-item-image bg-shelf @if($shelf->image_id) has-image @endif" style="background-image: url('{{ $shelf->getBookCover() }}')">
|
||||
@icon('bookshelf')
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content py-xs">
|
||||
<h4 class="entity-list-item-name break-text">{{ $shelf->name }}</h4>
|
||||
<div class="entity-item-snippet">
|
||||
<p class="text-muted break-text mb-s">{{ $shelf->getExcerpt() }}</p>
|
||||
<p class="text-muted break-text mb-none">{{ $shelf->getExcerpt() }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</a>
|
||||
<div class="entity-shelf-books grid third entity-list-item-children">
|
||||
@foreach($shelf->books as $book)
|
||||
<div>
|
||||
<a href="{{ $book->getUrl() }}" class="entity-chip text-book">
|
||||
@icon('book')
|
||||
{{ $book->name }}
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
@ -12,7 +12,10 @@
|
||||
@if(count($shelves) > 0)
|
||||
@if($view === 'list')
|
||||
<div class="entity-list">
|
||||
@foreach($shelves as $shelf)
|
||||
@foreach($shelves as $index => $shelf)
|
||||
@if ($index !== 0)
|
||||
<hr class="my-m">
|
||||
@endif
|
||||
@include('shelves.list-item', ['shelf' => $shelf])
|
||||
@endforeach
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user