mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-25 11:45:58 +00:00
Changed homepage card header links to be bottom-card-links
The old links in the headers were not obvious. This changes the header-based links to instead be a link at the bottom of the card. Related to #3046
This commit is contained in:
parent
096ed722dd
commit
197caddf96
@ -39,7 +39,7 @@ class HomeController extends Controller
|
|||||||
$recentlyUpdatedPages = Page::visible()->with('book')
|
$recentlyUpdatedPages = Page::visible()->with('book')
|
||||||
->where('draft', false)
|
->where('draft', false)
|
||||||
->orderBy('updated_at', 'desc')
|
->orderBy('updated_at', 'desc')
|
||||||
->take($favourites->count() > 0 ? 6 : 12)
|
->take($favourites->count() > 0 ? 5 : 10)
|
||||||
->select(Page::$listAttributes)
|
->select(Page::$listAttributes)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
@ -87,6 +87,20 @@
|
|||||||
.card-title a {
|
.card-title a {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
.card-footer-link {
|
||||||
|
display: block;
|
||||||
|
padding: $-s $-m;
|
||||||
|
line-height: 1;
|
||||||
|
border-top: 1px solid;
|
||||||
|
@include lightDark(border-color, #DDD, #555);
|
||||||
|
border-radius: 0 0 3px 3px;
|
||||||
|
font-size: 0.9em;
|
||||||
|
margin-top: $-xs;
|
||||||
|
&:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
@include lightDark(background-color, #f2f2f2, #2d2d2d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.card.border-card {
|
.card.border-card {
|
||||||
border: 1px solid #DDD;
|
border: 1px solid #DDD;
|
||||||
|
@ -44,27 +44,27 @@
|
|||||||
<div>
|
<div>
|
||||||
@if(count($favourites) > 0)
|
@if(count($favourites) > 0)
|
||||||
<div id="top-favourites" class="card mb-xl">
|
<div id="top-favourites" class="card mb-xl">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">{{ trans('entities.my_most_viewed_favourites') }}</h3>
|
||||||
<a href="{{ url('/favourites') }}" class="no-color">{{ trans('entities.my_most_viewed_favourites') }}</a>
|
|
||||||
</h3>
|
|
||||||
<div class="px-m">
|
<div class="px-m">
|
||||||
@include('entities.list', [
|
@include('entities.list', [
|
||||||
'entities' => $favourites,
|
'entities' => $favourites,
|
||||||
'style' => 'compact',
|
'style' => 'compact',
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
<a href="{{ url('/favourites') }}" class="card-footer-link">{{ trans('common.view_all') }}</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div id="recent-pages" class="card mb-xl">
|
<div id="recent-pages" class="card mb-xl">
|
||||||
<h3 class="card-title"><a class="no-color" href="{{ url("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h3>
|
<h3 class="card-title">{{ trans('entities.recently_updated_pages') }}</h3>
|
||||||
<div id="recently-updated-pages" class="px-m">
|
<div id="recently-updated-pages" class="px-m">
|
||||||
@include('entities.list', [
|
@include('entities.list', [
|
||||||
'entities' => $recentlyUpdatedPages,
|
'entities' => $recentlyUpdatedPages,
|
||||||
'style' => 'compact',
|
'style' => 'compact',
|
||||||
'emptyText' => trans('entities.no_pages_recently_updated')
|
'emptyText' => trans('entities.no_pages_recently_updated'),
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
<a href="{{ url("/pages/recently-updated") }}" class="card-footer-link">{{ trans('common.view_all') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -7,13 +7,12 @@
|
|||||||
|
|
||||||
@if(count($favourites) > 0)
|
@if(count($favourites) > 0)
|
||||||
<div id="top-favourites" class="mb-xl">
|
<div id="top-favourites" class="mb-xl">
|
||||||
<h5>
|
<h5>{{ trans('entities.my_most_viewed_favourites') }}</h5>
|
||||||
<a href="{{ url('/favourites') }}" class="no-color">{{ trans('entities.my_most_viewed_favourites') }}</a>
|
|
||||||
</h5>
|
|
||||||
@include('entities.list', [
|
@include('entities.list', [
|
||||||
'entities' => $favourites,
|
'entities' => $favourites,
|
||||||
'style' => 'compact',
|
'style' => 'compact',
|
||||||
])
|
])
|
||||||
|
<a href="{{ url('/favourites') }}" class="text-muted block py-xs">{{ trans('common.view_all') }}</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@ -27,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-xl">
|
<div class="mb-xl">
|
||||||
<h5><a class="no-color" href="{{ url("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h5>
|
<h5>{{ trans('entities.recently_updated_pages') }}</h5>
|
||||||
<div id="recently-updated-pages">
|
<div id="recently-updated-pages">
|
||||||
@include('entities.list', [
|
@include('entities.list', [
|
||||||
'entities' => $recentlyUpdatedPages,
|
'entities' => $recentlyUpdatedPages,
|
||||||
@ -35,6 +34,7 @@
|
|||||||
'emptyText' => trans('entities.no_pages_recently_updated')
|
'emptyText' => trans('entities.no_pages_recently_updated')
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
<a href="{{ url('/pages/recently-updated') }}" class="text-muted block py-xs">{{ trans('common.view_all') }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="recent-activity" class="mb-xl">
|
<div id="recent-activity" class="mb-xl">
|
||||||
|
Loading…
Reference in New Issue
Block a user