Files
leanote/app/views/Blog/index.html

50 lines
1.3 KiB
HTML
Raw Normal View History

2014-10-28 14:40:37 +08:00
{{template "blog/header.html" .}}
2014-05-07 13:06:24 +08:00
<div id="postsContainer">
<div class="container">
{{if .notebookId}}
2014-10-22 16:20:45 +08:00
<h2>{{msg . "blogClass"}} - {{.notebook.Title}}</h2>
2014-05-07 13:06:24 +08:00
{{end}}
</div>
<div id="posts">
2014-05-10 16:01:50 +08:00
{{$G := .}}
2014-05-07 13:06:24 +08:00
{{range .blogs}}
<div class="each-post">
<div class="title">
2014-10-22 16:20:45 +08:00
<a href="{{$.viewUrl}}/{{.NoteId.Hex}}" title="{{msg $ "fullBlog"}}">
2014-05-07 13:06:24 +08:00
{{.Title}}
</a>
</div>
<div class="created-time">
2014-10-22 16:20:45 +08:00
<i class="fa fa-bookmark-o"></i>
2014-05-07 13:06:24 +08:00
{{if .Tags}}
2014-10-22 16:20:45 +08:00
{{blogTags $ .Tags}}
2014-05-07 13:06:24 +08:00
{{else}}
2014-10-22 16:20:45 +08:00
{{msg $ "noTag"}}
2014-05-07 13:06:24 +08:00
{{end}}
|
2014-10-22 16:20:45 +08:00
<i class="fa fa-calendar"></i> {{msg $ "updatedTime"}} {{.UpdatedTime | datetime}} |
<i class="fa fa-calendar"></i> {{msg $ "createdTime"}} {{.CreatedTime | datetime}}
2014-05-07 13:06:24 +08:00
</div>
<div class="desc">
{{.Content | raw}}
</div>
2014-10-22 16:20:45 +08:00
<a class="more" href="{{$.viewUrl}}/{{.NoteId.Hex}}" title="{{msg $ "fullBlog"}}">{{msg $ "more"}}.</a>
2014-05-07 13:06:24 +08:00
</div>
{{end}}
<!-- 分页 -->
<ul class="pager">
2014-10-22 16:20:45 +08:00
{{if .notebookId}}
{{set $ "pageUrl" (concatStr $.cateUrl "/" .notebookId)}}
{{else}}
{{set $ "pageUrl" $.indexUrl}}
{{end}}
{{page $.pageUrl .page .pageSize .count}}
2014-05-07 13:06:24 +08:00
</ul>
</div>
</div>
2014-10-28 14:40:37 +08:00
{{template "blog/footer.html" .}}
{{template "blog/highlight.html"}}
2014-05-07 13:06:24 +08:00
</body>
</html>