网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
@using Microsoft.Extensions.Configuration
@model IEnumerable<VmArticleMini>
@inject IConfiguration _configuration
@{
    //var htmlParse = new HtmlParser();
}
@foreach (var item in Model)
{
    <div class="article shadow layui-anim layui-anim-upbit">
        @if (!string.IsNullOrEmpty(item.MainImage))
        {
            <div class="article-left">
                <img data-src="@item.MainImage" class="lazy" alt="@item.Title" src="@(_configuration["CDNBaseAddress"])/loaders/puff.svg"/>
            </div>
            <div class="article-right">
                <div class="article-title">
                    <a asp-action="Read" asp-controller="Article" asp-route-id="@item.Id" data-pjax>@item.Title</a>
                </div>
                <div class="article-abstract">
                    @Html.Raw(item.Introduction)
                </div>
            </div>
        }
        else
        {
            <div class="article-right" style="width:100%">
                <div class="article-title">
                    <a asp-action="Read" asp-controller="Article" asp-route-id="@item.Id" data-pjax>@item.Title</a>
                </div>
                <div class="article-abstract">
                    @Html.Raw(item.Introduction)
                </div>
            </div>
        }

        <div class="clear"></div>
        <div class="article-footer">
            <span>
                <i class="fa fa-clock-o"></i>
                <time class="timeago" datetime="@item.CreateTime">@item.CreateTime</time>
            </span>
            <span class="article-author"><i class="fa fa-user"></i>&nbsp;&nbsp;@item.Author.Name</span>
            @foreach (var tag in item.Tags)
            {
                <span><i class="fa fa-tag"></i>&nbsp;&nbsp;<a asp-action="Index" asp-controller="Article" asp-route-tag="@tag" data-pjax>@tag</a></span>    
            }
            <span class="article-viewinfo"><i class="fa fa-eye"></i>&nbsp;@item.ViewCount</span>
            <span class="article-viewinfo"><i class="fa fa-commenting"></i>&nbsp;@item.CommentCount</span>
        </div>
    </div>
}
loading