123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package template
- var VarBlogHtmlFile = []byte(`{{template "header.html" .}}
- <div class="card mb-4">
- {{if $.Data.Blog.HavePosts}}
- {{range $.Data.Blog.Posts}}
- <div class="post">
- <div class="card-body">
- <h2 class="card-title">
- <a href="{{.Permalink}}">
- {{.Name}}
- </a>
- </h2>
- <div class="post-content">
- {{.Briefly}}
- </div>
- <div class="post-date">
- <div><small>Published on {{.DateTimeFormat "02/01/2006, 15:04:05"}}</small></div>
- <div>Author: {{.User.FirstName}} {{.User.LastName}}</div>
- </div>
- </div>
- </div>
- {{end}}
- {{else}}
- <div class="card-body">
- Sorry, no posts matched your criteria
- </div>
- {{end}}
- </div>
- {{if $.Data.Blog.HavePosts}}
- {{if gt $.Data.Blog.PostsMaxPage 1 }}
- <nav>
- <ul class="pagination mb-4">
- {{if $.Data.Blog.PaginationPrev}}
- <li class="page-item{{if $.Data.Blog.PaginationPrev.Current}} disabled{{end}}">
- <a class="page-link" href="{{$.Data.Blog.PaginationPrev.Link}}">Previous</a>
- </li>
- {{end}}
- {{range $.Data.Blog.Pagination}}
- {{if .Dots}}
- <li class="page-item disabled"><a class="page-link" href="">...</a></li>
- {{else}}
- <li class="page-item{{if .Current}} active{{end}}">
- <a class="page-link" href="{{.Link}}">{{.Num}}</a>
- </li>
- {{end}}
- {{end}}
- {{if $.Data.Blog.PaginationNext}}
- <li class="page-item{{if $.Data.Blog.PaginationNext.Current}} disabled{{end}}">
- <a class="page-link" href="{{$.Data.Blog.PaginationNext.Link}}">Next</a>
- </li>
- {{end}}
- </ul>
- </nav>
- {{end}}
- {{end}}
- {{template "footer.html" .}}`)
|