From 6686de168c44c01e8bb9f924bb96300206d7a0e9 Mon Sep 17 00:00:00 2001 From: Minho Date: Wed, 31 May 2017 10:15:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=88=86=E9=A1=B5=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appveyor.yml | 4 ++-- controllers/home.go | 2 ++ static/css/main.css | 16 +++++++++++++++- views/home/index.tpl | 6 ++++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b159358a..0f174bac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,10 +53,10 @@ notifications: deploy: - provider: GitHub - name: production auth_token: - secure: + secure: "Qkhxloft5lBKti7O+vVS+Vrxh7CBAUVhlfdZ9ptBXjFtjt6jHXnaBA2uv2OYbISB" draft: false + prerelease: false artifact: godoc_windows_%GOARCH%.7z on: branch: master diff --git a/controllers/home.go b/controllers/home.go index 612a6f59..5936cd5c 100644 --- a/controllers/home.go +++ b/controllers/home.go @@ -4,6 +4,7 @@ import ( "github.com/astaxie/beego" "github.com/lifei6671/godoc/models" "github.com/lifei6671/godoc/utils" + "math" ) type HomeController struct { @@ -38,6 +39,7 @@ func (c *HomeController) Index() { }else { c.Data["PageHtml"] = "" } + c.Data["TotalPages"] = int(math.Ceil(float64(totalCount) / float64(pageSize))) c.Data["Lists"] = books diff --git a/static/css/main.css b/static/css/main.css index 8c3727da..e9d34b00 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -509,7 +509,21 @@ textarea{ word-wrap: break-word; /* Help out IE10+ with class names */ } -/**************网站底部样式*************************/ +.pagination-container { + margin: 5px auto; + text-align: center !important; + display: block !important; +} +.pagination-container .pagination>li>a,.pagination-container .pagination>li>span{ + padding: 4px 9px !important; +} +.pagination-container .pagination>li>a,.pagination-container .pagination>li>span{ + color: #333; +} +.pagination-container .pagination>.active>a{ + color: #fff; +} + /**************网站底部样式*************************/ .footer{ color: #777; padding: 30px 0; diff --git a/views/home/index.tpl b/views/home/index.tpl index 0791b2f0..2c0c4b68 100644 --- a/views/home/index.tpl +++ b/views/home/index.tpl @@ -49,6 +49,12 @@ {{end}}
+ {{template "widgets/footer.tpl" .}}