@extends('layouts.public') @section('title', $article->meta_title ?: $article->title) @section('meta_description', $article->meta_description ?: \Illuminate\Support\Str::limit(strip_tags($article->body), 155)) @section('og_type', 'article') @if ($article->featured_image) @section('og_image', Storage::url($article->featured_image)) @endif @push('head') @if ($article->author) @endif @if ($article->category) @endif {{-- بيانات منظّمة NewsArticle — أهم عنصر لأهلية ظهور المقال بـ Google News --}} {{-- مسار التنقّل (Breadcrumb) — يساعد قوقل يعرض مسار الصفحة بنتائج البحث --}} @endpush @section('content') {{-- تخطيط الصفحة يفصل بوضوح بين: - MC (Main Content): نص المقال نفسه — بالعمود الرئيسي - SC (Supplementary Content): مقالات ذات صلة + تصفح الأقسام — بالشريط الجانبي - Ads: إعلانات منفصلة تماماً عن المحتوى، معلَّمة بوضوح هذا الفصل يحسّن تجربة المستخدم ويطابق معايير جودة الصفحة (Main/Supplementary/Ads). --}}
{{-- ===== المحتوى الرئيسي (MC) ===== --}}
@include('public._breadcrumb', ['items' => array_values(array_filter([ $article->category ? ['label' => $article->category->name, 'url' => '/category/'.$article->category->slug] : null, ['label' => $article->title], ]))])

{{ $article->title }}

{{ $article->published_at?->format('Y-m-d') }} — {{ $article->author->name ?? '' }}

@include('public._share-buttons', ['shareTitle' => $article->title]) @if ($article->featured_image) {{ $article->title }} @endif {{-- === إعلان (Ads) — منفصل بوضوح عن نص المقال === --}} @foreach (\App\Models\Ad::forSlot($tenant->id, 'inside_article') as $ad)

إعلان

@if ($ad->type === 'adsense_code') {!! $ad->adsense_code !!} @else إعلان @endif
@endforeach
{!! $article->body !!}
@include('public._share-buttons', ['shareTitle' => $article->title]) {{-- === التعليقات === --}}

التعليقات ({{ $article->comments()->where('status', 'approved')->whereNull('parent_id')->count() }})

@if (session('status'))
{{ session('status') }}
@endif @foreach ($article->comments()->where('status', 'approved')->whereNull('parent_id')->with('replies')->latest()->get() as $comment)

{{ $comment->name }}

{{ $comment->created_at->diffForHumans() }}

{{ $comment->body }}

@foreach ($comment->replies as $reply)

{{ $reply->name }}

{{ $reply->created_at->diffForHumans() }}

{{ $reply->body }}

@endforeach
@endforeach

أضف تعليقاً

@csrf
{{-- ===== المحتوى التكميلي (SC) + الإعلانات ===== --}}
@endsection