@extends('layouts.app') @section('title', $article->title.' | '.config('app.name', 'Help Numo')) @section('body-class', 'lib-hub-page') @section('content') @php $relatedArticles = $relatedArticles ?? collect(); $parentCategories = $parentCategories ?? collect(); $ar = 'ar'; $fmtDate = static function ($d) use ($ar) { if (! $d) { return null; } return $d->locale($ar)->translatedFormat('j F Y'); }; $meta = $article->meta ?? []; $beforeStart = trim((string) ($meta['before_start'] ?? '')); $quickSolutions = trim((string) ($meta['quick_solutions'] ?? '')); $externalLinks = collect($meta['external_links'] ?? [])->filter(function ($row) { return is_array($row) && filled($row['url'] ?? null); }); $hasSidebar = $beforeStart !== '' || $quickSolutions !== '' || $externalLinks->isNotEmpty(); $hasBottom = $article->tags->isNotEmpty() || $relatedArticles->isNotEmpty(); $hasNavSidebar = $parentCategories->isNotEmpty(); @endphp
@include('library.partials.topbar')
@if ($hasNavSidebar) @include('library.partials.sidebar-categories', [ 'parentCategories' => $parentCategories, 'activeCategory' => $activeCategory ?? null, ]) @endif
@if (session('status'))
{{ session('status') }}
@endif
العودة للمكتبة

{{ $article->title }}

@if ($article->updated_at) @endif @if ($article->categories->isNotEmpty())

التصنيفات

@foreach ($article->categories as $cat) {{ $cat->name }} @endforeach
@endif
@if ($hasSidebar)
{!! $articleHtml ?? $article->body !!}
@else
{!! $articleHtml ?? $article->body !!}
@endif @if ($showArticleRating ?? true) @include('library.partials.article-rating', [ 'article' => $article, 'alreadyRated' => $articleAlreadyRated ?? false, ]) @endif @if ($hasBottom) @endif
@include('library.partials.site-footer')
@endsection