v0.10.10b - Added small fixs to pagination

This commit is contained in:
Neerholt 2020-08-19 10:43:59 +02:00
parent 2f003600c5
commit a8fc584304
7 changed files with 19 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class NewsController extends Controller
*/
public function index(Request $request)
{
$news = News::query()->orderBy('id', 'asc')->paginate(2);
$news = News::query()->orderBy('id', 'asc')->paginate(20);
return Response::detect("news.index", [ "news" => $news ]);
}

View File

@ -26,7 +26,7 @@ class RootController extends Controller
}
}
else {
$news = News::query()->orderBy('id', 'asc')->paginate($perPage);
$news = News::query()->orderBy('id', 'asc')->paginate($perPage, ['*'], "page");
return view('app.root.index', ["news" => $news]);
}

View File

@ -193,6 +193,10 @@ nav > .pagination {
font-size: 24px;
}
nav {
margin-top: auto;
}
.text-white {
color: #ffffff;
}

View File

@ -193,6 +193,10 @@ nav > .pagination {
font-size: 24px;
}
nav {
margin-top: auto;
}
.text-white {
color: #ffffff;
}

View File

@ -193,6 +193,10 @@ nav > .pagination {
font-size: 24px;
}
nav {
margin-top: auto;
}
.text-white {
color: #ffffff;
}

View File

@ -64,3 +64,7 @@ nav > .pagination {
.pagination > .page-item.disabled > .page-link {
font-size: 24px;
}
nav {
margin-top: auto;
}

View File

@ -28,7 +28,7 @@
}
</style>
<main style="justify-content: unset;">
@foreach(\App\News::query()->orderBy("created_at", "desc")->get() as $new)
@foreach($news as $new)
<div class="card">
@if($new->resource_id !== null)
<div class="header" style="background-size: cover; background-image: url('{{ asset(\App\Resource::query()->where("id", "=", $new->resource_id)->first()->filename) }}');">