From 4c1858c07b972e64d47218646f89b2fb5340a993 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Thu, 6 Mar 2014 23:14:45 +0800 Subject: [PATCH] navbar active status --- public/css/gogs.css | 12 +++++++++++- routers/dashboard.go | 3 ++- routers/user/user.go | 1 + templates/base/navbar.tmpl | 4 ++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/public/css/gogs.css b/public/css/gogs.css index 471c796df..6580d907a 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -20,6 +20,10 @@ body { border-bottom-color: #333 !important; } +.tooltip-arrow:before { + border-bottom-color: transparent !important; +} + .fa { margin: 0 .5em; } @@ -39,6 +43,7 @@ body { font-weight: bold; color: #EEE; font-size: 100%; + height: 46px; } .gogs-nav-item:hover, @@ -55,6 +60,7 @@ body { cursor: pointer; margin-top: 8px; padding: 5px 15px; + height: 30px; } .gogs-nav-item.navbar-right .fa { @@ -68,7 +74,7 @@ body { .gogs-nav .active:after { position: absolute; - bottom: -2px; + bottom: -1px; left: 50%; width: 0; height: 0; @@ -80,6 +86,10 @@ body { border-left: 5px solid transparent; } +#gogs-nav-logo:after { + bottom: -4px !important; +} + .gogs-nav .tooltip { border: none; } diff --git a/routers/dashboard.go b/routers/dashboard.go index c15462382..8eda9cf24 100644 --- a/routers/dashboard.go +++ b/routers/dashboard.go @@ -16,5 +16,6 @@ func Home(r render.Render, data base.TmplData, session sessions.Session) { user.Dashboard(r, data, session) return } - r.HTML(200, "home", nil) + data["PageIsHome"] = true + r.HTML(200, "home", data) } diff --git a/routers/user/user.go b/routers/user/user.go index 5cec6deb2..46d4154e1 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -27,6 +27,7 @@ func Dashboard(r render.Render, data base.TmplData, session sessions.Session) { data["IsSigned"] = true data["SignedUserId"] = SignedInId(session) data["SignedUserName"] = SignedInName(session) + data["PageIsUserDashboard"] = true data["Title"] = "Dashboard" r.HTML(200, "user/dashboard", data) diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl index 82fc3ae18..a52ce6c03 100644 --- a/templates/base/navbar.tmpl +++ b/templates/base/navbar.tmpl @@ -1,8 +1,8 @@