|
@ -7,60 +7,24 @@ |
|
|
<body> |
|
|
<body> |
|
|
<div class="root-container"> |
|
|
<div class="root-container"> |
|
|
{{template "nav" .}} |
|
|
{{template "nav" .}} |
|
|
<div class="blog-user"> |
|
|
<div class="blog-root"> |
|
|
<div style="height: 50px;line-height: 50px"> |
|
|
<h1 class="blog-title">{{.Blog.Title}}</h1> |
|
|
|
|
|
<div class="blog-info"> |
|
|
|
|
|
<div class="blog-author"> |
|
|
|
|
|
<div class="author-headimg"> |
|
|
<a href="/u/{{.Blog.User.Id}}"><img src="{{.Blog.User.Headimg}}" alt="头像" class="img-circle"></a> |
|
|
<a href="/u/{{.Blog.User.Id}}"><img src="{{.Blog.User.Headimg}}" alt="头像" class="img-circle"></a> |
|
|
<a href="/u/{{.Blog.User.Id}}" |
|
|
|
|
|
style="margin-left: 15px;font-size: 18px;text-decoration: none">{{.Blog.User.NickName}}</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
<hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 6px;"/> |
|
|
|
|
|
<div style="display: flex;height: 30px;line-height: 30px;"> |
|
|
|
|
|
<div style="display: inline-block;width: 120px"> |
|
|
|
|
|
<span>文章: </span> |
|
|
|
|
|
<span>{{.Blog.User.BlogCount}}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="display: inline-block;flex: 1"> |
|
|
|
|
|
<span>访问: </span> |
|
|
|
|
|
<span>{{.Blog.User.BlogBrowes}}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="display: flex;height: 30px;line-height: 30px;"> |
|
|
|
|
|
<div style="display: inline-block;width: 120px"> |
|
|
|
|
|
<span>评论: </span> |
|
|
|
|
|
<span>{{.Blog.User.BlogComment}}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="display: inline-block;flex: 1"> |
|
|
|
|
|
<span>喜欢: </span> |
|
|
|
|
|
<span>{{.Blog.User.BlogLike}}</span> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="author-info"> |
|
|
|
|
|
<a href="/u/{{.Blog.User.Id}}">{{.Blog.User.NickName}}</a><br> |
|
|
|
|
|
<span>{{.Blog.Ctime.Format "2006-01-02"}}</span><span>阅读 {{.Blog.Browses}}</span> |
|
|
</div> |
|
|
</div> |
|
|
<hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 6px;"/> |
|
|
<div class="blog-label"> |
|
|
|
|
|
|
|
|
{{range .Top}} |
|
|
|
|
|
<div> |
|
|
|
|
|
<a href="/blog/{{.Id}}"><p |
|
|
|
|
|
style="max-width:290px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{.Title}}</p> |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="blog-root"> |
|
|
|
|
|
<h1 style="text-align: center">{{.Blog.Title}}</h1> |
|
|
|
|
|
<div class="blog-info"> |
|
|
|
|
|
{{if .IsLike}} |
|
|
|
|
|
<span><img src="/static/img/liked.png" alt="" onclick="unlike({{.Blog.Id}})"></span> |
|
|
|
|
|
{{else}} |
|
|
|
|
|
<span><img src="/static/img/like.png" alt="" onclick="like({{.Blog.Id}})"></span> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
<span><a href="/u/{{.Blog.User.Id}}">{{.Blog.User.NickName}}</a></span> |
|
|
|
|
|
<span><em>时间:</em>{{.Blog.Ctime.Format "2006-01-02"}}</span> |
|
|
|
|
|
<span><em>阅读数:</em>{{.Blog.Browses}}</span> |
|
|
|
|
|
<div class="tag-group" style="display: inline-block"> |
|
|
|
|
|
{{range .Blog.Lables}} |
|
|
{{range .Blog.Lables}} |
|
|
<label class='tag tag-info disabled'>{{.Title}}</label> |
|
|
<label>{{.Title}}</label> |
|
|
{{end}} |
|
|
{{end}} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
<div style="width: 100%"> |
|
|
<div style="width: 100%"> |
|
|
{{str2html .Blog.BlogHtml}} |
|
|
{{str2html .Blog.BlogHtml}} |
|
|
</div> |
|
|
</div> |
|
@ -99,6 +63,16 @@ |
|
|
<div style="margin-top: 50px"> |
|
|
<div style="margin-top: 50px"> |
|
|
{{template "footer"}} |
|
|
{{template "footer"}} |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="blog-referral"> |
|
|
|
|
|
{{range .Top}} |
|
|
|
|
|
<div> |
|
|
|
|
|
<a href="/blog/{{.Id}}"><p |
|
|
|
|
|
style="max-width:290px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"> |
|
|
|
|
|
{{.Title}}</p> |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
{{end}} |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -160,6 +134,7 @@ |
|
|
var s = document.getElementsByTagName("script")[1]; |
|
|
var s = document.getElementsByTagName("script")[1]; |
|
|
s.parentNode.insertBefore(qihuo, s); |
|
|
s.parentNode.insertBefore(qihuo, s); |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
function recomm(pid, flag) { |
|
|
function recomm(pid, flag) { |
|
|
layer.prompt({title: '请输入评论内容', value: name, formType: 2}, function (val, index) { |
|
|
layer.prompt({title: '请输入评论内容', value: name, formType: 2}, function (val, index) { |
|
|
if (val.trim().length < 3) { |
|
|
if (val.trim().length < 3) { |
|
|