mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Started looking at the books listing design
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
@extends('sidebar-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<div class="col-xs-6">
|
||||
<div class="grid halves">
|
||||
<div class="action-buttons text-left">
|
||||
@include('books/view-toggle', ['booksViewType' => $booksViewType])
|
||||
@include('books.view-toggle', ['booksViewType' => $booksViewType])
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6 faded">
|
||||
<div class="action-buttons">
|
||||
@if($currentUser->can('book-create-all'))
|
||||
<a href="{{ baseUrl("/create-book") }}" class="text-pos text-button">@icon('add'){{ trans('entities.books_create') }}</a>
|
||||
@@ -17,25 +15,25 @@
|
||||
|
||||
@section('sidebar')
|
||||
@if($recents)
|
||||
<div id="recents" class="card">
|
||||
<h3>@icon('view') {{ trans('entities.recently_viewed') }}</h3>
|
||||
@include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])
|
||||
<div id="recents" class="mb-xl">
|
||||
<h5>{{ trans('entities.recently_viewed') }}</h5>
|
||||
@include('partials.entity-list', ['entities' => $recents, 'style' => 'compact'])
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div id="popular" class="card">
|
||||
<h3>@icon('popular') {{ trans('entities.books_popular') }}</h3>
|
||||
<div id="popular" class="mb-xl">
|
||||
<h5>{{ trans('entities.books_popular') }}</h5>
|
||||
@if(count($popular) > 0)
|
||||
@include('partials/entity-list', ['entities' => $popular, 'style' => 'compact'])
|
||||
@include('partials.entity-list', ['entities' => $popular, 'style' => 'compact'])
|
||||
@else
|
||||
<div class="body text-muted">{{ trans('entities.books_popular_empty') }}</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div id="new" class="card">
|
||||
<h3>@icon('star-circle') {{ trans('entities.books_new') }}</h3>
|
||||
<div id="new" class="mb-xl">
|
||||
<h5>{{ trans('entities.books_new') }}</h5>
|
||||
@if(count($popular) > 0)
|
||||
@include('partials/entity-list', ['entities' => $new, 'style' => 'compact'])
|
||||
@include('partials.entity-list', ['entities' => $new, 'style' => 'compact'])
|
||||
@else
|
||||
<div class="body text-muted">{{ trans('entities.books_new_empty') }}</div>
|
||||
@endif
|
||||
@@ -43,5 +41,5 @@
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
@include('books/list', ['books' => $books, 'bookViewType' => $booksViewType])
|
||||
@include('books.list', ['books' => $books, 'bookViewType' => $booksViewType])
|
||||
@stop
|
@@ -1,17 +1,27 @@
|
||||
|
||||
<div class="container{{ $booksViewType === 'list' ? ' small' : '' }}">
|
||||
<h1>{{ trans('entities.books') }}</h1>
|
||||
<div class="content-wrap {{ $booksViewType === 'list' ? 'thin' : '' }}">
|
||||
<h1 class="list-heading px-m">{{ trans('entities.books') }}</h1>
|
||||
@if(count($books) > 0)
|
||||
@if($booksViewType === 'list')
|
||||
@foreach($books as $book)
|
||||
@include('books/list-item', ['book' => $book])
|
||||
<hr>
|
||||
@endforeach
|
||||
{!! $books->render() !!}
|
||||
<div class="entity-list">
|
||||
@foreach($books as $book)
|
||||
<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() }}')">
|
||||
</div>
|
||||
<div class="content">
|
||||
<h4 class="entity-list-item-name break-text">{{ $book->name }}</h4>
|
||||
<div class="entity-item-snippet">
|
||||
<p class="text-muted break-text">{{ $book->getExcerpt() }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
{!! $books->render() !!}
|
||||
</div>
|
||||
@else
|
||||
<div class="grid third">
|
||||
@foreach($books as $key => $book)
|
||||
@include('books/grid-item', ['book' => $book])
|
||||
@include('books.grid-item', ['book' => $book])
|
||||
@endforeach
|
||||
</div>
|
||||
<div>
|
||||
|
@@ -121,23 +121,25 @@
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="page-content flex" page-display="{{ $page->id }}">
|
||||
<div class="content-wrap thin">
|
||||
<div class="page-content flex" page-display="{{ $page->id }}">
|
||||
|
||||
<div class="pointer-container" id="pointer">
|
||||
<div class="pointer anim {{ userCan('page-update', $page) ? 'is-page-editable' : ''}}" >
|
||||
<span class="icon text-primary">@icon('link') @icon('include', ['style' => 'display:none;'])</span>
|
||||
<span class="input-group">
|
||||
<div class="pointer-container" id="pointer">
|
||||
<div class="pointer anim {{ userCan('page-update', $page) ? 'is-page-editable' : ''}}" >
|
||||
<span class="icon text-primary">@icon('link') @icon('include', ['style' => 'display:none;'])</span>
|
||||
<span class="input-group">
|
||||
<input readonly="readonly" type="text" id="pointer-url" placeholder="url">
|
||||
<button class="button icon" data-clipboard-target="#pointer-url" type="button" title="{{ trans('entities.pages_copy_link') }}">@icon('copy')</button>
|
||||
</span>
|
||||
@if(userCan('page-update', $page))
|
||||
<a href="{{ $page->getUrl('/edit') }}" id="pointer-edit" data-edit-href="{{ $page->getUrl('/edit') }}"
|
||||
class="button icon heading-edit-icon" title="{{ trans('entities.pages_edit_content_link')}}">@icon('edit')</a>
|
||||
@endif
|
||||
@if(userCan('page-update', $page))
|
||||
<a href="{{ $page->getUrl('/edit') }}" id="pointer-edit" data-edit-href="{{ $page->getUrl('/edit') }}"
|
||||
class="button icon heading-edit-icon" title="{{ trans('entities.pages_edit_content_link')}}">@icon('edit')</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('pages/page-display')
|
||||
@include('pages/page-display')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($commentsEnabled)
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="toolbar px-l py-m">
|
||||
<div class="toolbar px-xl py-m">
|
||||
@yield('toolbar')
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content mr-xl flex @yield('body-wrap-classes')">
|
||||
<div class="mr-xl flex @yield('body-wrap-classes')">
|
||||
@yield('body')
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user