@extends('layouts.dashboard')
@section('title', $blog->title)
@section('page-title', 'Blog Preview')
@section('content')
<div class="content-card">
    <div class="content-card-header">
        <h3>{{ $blog->title }}</h3>
        <div>
            <a href="{{ route('blogs.show', $blog->slug) }}" target="_blank" class="btn btn-sm btn-outline-primary">View Live</a>
            <a href="{{ route('reseller.blogs.edit', $blog) }}" class="btn btn-sm btn-primary">Edit</a>
        </div>
    </div>
    <p class="text-muted small">
        Status: <span class="badge bg-success">Published</span> ·
        Views: {{ number_format($blog->views) }} ·
        Language: {{ $blog->language }} ·
        {{ $blog->published_at?->format('M d, Y') }}
    </p>
    @if($blog->featured_image)
        <img src="{{ $blog->featuredImageUrl() }}" class="article-featured">
    @endif
    @if($blog->excerpt)<p class="lead">{{ $blog->excerpt }}</p>@endif
    <div>{!! $blog->content !!}</div>
</div>
@endsection
