@model HomepageNewsItemsModel
@using Nop.Core.Domain.News
@if (Model.NewsItems.Count > 0)
{
    <div class="news-list-homepage">
        <div class="title">
            <strong>@T("News")</strong>
        </div>
        <div class="news-items">
            <div class="row">
                @foreach (var item in Model.NewsItems)
                {
                    <div class="news-item col-xs-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
                        <div class="card">
                            <div class="card-body">
                                <div class="news-head">
                                    <a class="news-title" href="@(Url.RouteUrl<NewsItem>(new { SeName = item.SeName }))">@item.Title</a>
                                    <span class="news-date">-@item.CreatedOn.ToString("D")</span>
                                </div>
                                <div class="news-body">
                                    @Html.Raw(item.Short)
                                </div>
                                <div class="buttons">
                                    <a href="@(Url.RouteUrl<NewsItem>(new { SeName = item.SeName }))" class="btn btn-primary read-more">@T("News.MoreInfo")</a>
                                </div>
                            </div>
                        </div>
                    </div>
                }
            </div>
        </div> 
        <div class="view-all">
            <a class="btn btn-secondary" href="@Url.RouteUrl("NewsArchive")">@T("News.ViewAll")</a>
        </div>
    </div>

}