@extends('layouts.dashboard') @section('title', t('خريطة الموقع','Sitemap Manager')) @section('page-title','🗺️ '.t('إدارة خريطة الموقع','Sitemap Manager')) @section('content')
{{-- LEFT: Generator + Status --}}
{{-- Status Card --}}

📊 {{ t('حالة Sitemap','Sitemap Status') }}

@if($sitemapExists)
✅ {{ t('ملف sitemap.xml موجود','sitemap.xml file exists') }}
{{ t('حجم الملف','File Size') }} {{ number_format($sitemapSize/1024,1) }} KB
{{ t('آخر تحديث','Last Generated') }} {{ $s['sitemap_last_generated'] ?? t('غير محدد','Unknown') }}
{{ t('رابط الـ Sitemap','Sitemap URL') }} {{ config('app.url') }}/sitemap.xml
@else
⚠️ {{ t('لم يتم توليد Sitemap بعد','Sitemap not generated yet') }}
@endif {{-- Generate Button --}}
@if($sitemapExists)
👁️ {{ t('عرض','View') }}
@endif
{{-- Search Engines Ping --}}

📡 {{ t('إرسال إلى محركات البحث','Submit to Search Engines') }}

@php $sitemapUrl = urlencode(config('app.url').'/sitemap.xml'); $engines = [ ['Google Search Console', 'https://www.google.com/ping?sitemap='.$sitemapUrl, '🔵'], ['Bing Webmaster Tools', 'https://www.bing.com/ping?sitemap='.$sitemapUrl, '🟠'], ]; @endphp @foreach($engines as [$name, $url, $icon])
{{ $icon }}
{{ $name }}
{{ t('Ping تلقائي','Auto Ping') }}
@if($sitemapExists) 📤 {{ t('إرسال','Submit') }} @else {{ t('توليد أولاً','Generate first') }} @endif
@endforeach
💡 {{ t('أضف Sitemap يدوياً في','Also add manually in') }} Google Search Console {{ t('لأفضل نتيجة','for best results') }}
{{-- Generation Log --}}

📋 {{ t('سجل التوليد','Generation Log') }}

@if($logs->count()) @foreach($logs as $log) @endforeach
{{ t('التاريخ','Date') }} {{ t('عدد الروابط','URLs') }} {{ t('الحجم','Size') }} {{ t('Ping','Ping') }}
{{ \Carbon\Carbon::parse($log->created_at)->format('Y-m-d H:i') }} {{ $log->urls_count }} {{ t('رابط','URL') }} {{ number_format($log->file_size/1024,1) }} KB @if($log->pinged) ✅ {{ t('تم','Done') }} @else @endif
@else

{{ t('لا يوجد سجلات بعد','No logs yet') }}

@endif
{{-- RIGHT: Settings --}}
@csrf

⚙️ {{ t('إعدادات Sitemap','Sitemap Settings') }}

{{-- Include toggles --}}
{{ t('محتوى الـ Sitemap','Sitemap Content') }}
@php $includes = [ ['sitemap_include_pages', '📄', t('الصفحات الثابتة','Static Pages'), t('الرئيسية، المنتجات، عنا، تواصل','Home, Products, About, Contact')], ['sitemap_include_products', '📦', t('صفحات المنتجات','Product Pages'), t('صفحة لكل منتج مفعّل','Page for each active product')], ['sitemap_auto_ping', '📡', t('Ping تلقائي بعد التوليد','Auto Ping after generation'), t('إرسال تلقائي لجوجل وبينج','Auto-submit to Google & Bing')], ]; @endphp @foreach($includes as [$key, $icon, $name, $desc])
{{ $icon }}
{{ $name }}
{{ $desc }}
@endforeach
{{-- Changefreq --}}
{{-- Priority --}}
{{-- Robots.txt tip --}}

🤖 robots.txt

{{ t('أضف هذا السطر في ملف robots.txt الخاص بك','Add this line to your robots.txt file') }}:

Sitemap: {{ config('app.url') }}/sitemap.xml
@endsection @section('scripts') @endsection