<!doctype html>
<html lang="zh-cn">

<head>
    {{template "header.html" .}}
</head>

<body>
    {{template "nav.html" .}}
    {{template "bread.html" .}}
    <div class="container">
        <div class="row">
            <div class="col-12 col-md-9 list-article p-2">
                <div class="shadow p-2">
                    <h2 class="vh2 p-1"><span class="bi bi-file-earmark-fill"></span>相关文章</h2>
                    {{$one := .one}}
                    {{range $one.Articles}}
                    <div class="d-flex border">
                        {{if ne "" .Img}}
                        <div class="p-1">
                            <a href="{{.Url}}" title="{{.Title}}"><img class="vlistimg" src="{{.Img}}" title="{{.Title}}" ></a>
                        </div>
                        {{end}}
                        <div class="p-1 d-flex  flex-fill overflow-hidden  flex-column justify-content-between">
                            <a class="text-muted text-decoration-none text-reset" href="{{.Url}}" title="{{.Title}}">
                                <h2 class="vh2 vtext-line2">{{.Title}}</h2>
                            </a>
                            <div class="vtext-line1 d-none d-sm-block">
                                {{StrSub .Content 60|Str2Html}}
                            </div>
                            <div class="vscroll-x vscrollbar">
                                <a class="btn px-1" href="{{.CategoryUrl}}"><i class="bi bi-folder"></i>{{.CategoryName}}</a>
                                {{range .Tags}}
                                <a class="btn px-1" href="{{.Url}}"><i class="bi bi-tags"></i>{{.Name}}</a>
                                {{end}}
                            </div>
            
                            <div>
                                <span ><i class="bi bi-file-earmark-person"></i>
                                    <a class="text-decoration-none text-muted" href="{{.User.Url}}">{{.User.Nickname}}</a></span>
                                <span><data><i class="bi bi-clock"></i>{{ParseTime .CreatedAt
                                        ""}}</data></span>
                            </div>
                        </div>
                    </div>
                    {{end}}
                </div>
                <nav aria-label="Page navigation" class="py-4">
                    <ul class="pagination justify-content-center">
                        <li class="page-item"><a class="page-link text-muted text-reset text-decoration-none"
                                href="{{$one.IndexPage.Url}}">{{$one.IndexPage.Name}}</a>
                        </li>
                        <li class="page-item"><a class="page-link text-muted text-reset text-decoration-none"
                                href="{{$one.PrePage.Url}}">{{$one.PrePage.Name}}</a>
                        </li>
                        {{range $one.Pages}}
                        <li class="page-item d-none d-sm-block"><a class="page-link text-muted text-reset text-decoration-none" {{if
                                .IsSelect}} style="background: #ddd;" {{end}} href="{{.Url}}">{{.Name}}</a></li>
                        {{end}}
                        <li class="page-item"><a class="page-link text-muted text-reset text-decoration-none"
                                href="{{$one.NextPage.Url}}">{{$one.NextPage.Name}}</a>
                        </li>
                        <li class="page-item"><a class="page-link text-muted text-reset text-decoration-none"
                                href="{{$one.EndPage.Url}}">{{$one.EndPage.Name}}</a>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="col-12 col-md-3 list-article p-2">
                {{template "sidebar.html" .}}
            </div>
        </div>

    </div>

    {{template "footer.html" .}}
    {{template "js.html" .}}
</body>

</html>