0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-21 17:41:44 +01:00

navbar active status

This commit is contained in:
FuXiaoHei 2014-03-06 23:14:45 +08:00
parent 9cd14f97c2
commit 4c1858c07b
4 changed files with 16 additions and 4 deletions

View file

@ -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;
}

View file

@ -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)
}

View file

@ -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)

View file

@ -1,8 +1,8 @@
<div class="gogs-masthead navbar navbar-fixed-top" id="masthead">
<div class="container">
<nav class="gogs-nav">
<a class="gogs-nav-item active" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="gogs-logo"></a>
<a class="gogs-nav-item" href="#">Dashboard</a>
<a id="gogs-nav-logo" class="gogs-nav-item{{if .PageIsHome}} active{{end}}" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="gogs-logo"></a>
<a class="gogs-nav-item{{if .PageIsUserDashboard}} active{{end}}" href="#">Dashboard</a>
<a class="gogs-nav-item" href="#">Explore</a>
<a class="gogs-nav-item" href="#">Help</a>{{if .IsSigned}}
<a id="gogs-nav-out" class="gogs-nav-item navbar-right navbar-btn btn btn-danger" href="/user/login/"><i class="fa fa-power-off fa-lg"></i></a>