{{-- Détail d'un article d'actualité — en-tête (catégorie, date, titre, auteur), image à la une, contenu HTML riche PURIFIÉ (anti-XSS via clean()), puis lien retour et articles liés. Données fournies par NewsController@show. @var \App\Models\News $article L'article courant (content = HTML). @var \Illuminate\Support\Collection $related Jusqu'à 3 articles liés. SÉCURITÉ : le contenu riche est rendu via {!! clean($article->content) !!} (mews/purifier). Ne JAMAIS rendre $article->content sans clean(). --}} @extends('layouts.app') @section('title', $article->meta_title ?: $article->title) @section('meta_description', $article->meta_description ?: $article->excerpt) {{-- Open Graph spécifique à l'article. og:type et og:title sont gérés par le layout via og_type / og_title ; la section og ajoute description + visuel. --}} @section('og_type', 'article') @section('og_title', $article->meta_title ?: $article->title) @section('og') @if ($article->featured_image) @endif @endsection @section('content') @php $image = media_url($article->featured_image); @endphp
{{-- ============================= EN-TÊTE --}}
{{-- Fil d'Ariane. --}}
@if ($article->category) {{ $article->category }} @endif @if ($article->published_at) @endif

{{ $article->title }}

@if ($article->author?->name)

@svg('heroicon-o-user-circle', 'h-5 w-5 text-slate-400') Par {{ $article->author->name }}

@endif
{{-- ============================= IMAGE À LA UNE --}} @if ($image)
{{ $article->title }}
@endif {{-- ============================= CORPS DE L'ARTICLE (HTML purifié) --}}
@if (filled($article->content))
{!! clean($article->content) !!}
@elseif (filled($article->excerpt))

{{ $article->excerpt }}

@endif {{-- Lien de retour. --}}
{{-- ============================= ARTICLES LIÉS --}} @if ($related->isNotEmpty())
@foreach ($related as $relatedArticle) @endforeach
@endif @endsection