From 96514784a993ccb2cfb5fa129c385ccebcf8e7b1 Mon Sep 17 00:00:00 2001 From: "R. Aidan Campbell" Date: Sun, 10 Jul 2016 16:38:26 -0400 Subject: [PATCH] added borders to all box art, because it looked weird --- static/css/style.css | 3 +++ static/js/index.js | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 95948b3..400ba56 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -175,3 +175,6 @@ main { .current-game { border: 3px solid green; } +.not-current-game { + border: 1px solid black; +} \ No newline at end of file diff --git a/static/js/index.js b/static/js/index.js index 3fe2e23..253e5ab 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -239,12 +239,15 @@ function showApps() { $('#game-'+app.id).on('click', startGame); if (api.currentGame === app.id){ // stylize the currently running game - $('#game-'+ api.currentGame).addClass("current-game"); + // destylize it, if it has the not-current-game style + if ($('#game-'+ app.id).hasClass("not-current-game")) $('#game-'+ app.id).removeClass("not-current-game"); + // add the current-game style + $('#game-'+ app.id).addClass("current-game"); } else { - if ($('#game-'+ api.id).hasClass("current-game")) { // destylize it otherwise - console.log('stripping now inactive game: ' + app.title); - $('#game-'+ api.id).removeClass("current-game"); - } + // destylize it, if it has the current-game style + if ($('#game-'+ app.id).hasClass("current-game")) $('#game-'+ app.id).removeClass("current-game"); + // add the not-current-game style + $('#game-'+ app.id).addClass('not-current-game'); } }, function (failedPromise) {