@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.ParagraphViewModel>
@using Dynamicweb.Frontend;

<div class="card" style="border-left: 4px solid var(--bs-body-color);" itemscope itemtype="https://schema.org/Quotation">
    <div class="card-body ps-5">
        @if (Model.Item.TryGetString("Quote", out string quote))
        {
            <blockquote class="blockquote fs-5 lh-sm m-0 position-relative" itemprop="text">
                <div class="mb-0-last-child">
                    @quote
                </div>
            </blockquote>
        }

        <div class="d-flex gap-3 align-items-center mt-3">
            @if (Model.Item.TryGetImageFile("AuthorImage", out ImageFileViewModel authorImage))
            {
                <figure class="m-0">
                    <img class="img-thumbnail rounded-circle" src="@authorImage.ToGetImage(new(){ Width = 60, Quality = 90, Ratio = "1/1" })" alt="@authorImage.Name" height="60" width="60">
                </figure>
            }

            @if (Model.Item.TryGetString("Author", out string author))
            {
                <div class="text-muted text-opacity-75 fs-6 m-0" itemprop="author">
                    @author
                </div>
            }
        </div>
    </div>
</div>
