Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

1.8 KB
Raw Blame
@model HomePageBlogItemsModel
@inject DisplayOrderHomePage order
@if (Model.Items.Any())
{
    <div class="blog-list-homepage my-3 [email protected]">
        <h2 class="generalTitle h5 text-center mb-3">
            @Loc["Blog.Latest"]
        </h2>
        <div class="col-12 px-0">
            <div class="row">
                @foreach (var item in Model.Items)
                {
                    <div class="[email protected]_Xl [email protected]_Lg [email protected]_Md [email protected]_Sm [email protected]_Col mb-3">
                        <div class="card">
                            @if (item.PictureModel != null && !string.IsNullOrEmpty(item.PictureModel.ImageUrl))
                            {
                                <img class="img-fluid card-img-top" src="@item.PictureModel.ImageUrl" alt="@item.PictureModel.AlternateText" loading="lazy">
                            }
                            <div class="card-header">
                                <h3 class="h5 mb-0">
                                    <a href="@Url.RouteUrl("BlogPost", new { item.SeName })">
                                        @item.Title
                                    </a>
                                </h3>
                            </div>
                            <div class="card-body">
                                @Html.Raw(item.Short)
                            </div>
                            <div class="card-footer">
                                <small class="date-text">@item.CreatedOn.ToString("D")</small>
                            </div>
                        </div>
                    </div>
                }
            </div>
        </div>
        <div class="view-all text-center mt-3">
            <a class="btn btn-outline-secondary" href="@Url.RouteUrl("Blog")">@Loc["Blog.ViewAll"]</a>
        </div>
    </div>
}