From 320bf0220944a2358178905b059847d6f439435d Mon Sep 17 00:00:00 2001 From: nelson Date: Sun, 19 May 2019 17:59:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E9=A1=B5=20=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E6=8B=BF=E5=88=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/UPageController.go | 11 ++++++ routers/UPageRouter.go | 10 +++++ static/css/common.css | 45 +++++++++++++++++++++++ views/T.header.tpl | 3 +- views/search.html | 67 ++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 controllers/UPageController.go create mode 100644 routers/UPageRouter.go create mode 100644 views/search.html diff --git a/controllers/UPageController.go b/controllers/UPageController.go new file mode 100644 index 0000000..e4f9491 --- /dev/null +++ b/controllers/UPageController.go @@ -0,0 +1,11 @@ +package controllers + +import "github.com/astaxie/beego" + +type UPageController struct { + beego.Controller +} + +func (this *UPageController) SearchPage() { + this.TplName = "search.html" +} diff --git a/routers/UPageRouter.go b/routers/UPageRouter.go new file mode 100644 index 0000000..d8c66ec --- /dev/null +++ b/routers/UPageRouter.go @@ -0,0 +1,10 @@ +package routers + +import ( + "beeblog/controllers" + "github.com/astaxie/beego" +) + +func init() { + beego.Router("/search", &controllers.UPageController{}, "get:SearchPage") +} diff --git a/static/css/common.css b/static/css/common.css index 0161838..c5720e8 100644 --- a/static/css/common.css +++ b/static/css/common.css @@ -613,4 +613,49 @@ img { .blog-detaile p code{ color: red; padding: 2px 5px; +} + +.search-root{ + margin-top: 50px; +} + +.search-root .input-class{ + display: table; + border-collapse: separate; +} +.search-root .input-class{ + width: 50%; + height: 32px; + margin: 18px auto; + display: flex; +} +.search-root .input-class input{ + flex: 1; + height: 36px !important; + padding: 2px 14px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + display: table-cell; + border: 1px solid #3385ff; +} +.search-root .input-class .input-group-addon{ + color: #555; + height: 36px; + line-height: 36px !important; + font-size: 17px !important; + font-size: 12px; + padding: 2px 14px; + line-height: 36px; + border-radius: 3px; + display: table-cell; + background-color: #3385ff; + border-top-left-radius: 0; + border-bottom-left-radius: 0; + color: #fff; + border: 1px solid #3385ff; + border-left: none; + cursor: pointer; } \ No newline at end of file diff --git a/views/T.header.tpl b/views/T.header.tpl index 39bc2f9..dba4971 100644 --- a/views/T.header.tpl +++ b/views/T.header.tpl @@ -13,5 +13,6 @@ - + + {{end}} \ No newline at end of file diff --git a/views/search.html b/views/search.html new file mode 100644 index 0000000..468cb91 --- /dev/null +++ b/views/search.html @@ -0,0 +1,67 @@ +{{template "header" .}} + +搜索 - 码农随笔 + + +
+ {{template "nav" .}} +
+
+
+
+ + 搜索 +
+
+
+
+ +
+
+
+ + + \ No newline at end of file