diff --git a/controllers/PageController.go b/controllers/PageController.go index 9851316..ffbde7c 100644 --- a/controllers/PageController.go +++ b/controllers/PageController.go @@ -24,3 +24,13 @@ func (this *PageController) Blog() { func (this *PageController) IframeNote() { this.TplName = "iframe/note.html" } + +// @router /404 [get] +func (this *PageController) PageNotFound() { + this.TplName = "404.html" +} + +// @router /500 [get] +func (this *PageController) ServerError() { + this.TplName = "500.html" +} diff --git a/controllers/UserController.go b/controllers/UserController.go index 41e150f..1b70433 100644 --- a/controllers/UserController.go +++ b/controllers/UserController.go @@ -23,6 +23,10 @@ func (u *UserController) RegistPage() { u.TplName = "regist.html" } +func (u *UserController) PersonBlog() { + u.TplName = "ublogs.html" +} + func (this *UserController) Login() { username := this.GetString("username") userpwd := this.GetString("userpwd") diff --git a/data/beeblog.db b/data/beeblog.db index ad8228a..b7c8412 100644 Binary files a/data/beeblog.db and b/data/beeblog.db differ diff --git a/routers/UserRouter.go b/routers/UserRouter.go index 755a83c..a41acfd 100644 --- a/routers/UserRouter.go +++ b/routers/UserRouter.go @@ -11,4 +11,9 @@ func init() { beego.Router("/login", &controllers.UserController{}, "post:Login") beego.Router("/regist", &controllers.UserController{}, "post:Regist") beego.Router("/regist", &controllers.UserController{}, "get:RegistPage") + + + + beego.Router("/me/blog", &controllers.UserController{}, "get:PersonBlog") + } diff --git a/static/css/me.css b/static/css/me.css new file mode 100644 index 0000000..a740f99 --- /dev/null +++ b/static/css/me.css @@ -0,0 +1,17 @@ +.me-menu{ + position: fixed; + top: 60px; + left: 20px; + width: 260px; + height: 100%; + background-color: #f9f9f9; +} + +.me-blog-root{ + height: 100%; + margin: 50px 4% 0 4%; +} + +.me-blog-list{ + margin-left: 300px; +} diff --git a/views/404.html b/views/404.html new file mode 100644 index 0000000..bb5d2c8 --- /dev/null +++ b/views/404.html @@ -0,0 +1,10 @@ + + +
+ +