diff --git a/app/ui/SiteMenu.scala b/app/ui/SiteMenu.scala index 98ab836a89..e3f485a86e 100644 --- a/app/ui/SiteMenu.scala +++ b/app/ui/SiteMenu.scala @@ -20,7 +20,7 @@ final class SiteMenu(trans: I18nKeys) { val tv = new Elem("tv", routes.Tv.index, I18nKey.untranslated("TV")) val message = new Elem("message", routes.Message.inbox(page = 1), trans.inbox) - private val authenticated = List(play, game, tournament, user, team, forum, tv, message) + private val authenticated = List(play, game, tournament, user, team, forum, tv) private val anonymous = List(play, game, tournament, user, team, forum, tv) def all(me: Option[User]) = me.isDefined.fold(authenticated, anonymous) diff --git a/app/views/auth/loggedIn.scala.html b/app/views/auth/loggedIn.scala.html index 872492cd89..72bde13af3 100644 --- a/app/views/auth/loggedIn.scala.html +++ b/app/views/auth/loggedIn.scala.html @@ -1,4 +1,4 @@ -@(me: User)(implicit ctx: Context) +@(me: User, active: Option[lila.app.ui.SiteMenu.Elem])(implicit ctx: Context)
+ + + @defining(messageNbUnread(ctx)) { nbUnread => + + } + diff --git a/app/views/base/layout.scala.html b/app/views/base/layout.scala.html index 7129291a4f..44a940a196 100644 --- a/app/views/base/layout.scala.html +++ b/app/views/base/layout.scala.html @@ -54,14 +54,6 @@ data-accept-languages="@acceptLanguages.mkString(",")"> @if(!zen) { @siteMenu.all(ctx.me).map { elem => @elem.code match { - case "message" => { - - - @defining(messageNbUnread(ctx)) { nbUnread => - - } - - } case "team" if teamNbRequests(ctx) > 0 => { @defining(teamNbRequests(ctx)) { nbr => @@ -107,7 +99,7 @@ data-accept-languages="@acceptLanguages.mkString(",")"> - @ctx.me.fold(auth.miniLogin())(auth.loggedIn(_)) + @ctx.me.fold(auth.miniLogin())(auth.loggedIn(_, active)) } @ctx.me.map { me => diff --git a/public/javascripts/big.js b/public/javascripts/big.js index 980f2966fe..12739cc9c6 100644 --- a/public/javascripts/big.js +++ b/public/javascripts/big.js @@ -533,7 +533,7 @@ var storage = { $('body').on('lichess.content_loaded', userPowertips); $('#top a.message').powerTip({ - placement: 'se', + placement: 'sw', mouseOnToPopup: true, closeDelay: 200 }).on({ diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css index 48f970e223..9958a0ec14 100644 --- a/public/stylesheets/common.css +++ b/public/stylesheets/common.css @@ -1103,8 +1103,9 @@ body.offline #nb_connected_players { #nb_connected_players { float: left; } -#top a.goto_nav.message { +#top a.message { opacity: 0.7; + float: right; } #top .goto_nav { border-bottom: 2px solid transparent; @@ -1528,9 +1529,7 @@ table.slist thead { background: linear-gradient(to bottom, #efefef, #e2e2e2); } /* active gradient */ - #top a.signin:hover, -#top a.goto_nav.active, .button.active, .button.active:hover, .ui-state-active,