From 32ca78b1d784539205b83cd2c1f30e786771a3d7 Mon Sep 17 00:00:00 2001 From: Cameron Moon Date: Fri, 1 Mar 2013 13:31:13 +1100 Subject: [PATCH] Added sign out link when hovering over name (fixes #352) --- code/boot.js | 11 ++++++++++- style.css | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/code/boot.js b/code/boot.js index fcb76729..7e5882a2 100644 --- a/code/boot.js +++ b/code/boot.js @@ -186,13 +186,22 @@ window.setupPlayerStat = function() { $('#playerstat').html('' + '

'+level+' ' + + '
' + ''+PLAYER.nickname+'' - + '
' + + 'sign out' + + '
' + + '
' + 'XM: '+xmRatio+'%' + '' + (level < 8 ? 'level: '+lvlApProg+'%' : 'max level') + '' + '
' + '

' ); + + $('#name').mouseenter(function() { + $('#signout').show(); + }).mouseleave(function() { + $('#signout').hide(); + }); } window.setupSidebarToggle = function() { diff --git a/style.css b/style.css index d4e30170..4863ee34 100644 --- a/style.css +++ b/style.css @@ -329,21 +329,34 @@ h2 { width: 100%; } -h2 span { +h2 #name { display: inline-block; overflow: hidden; text-overflow: "~"; vertical-align: top; white-space: nowrap; width: 205px; + position: relative; } -h2 div { +h2 #stats { float: right; height: 100%; overflow: hidden; } +h2 #signout { + font-size: 12px; + font-weight: normal; + line-height: 29px; + padding: 0 4px; + position: absolute; + top: 0; + right: 0; + background-color: rgba(8, 48, 78, 0.5); + display: none; /* starts hidden */ +} + h2 sup, h2 sub { display: block; font-size: 11px;