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
4 changed files with 24 additions and 10 deletions
|
@ -39,7 +39,7 @@ class HomeController extends Controller
|
|||
$recentlyUpdatedPages = Page::visible()->with('book')
|
||||
->where('draft', false)
|
||||
->orderBy('updated_at', 'desc')
|
||||
->take($favourites->count() > 0 ? 6 : 12)
|
||||
->take($favourites->count() > 0 ? 5 : 10)
|
||||
->select(Page::$listAttributes)
|
||||
->get();
|
||||
|
||||
|
|
|
@ -87,6 +87,20 @@
|
|||
.card-title a {
|
||||
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 {
|
||||
border: 1px solid #DDD;
|
||||
|
|
|
@ -44,27 +44,27 @@
|
|||
<div>
|
||||
@if(count($favourites) > 0)
|
||||
<div id="top-favourites" class="card mb-xl">
|
||||
<h3 class="card-title">
|
||||
<a href="{{ url('/favourites') }}" class="no-color">{{ trans('entities.my_most_viewed_favourites') }}</a>
|
||||
</h3>
|
||||
<h3 class="card-title">{{ trans('entities.my_most_viewed_favourites') }}</h3>
|
||||
<div class="px-m">
|
||||
@include('entities.list', [
|
||||
'entities' => $favourites,
|
||||
'style' => 'compact',
|
||||
])
|
||||
</div>
|
||||
<a href="{{ url('/favourites') }}" class="card-footer-link">{{ trans('common.view_all') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<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">
|
||||
@include('entities.list', [
|
||||
'entities' => $recentlyUpdatedPages,
|
||||
'style' => 'compact',
|
||||
'emptyText' => trans('entities.no_pages_recently_updated')
|
||||
'emptyText' => trans('entities.no_pages_recently_updated'),
|
||||
])
|
||||
</div>
|
||||
<a href="{{ url("/pages/recently-updated") }}" class="card-footer-link">{{ trans('common.view_all') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -7,13 +7,12 @@
|
|||
|
||||
@if(count($favourites) > 0)
|
||||
<div id="top-favourites" class="mb-xl">
|
||||
<h5>
|
||||
<a href="{{ url('/favourites') }}" class="no-color">{{ trans('entities.my_most_viewed_favourites') }}</a>
|
||||
</h5>
|
||||
<h5>{{ trans('entities.my_most_viewed_favourites') }}</h5>
|
||||
@include('entities.list', [
|
||||
'entities' => $favourites,
|
||||
'style' => 'compact',
|
||||
])
|
||||
<a href="{{ url('/favourites') }}" class="text-muted block py-xs">{{ trans('common.view_all') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
@ -27,7 +26,7 @@
|
|||
</div>
|
||||
|
||||
<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">
|
||||
@include('entities.list', [
|
||||
'entities' => $recentlyUpdatedPages,
|
||||
|
@ -35,6 +34,7 @@
|
|||
'emptyText' => trans('entities.no_pages_recently_updated')
|
||||
])
|
||||
</div>
|
||||
<a href="{{ url('/pages/recently-updated') }}" class="text-muted block py-xs">{{ trans('common.view_all') }}</a>
|
||||
</div>
|
||||
|
||||
<div id="recent-activity" class="mb-xl">
|
||||
|
|
Loading…
Reference in a new issue