mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Styles: Aligned empty state alignment & consistency
- Fixed inital empty state margins/paddings to be aligned and not differ when lists are empty. - Aligned button/action display when viewing empty entities. - Fixed use of non-existing permission in books for book empty state button. Fixes #4563
This commit is contained in:
parent
d42af4affc
commit
9b4f1fb981
@ -8,7 +8,7 @@
|
||||
border-radius: 3px;
|
||||
break-inside: avoid;
|
||||
.body, p.empty-text {
|
||||
padding: $-m;
|
||||
padding-block: $-m;
|
||||
}
|
||||
a, p {
|
||||
word-wrap: break-word;
|
||||
|
@ -342,7 +342,7 @@ details.sort-box[open] summary .caret-container svg {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.card .activity-list-item {
|
||||
padding: $-s $-m;
|
||||
padding-block: $-s;
|
||||
}
|
||||
|
||||
.user-list-item {
|
||||
|
@ -17,7 +17,7 @@
|
||||
@if(count($popular) > 0)
|
||||
@include('entities.list', ['entities' => $popular, 'style' => 'compact'])
|
||||
@else
|
||||
<div class="body text-muted">{{ trans('entities.books_popular_empty') }}</div>
|
||||
<p class="text-muted pb-l mb-none">{{ trans('entities.books_popular_empty') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
@if(count($popular) > 0)
|
||||
@include('entities.list', ['entities' => $new, 'style' => 'compact'])
|
||||
@else
|
||||
<div class="body text-muted">{{ trans('entities.books_new_empty') }}</div>
|
||||
<p class="text-muted pb-l mb-none">{{ trans('entities.books_new_empty') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@stop
|
||||
@ -36,7 +36,7 @@
|
||||
<div class="actions mb-xl">
|
||||
<h5>{{ trans('common.actions') }}</h5>
|
||||
<div class="icon-list text-link">
|
||||
@if(user()->can('book-create-all'))
|
||||
@if(userCan('book-create-all'))
|
||||
<a href="{{ url("/create-book") }}" data-shortcut="new" class="icon-list-item">
|
||||
<span>@icon('add')</span>
|
||||
<span>{{ trans('entities.books_create') }}</span>
|
||||
|
@ -24,8 +24,14 @@
|
||||
</div>
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.books_empty') }}</p>
|
||||
@if(userCan('books-create-all'))
|
||||
<a href="{{ url("/create-book") }}" class="text-pos">@icon('edit'){{ trans('entities.create_now') }}</a>
|
||||
@if(userCan('book-create-all'))
|
||||
<div class="icon-list block inline">
|
||||
<a href="{{ url("/create-book") }}"
|
||||
class="icon-list-item text-book">
|
||||
<span>@icon('add')</span>
|
||||
<span>{{ trans('entities.create_now') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</main>
|
@ -8,5 +8,5 @@
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<p class="text-muted empty-text">{{ trans('common.no_activity') }}</p>
|
||||
<p class="text-muted empty-text mb-none pb-l">{{ trans('common.no_activity') }}</p>
|
||||
@endif
|
@ -5,7 +5,7 @@
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<p class="text-muted empty-text">
|
||||
<p class="text-muted empty-text pb-l mb-none">
|
||||
{{ $emptyText ?? trans('common.no_items') }}
|
||||
</p>
|
||||
@endif
|
@ -60,14 +60,18 @@
|
||||
'emptyText' => trans('entities.no_pages_recently_updated'),
|
||||
])
|
||||
</div>
|
||||
<a href="{{ url("/pages/recently-updated") }}" class="card-footer-link">{{ trans('common.view_all') }}</a>
|
||||
@if(count($recentlyUpdatedPages) > 0)
|
||||
<a href="{{ url("/pages/recently-updated") }}" class="card-footer-link">{{ trans('common.view_all') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div id="recent-activity" class="card mb-xl">
|
||||
<h3 class="card-title">{{ trans('entities.recent_activity') }}</h3>
|
||||
@include('common.activity-list', ['activity' => $activity])
|
||||
<div class="px-m">
|
||||
@include('common.activity-list', ['activity' => $activity])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
@if(count($popular) > 0)
|
||||
@include('entities.list', ['entities' => $popular, 'style' => 'compact'])
|
||||
@else
|
||||
<div class="text-muted">{{ trans('entities.shelves_popular_empty') }}</div>
|
||||
<p class="text-muted pb-l mb-none">{{ trans('entities.shelves_popular_empty') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
@if(count($new) > 0)
|
||||
@include('entities.list', ['entities' => $new, 'style' => 'compact'])
|
||||
@else
|
||||
<div class="text-muted">{{ trans('entities.shelves_new_empty') }}</div>
|
||||
<p class="text-muted pb-l mb-none">{{ trans('entities.shelves_new_empty') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@stop
|
@ -30,8 +30,13 @@
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.shelves_empty') }}</p>
|
||||
@if(userCan('bookshelf-create-all'))
|
||||
<a href="{{ url("/create-shelf") }}"
|
||||
class="button outline">@icon('edit'){{ trans('entities.create_now') }}</a>
|
||||
<div class="icon-list block inline">
|
||||
<a href="{{ url("/create-shelf") }}"
|
||||
class="icon-list-item text-bookshelf">
|
||||
<span>@icon('add')</span>
|
||||
<span>{{ trans('entities.create_now') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user