11 changed files with 311 additions and 37 deletions
@ -1,11 +1,13 @@ |
|||
package models |
|||
|
|||
/** |
|||
文章 |
|||
*/ |
|||
type NoteColl struct { |
|||
Id int64 |
|||
UserId int64 |
|||
Title string |
|||
Title string |
|||
|
|||
Notes []*Note `orm:"-"` |
|||
} |
|||
Count int64 `orm:"-"` |
|||
} |
|||
|
@ -0,0 +1,34 @@ |
|||
{{define "memenu"}} |
|||
<div class="me-menu"> |
|||
<div style="height: 50px;line-height: 50px"> |
|||
<a href=""><img src="/static/img/2.png" alt="头像" class="img-circle"></a> |
|||
<a href="" style="margin-left: 15px;font-size: 18px;text-decoration: none">{{.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: 100px"> |
|||
<span>文章: </span> |
|||
<span>{{.User.BlogCount}}</span> |
|||
</div> |
|||
<div style="display: inline-block;flex: 1"> |
|||
<span>访问: </span> |
|||
<span>{{.User.BlogBrowes}}</span> |
|||
</div> |
|||
</div> |
|||
<div style="display: flex;height: 30px;line-height: 30px;"> |
|||
<div style="display: inline-block;width: 100px"> |
|||
<span>评论: </span> |
|||
<span>{{.User.BlogComment}}</span> |
|||
</div> |
|||
<div style="display: inline-block;flex: 1"> |
|||
<span>喜欢: </span> |
|||
<span>{{.User.BlogLike}}</span> |
|||
</div> |
|||
</div> |
|||
<hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 6px;"/> |
|||
<p {{if .IsMeBlog}}class="active"{{end}}><span></span><a href="/me/blog">我的博客</a></p> |
|||
<p {{if .IsMeNote}}class="active"{{end}}><span></span><a href="/me/note">我的笔记</a></p> |
|||
<p {{if .IsMeLike}}class="active"{{end}}><span></span><a href="/me/like">我的收藏</a></p> |
|||
<p {{if .IsMeInfo}}class="active"{{end}}><span></span><a href="/me/info">我的资料</a></p> |
|||
</div> |
|||
{{end}} |
@ -0,0 +1,49 @@ |
|||
{{template "header"}} |
|||
<title>博客 - 个人随笔</title> |
|||
<link type="text/css" rel="styleSheet" href="/static/css/me.css"/> |
|||
</head> |
|||
<body> |
|||
<div class="root-container"> |
|||
{{template "nav" .}} |
|||
{{template "memenu" .}} |
|||
|
|||
<div class="me-blog-root"> |
|||
<div class="me-blog-list"> |
|||
{{range .Page.List}} |
|||
<p><a href="/blog/{{.Id}}">{{.Title}}</a></p> |
|||
<div> |
|||
<em>发布时间:{{.Ctime.Format "2006/01/02"}}</em> |
|||
<em>浏览量:{{.Browses}}</em> |
|||
<span style="width: 35px;margin-left: 30px;"><a href="" style="color: #F84822">删除</a></span> |
|||
<span style="width: 35px;margin-left: 10px;"><a href="" style="color: #F84822">编辑</a></span> |
|||
</div> |
|||
<hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 6px;"/> |
|||
{{end}} |
|||
<div style="text-align: center"> |
|||
<nav> |
|||
<div class="pagination pagination-lg"> |
|||
<ul> |
|||
{{if .Page.FirstPage}} |
|||
{{else}} |
|||
<li class="prev"> |
|||
<a href="/me/blog?num={{ .Page.PageNo | NAdd -1}}&flag={{.Flag}}">«</a> |
|||
</li> |
|||
{{end}} |
|||
<li class="active"><a href="javascript:void(0)">{{.Page.PageNo}}</a></li> |
|||
{{if .Page.LastPage}} |
|||
{{else}} |
|||
<li class="next"> |
|||
<a href="/me/blog?num={{ .Page.PageNo | NAdd +1}}&flag={{.Flag}}">»</a> |
|||
</li> |
|||
{{end}} |
|||
</ul> |
|||
</div> |
|||
</nav> |
|||
</div> |
|||
</div> |
|||
{{template "footer"}} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
@ -0,0 +1,49 @@ |
|||
{{template "header"}} |
|||
<title>博客 - 个人随笔</title> |
|||
<link type="text/css" rel="styleSheet" href="/static/css/me.css"/> |
|||
</head> |
|||
<body> |
|||
<div class="root-container"> |
|||
{{template "nav" .}} |
|||
{{template "memenu" .}} |
|||
|
|||
<div class="me-blog-root"> |
|||
<div class="me-blog-list"> |
|||
{{range .Page.List}} |
|||
<p><a href="/blog/{{.Id}}">{{.Title}}</a></p> |
|||
<div> |
|||
<em>发布时间:{{.Ctime.Format "2006/01/02"}}</em> |
|||
<em>浏览量:{{.Browses}}</em> |
|||
<span style="width: 35px;margin-left: 30px;"><a href="" style="color: #F84822">删除</a></span> |
|||
<span style="width: 35px;margin-left: 10px;"><a href="" style="color: #F84822">编辑</a></span> |
|||
</div> |
|||
<hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 6px;"/> |
|||
{{end}} |
|||
<div style="text-align: center"> |
|||
<nav> |
|||
<div class="pagination pagination-lg"> |
|||
<ul> |
|||
{{if .Page.FirstPage}} |
|||
{{else}} |
|||
<li class="prev"> |
|||
<a href="/me/blog?num={{ .Page.PageNo | NAdd -1}}&flag={{.Flag}}">«</a> |
|||
</li> |
|||
{{end}} |
|||
<li class="active"><a href="javascript:void(0)">{{.Page.PageNo}}</a></li> |
|||
{{if .Page.LastPage}} |
|||
{{else}} |
|||
<li class="next"> |
|||
<a href="/me/blog?num={{ .Page.PageNo | NAdd +1}}&flag={{.Flag}}">»</a> |
|||
</li> |
|||
{{end}} |
|||
</ul> |
|||
</div> |
|||
</nav> |
|||
</div> |
|||
</div> |
|||
{{template "footer"}} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
@ -0,0 +1,37 @@ |
|||
{{template "header"}} |
|||
<title>博客 - 个人随笔</title> |
|||
<link type="text/css" rel="styleSheet" href="/static/css/me.css"/> |
|||
</head> |
|||
<body> |
|||
<div class="root-container"> |
|||
{{template "nav" .}} |
|||
{{template "memenu" .}} |
|||
|
|||
<div class="me-blog-root"> |
|||
<div class="me-blog-list"> |
|||
<ol class="breadcrumb"> |
|||
<li>个人中心</li> |
|||
<li>笔记文件夹</li> |
|||
<li class="active">管理文件夹</li> |
|||
</ol> |
|||
</div> |
|||
|
|||
{{range .Note}} |
|||
<div class="me-blog-list"> |
|||
<div style="display: flex"> |
|||
<p style="flex:1">{{.Title}}<span class="badge" style="margin-left: 3px">{{.Count}}</span></p> |
|||
<span style="width: 35px;"><a href="" style="color: #F84822">删除</a></span> |
|||
<span style="width: 35px;margin-left: 10px;"><a href="" style="color: #F84822">编辑</a></span> |
|||
</div> |
|||
<hr style="height:1px;border:none;border-top:1px solid #EEE;margin: 6px;"/> |
|||
</div> |
|||
|
|||
{{end}} |
|||
<div class="me-footer"> |
|||
{{template "footer"}} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue