v0.10.10b - Added small fixs to pagination
This commit is contained in:
parent
2f003600c5
commit
a8fc584304
|
@ -31,7 +31,7 @@ class NewsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
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 ]);
|
return Response::detect("news.index", [ "news" => $news ]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ class RootController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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]);
|
return view('app.root.index', ["news" => $news]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,6 +193,10 @@ nav > .pagination {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.text-white {
|
.text-white {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,6 +193,10 @@ nav > .pagination {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.text-white {
|
.text-white {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,6 +193,10 @@ nav > .pagination {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.text-white {
|
.text-white {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,3 +64,7 @@ nav > .pagination {
|
||||||
.pagination > .page-item.disabled > .page-link {
|
.pagination > .page-item.disabled > .page-link {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<main style="justify-content: unset;">
|
<main style="justify-content: unset;">
|
||||||
@foreach(\App\News::query()->orderBy("created_at", "desc")->get() as $new)
|
@foreach($news as $new)
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@if($new->resource_id !== null)
|
@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) }}');">
|
<div class="header" style="background-size: cover; background-image: url('{{ asset(\App\Resource::query()->where("id", "=", $new->resource_id)->first()->filename) }}');">
|
||||||
|
|
Loading…
Reference in New Issue