From a1e6e6cd9c95b77ff4314be7963540c3c9d9dea6 Mon Sep 17 00:00:00 2001 From: Tim Siebels Date: Wed, 20 Aug 2014 18:31:22 +0200 Subject: [PATCH] use a different color to show that the user has matched the artist fix #12 and close #14 --- public/css/style.css | 5 ++++- public/js/app.js | 15 +++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) 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)); } } }); -- 2.54.0