34 lines
1.5 KiB
PHP
34 lines
1.5 KiB
PHP
<x-layouts::home>
|
|
<header class="relative bg-white pt-12 pb-16 overflow-hidden">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<livewire:posts.featured/>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
|
|
<div class="flex justify-between items-end mb-12">
|
|
<div>
|
|
<h2 class="text-3xl font-bold text-gray-900">Recent Stories</h2>
|
|
<p class="text-gray-500 mt-2">Deep dives into the latest technology trends.</p>
|
|
</div>
|
|
<div class="hidden sm:block">
|
|
<a href="#" class="text-indigo-600 font-semibold hover:text-indigo-700 flex items-center group">
|
|
View all
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 ml-1 group-hover:translate-x-1 transition"
|
|
fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-10">
|
|
@php $posts = App\Models\Post::with('author', 'category')->orderBy('published_at', 'desc')->take(4)->get(); $posts->shift(); @endphp
|
|
@foreach ($posts as $post)
|
|
<livewire:posts.article :post="$post" />
|
|
@endforeach
|
|
</div>
|
|
|
|
<livewire:subscribe />
|
|
</main>
|
|
</x-layouts::home>
|