@extends('layouts.app')

@section('title', $post->title)

@section('content')
    <article>
        <h1 class="text-3xl font-bold">{{ $post->title }}</h1>
        <p class="text-gray-500 text-sm">{{ $post->published_date->format('M d, Y') }}</p>
        @if($post->featured_image)
            <img src="{{ asset('storage/' . $post->featured_image) }}" alt="{{ $post->title }}" class="w-full h-64 object-cover rounded my-4">
        @endif
        <div class="prose max-w-none">
            {!! $post->content !!}
        </div>
    </article>
    <a href="/news" class="inline-block mt-4 text-primary hover:underline">&larr; Back to News</a>
@endsection