From f7725c0a1fbf7f508cc460d9701158e5f252a8f0 Mon Sep 17 00:00:00 2001 From: Minho Date: Sat, 13 May 2017 17:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E9=A1=B9=E7=9B=AE=E5=86=85?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/document.go | 6 +++++ routers/router.go | 1 + static/css/kancloud.css | 34 ++++++++++++++++++++------ views/document/default_read.tpl | 43 +++++++++++++++++++++++++++++++-- 4 files changed, 75 insertions(+), 9 deletions(-) diff --git a/controllers/document.go b/controllers/document.go index f51d4e1f..5c5bc558 100644 --- a/controllers/document.go +++ b/controllers/document.go @@ -832,6 +832,12 @@ func (c *DocumentController) QrCode() { } } +func (c *DocumentController) Search() { + c.Prepare() + + c.JsonResult(0,"ok") +} + //递归生成文档序列数组. func RecursiveFun(parent_id int, prefix, dpath string, c *DocumentController, book *models.BookResult, docs []*models.Document, paths *list.List) { for _, item := range docs { diff --git a/routers/router.go b/routers/router.go index 48993a9b..df0ea250 100644 --- a/routers/router.go +++ b/routers/router.go @@ -61,6 +61,7 @@ func init() { beego.Router("/docs/:key", &controllers.DocumentController{},"*:Index") beego.Router("/docs/:key/:id", &controllers.DocumentController{},"*:Read") + beego.Router("/docs/:key/search", &controllers.DocumentController{},"post:Search") beego.Router("/export/:key", &controllers.DocumentController{},"*:Export") beego.Router("/qrcode/:key.png",&controllers.DocumentController{},"get:QrCode") diff --git a/static/css/kancloud.css b/static/css/kancloud.css index 147f36b7..0ef1f121 100644 --- a/static/css/kancloud.css +++ b/static/css/kancloud.css @@ -138,9 +138,6 @@ h6 { .m-manual .manual-tab .tab-navg { zoom:1;border-bottom: 1px solid #ddd } -.m-manual .manual-tab .tab-navg { - zoom:1;border-bottom: 1px solid #ddd -} .m-manual .manual-tab .tab-util { position: absolute; @@ -244,16 +241,14 @@ h6 { .m-manual .manual-tab .tab-navg .navg-item.active .icon,.m-manual .manual-tab .tab-navg .navg-item.active:hover .icon,.m-manual .manual-tab .tab-navg .navg-item:hover .icon { color: #333 } -.m-manual .manual-catalog { - display: block !important; -} .m-manual .manual-tab .tab-navg .navg-item.active { border-bottom: 1px solid #fafafa; margin-bottom: -1px; border-left: 1px solid #ddd; border-right: 1px solid #ddd; padding-left: 8px; - padding-right: 8px + padding-right: 8px; + height: 31px; } .m-manual .manual-tab .tab-item { display: none; @@ -270,6 +265,24 @@ h6 { .m-manual .manual-tab .tab-item.active { display: block } +.m-manual.manual-mode-search .manual-search { + display: block +} +.m-manual.manual-mode-view .manual-catalog { + display: block +} +.m-manual .manual-search .search-form{ + margin: 5px ; + position: relative; +} +.m-manual .manual-search .btn-search{ + background-color: #ffffff; + border: 0; + padding: 5px; + position: absolute; + top: 2px; + right: 5px; +} .m-manual .manual-left .m-copyright { border-top: 0; background: #fafafa; @@ -322,6 +335,13 @@ h6 { position: relative; zoom:1;padding: 10px 20px } +.manual-reader .book-title{ + color: #333333; +} +.manual-reader .book-title:hover{ + text-decoration: none; + color: #333333; +} .manual-article .article-head h1 { margin: 0; diff --git a/views/document/default_read.tpl b/views/document/default_read.tpl index 41444cce..537bffbb 100644 --- a/views/document/default_read.tpl +++ b/views/document/default_read.tpl @@ -28,12 +28,12 @@ -
+