@include('layouts.header') @include('layouts.slide') {{-- Assurez-vous d'avoir configuré Carbon en arabe dans votre AppServiceProvider pour que diffForHumans() fonctionne correctement --}} {{-- Par exemple, en ajoutant Carbon\Carbon::setLocale(config('app.locale')); dans la méthode boot() --}} {{-- =================================== --}} {{-- SECTION 1 : DERNIERS ARTICLES --}} {{-- =================================== --}} @if(isset($latestPosts) && $latestPosts->count() > 0)

أحدث المقالات

{{-- Le lien utilise la classe "gap-2" pour un espacement propre entre le texte et l'icône --}} عرض الكل
@foreach ($latestPosts as $post)
@if ($post->categories->isNotEmpty())
{{ $post->categories->first()->name }}
@endif
@if ($post->published_at) {{ \Illuminate\Support\Carbon::parse($post->published_at)->diffForHumans() }} @else غير متوفر @endif

{{ $post->title }}

{{ \Illuminate\Support\Str::limit(strip_tags($post->content), 100) }}

اقرأ المزيد
@endforeach
@endif {{-- ============================================= --}} {{-- SECTION 2 : DERNIÈRES ACTUALITÉS (نموذج جديد) --}} {{-- ============================================= --}} @if(isset($latestNews) && $latestNews->count() > 0)
{{-- En-tête de la section (inchangé) --}}

آخر الأخبار

عرض الكل
{{-- Nouvelle grille asymétrique pour un design plus moderne --}} {{-- Sur grand écran, la grille a 3 colonnes et 2 lignes --}}
@foreach ($latestNews as $news_item) {{-- ** LE PREMIER ARTICLE EST MIS EN AVANT ** --}} @if ($loop->first)
{{-- Moitié gauche : Image --}} {{-- Moitié droite : Contenu --}}
@if ($news_item->category)
{{ $news_item->category->name }}
@endif
a @if ($news_item->published_at) {{ \Illuminate\Support\Carbon::parse($news_item->published_at)->diffForHumans() }} @else غير متوفر @endif

{{ $news_item->title }}

{{-- Extrait plus long --}}

{{ \Illuminate\Support\Str::limit(strip_tags($news_item->content), 200) }}

اقرأ المزيد
{{-- ** LES AUTRES ARTICLES SONT PLUS PETITS ** --}} @else
@if ($news_item->category)
{{ $news_item->category->name }}
@endif
@if ($news_item->published_at) {{ \Illuminate\Support\Carbon::parse($news_item->published_at)->diffForHumans() }} @else غير متوفر @endif

{{ $news_item->title }}

اقرأ المزيد
@endif @endforeach
@endif @include('layouts.newsletter') @include('layouts.footer')