@model FastBlog.Core.Models.Blogs.Blog

<div class="@(Model.Metadata.FullWidth ? "fw" : "container") markdown">

    @if (Model.Metadata.ShowDetails)
    {
        <hr/>
        @if (Model.Metadata.ImageUrl is not null)
        {
            <img src="@Model.Metadata.ImageUrl" alt="@Model.Metadata.Title" class="blog-image"/>
            <hr/>
        }

        <div class="blog-details">
            <h1>@Model.Metadata.Title</h1>
            @if (Model.Metadata.Signature is not null)
            {
                <h3>
                    <span style="opacity: 0.4">by</span> @Model.Metadata.Signature
                </h3>
            }
            <p>@($"{Model.Metadata.CreatedAt:MMMM dd, yyyy}, updated {Model.Metadata.ModifiedAt:MMMM dd, yyyy}")</p>
        </div>
        <hr/>
        <br/>
    }

    @await Html.PartialAsync("Markdown", Model.Text)
</div>