@extends('theme::layout')

@section('content')
    @themeslot('article_top')
    <article class="post post--paywall">
        <header class="post__header">
            <h1 class="post__title">{{ $article->title }}</h1>
            <p class="post__meta">
                @if($article->published_at)
                    <time datetime="{{ $article->published_at->toIso8601String() }}">
                        {{ $article->published_at->format('Y-m-d H:i') }}
                    </time>
                @endif
            </p>
        </header>

        <div class="post__content entry-content">
            {!! $bodyHtml !!}
        </div>

        <aside class="post__paywall panel" role="region" aria-label="{{ __('frontend.article.paywall_title') }}">
            <h2 class="post__paywall-title">{{ __('frontend.article.paywall_title') }}</h2>
            <p class="note">{{ $access->message ?: __('frontend.article.paywall_hint') }}</p>
            @if($access->checkoutUrl)
                <p>
                    <a class="button" href="{{ $access->checkoutUrl }}">{{ __('frontend.article.buy') }}</a>
                </p>
            @endif
        </aside>
    </article>
    @themeslot('article_bottom')
@endsection
