mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
This commit adds pagination functionality to the posts index page. The code changes include: - Sorting the posts by descending date - Paginating the posts with 6 items per page - Creating a new component called "Listposts" for rendering the paginated posts - Adding a new view file for the "Listposts" component - Updating the blade template of the posts index page to use the "Listposts" component and pass in the paginated posts The purpose of these changes is to improve user experience by displaying a limited number of posts per page and providing navigation links for easier browsing.
17 lines
664 B
PHP
17 lines
664 B
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'Heimerdinger.LoL • Posts')
|
|
@section('description', 'Explore all our blog posts on Heimerdinger.LoL. Posts about League of Legends and more.')
|
|
|
|
@section('content')
|
|
<section class="max-w-screen-xl mx-auto mt-12">
|
|
<h1
|
|
class="text-3xl font-bold text-center text-transparent uppercase sm:text-4xl
|
|
bg-gradient-to-bl from-orange-300 to-orange-500 bg-clip-text">
|
|
Posts</h1>
|
|
<h2 class="text-center text-orange-400 text-sm uppercase font-medium">Our latest posts about League of
|
|
Legends</h2>
|
|
<x-posts.listposts :posts="$posts"/>
|
|
</section>
|
|
@endsection
|