mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 18:20:48 +01:00
feat: add working posts index
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.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Heimerdinger.LoL • Posts')
|
||||
@section('description', 'Explore all champion skins on Heimerdinger.LoL. Find detailed information on popular skins
|
||||
such as Dark Cosmic Jhin, HEARTSTEEL Ezreal, PROJECT: Vayne and more!')
|
||||
@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">
|
||||
@@ -10,11 +9,8 @@ such as Dark Cosmic Jhin, HEARTSTEEL Ezreal, PROJECT: Vayne and more!')
|
||||
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">Latest posts about League of Legends</h2>
|
||||
@foreach($posts as $post)
|
||||
{{ $post->title }}
|
||||
{{ $post->description}}
|
||||
|
||||
@endforeach
|
||||
<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
|
||||
|
||||
Reference in New Issue
Block a user