From: Tim Siebels Date: Wed, 20 Aug 2014 16:31:22 +0000 (+0200) Subject: use a different color to show that the user has matched the artist X-Git-Url: https://git.saalbach.dev/?a=commitdiff_plain;h=a1e6e6cd9c95b77ff4314be7963540c3c9d9dea6;p=binbsis50.git use a different color to show that the user has matched the artist fix #12 and close #14 --- diff --git a/public/css/style.css b/public/css/style.css index 2bad6db..34a5cdf 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -334,7 +334,10 @@ form .clearfix { font-size: 12px; margin-right: 4px; } -.matched { +.matchedartist { + color: #1502c2; +} +.matchedtitle { color: #f3a22f; } .cups, .medals { diff --git a/public/js/app.js b/public/js/app.js index fa8a902..106cbce 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1032,16 +1032,15 @@ if (user.roundpoints > 0) { $roundpoints.text('+' + user.roundpoints); - if (user.roundpoints === 1) { - $username.addClass('matched'); + if (user.matched === 'artist' || user.matched === 'title') { + return $username.addClass('matched' + user.matched); } - else { - $username.addClass('correct'); - if (user.roundpoints > 3) { - $guesstime.text((user.guesstime / 1000).toFixed(1) +' s'); - $roundrank.addClass('icons round-rank stand' + (7 - user.roundpoints)); - } + $username.addClass('correct'); + + if (user.roundpoints > 3) { + $guesstime.text((user.guesstime / 1000).toFixed(1) +' s'); + $roundrank.addClass('icons round-rank stand' + (7 - user.roundpoints)); } } });