分类 · JavaCodeMood/BookStack@6e2afe0 · GitHub
Skip to content

Commit 6e2afe0

Browse files
committed
分类
1 parent fe344ee commit 6e2afe0

8 files changed

Lines changed: 50 additions & 6 deletions

File tree

controllers/BaseController.go

Lines changed: 1 addition & 0 deletions

controllers/CateController.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package controllers
2+
3+
type CateController struct {
4+
BaseController
5+
}
6+
7+
//分类
8+
func (this *CateController) List() {
9+
this.Data["IsCate"] = true
10+
this.TplName = "cates/list.html"
11+
}

routers/router.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ func init() {
105105
beego.Router("/tag/:key", &controllers.LabelController{}, "get:Index")
106106
beego.Router("/tag", &controllers.LabelController{}, "get:List")
107107
beego.Router("/tags", &controllers.LabelController{}, "get:List")
108+
beego.Router("/cate", &controllers.CateController{}, "get:List")
108109
beego.Router("/sitemap.html", &controllers.BaseController{}, "get:Sitemap")
109110
beego.Router("/local-render", &controllers.LocalhostController{}, "get,post:RenderMarkdown")
110111
beego.Router("/*", &controllers.BaseController{}, "get:StaticFile")

static/css/bookstack.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,4 +1182,4 @@ li.L1, li.L3, li.L5, li.L7, li.L9{background-color: transparent;}
11821182
.bookstack-bars li{border-bottom: 1px solid #efefef;}
11831183
.bookstack-bars li:last-child{border-bottom:0px;}
11841184
.bookstack-bars li:hover{background-color: #EFEFEF}
1185-
.bookstack-bars li:hover a{color: #10af88}
1185+
.bookstack-bars li:hover a{color: #10af88}

static/css/main.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,4 +709,12 @@ a{color: #333}
709709
.category-manager .form-control{border-radius: 4px !important;}
710710
.category-manager .icon-category-small{cursor: pointer;}
711711
.category-manager .fa-minus-circle{cursor: pointer;font-size: 20px;}
712-
.category-manager .fa-plus-circle{cursor: pointer;font-size: 20px;color: #5cb85c;}
712+
.category-manager .fa-plus-circle{cursor: pointer;font-size: 20px;color: #5cb85c;}
713+
714+
.row-cate{margin-top: 35px;margin-bottom: 15px;border: 1px solid red;height: 40px;overflow:hidden;}
715+
.row-cate .text-muted{margin-right: 15px;}
716+
.row-cate a{display: inline-block;padding: 7px 18px;border-radius: 4px;border:1px solid transparent;margin-bottom: 10px;text-decoration: none;}
717+
.row-cate a:hover,.row-cate a.active{color: #009a61;border:1px solid #efefef;font-weight: 400;}
718+
719+
.row-cate-sub a{display: inline-block;text-align: center;}
720+
.row-cate-sub a img{width: 60px;height: 60px;border-radius: 4px;}

views/cates/list.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Title</title>
6+
</head>
7+
<body>
8+
分类
9+
</body>
10+
</html>

views/home/index.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@
66
<body>
77
<div class="manual-reader manual-container">
88
{{template "widgets/header.html" .}}
9-
<div class="container manual-body" style="overflow-x: hidden !important;;">
9+
<div class="container manual-body">
10+
<div class="row mgt-15px">
11+
<div class="col-xs-12 mgt-15px">
12+
<ul class="nav nav-tabs">
13+
<li class="active"><a href="{{urlfor "HomeController.Index"}}" title="站长推荐">站长推荐</a></li>
14+
<li><a href="{{urlfor "HomeController.Index"}}?tab=popular">热门书籍</a></li>
15+
<li><a href="{{urlfor "HomeController.Index"}}?tab=latest">最新发布</a></li>
16+
</ul>
17+
</div>
18+
</div>
1019
<div class="row">
11-
12-
1320
<div class="manual-list">
1421
{{range $index,$item := .Lists}}
1522
{{/*<div class="list-item">*/}}

views/widgets/header.html

Lines changed: 7 additions & 1 deletion

0 commit comments

Comments
 (0)