added title below image, need to do some more styling to whole interface eventually

This commit is contained in:
Abdallah Soliman 2016-07-10 22:21:38 -05:00
parent 1778513544
commit 7d598ebaf4
2 changed files with 6 additions and 2 deletions

View File

@ -178,3 +178,7 @@ main {
.not-current-game { .not-current-game {
border: 1px solid black; border: 1px solid black;
} }
.game-title {
color: #000;
font-weight: bold;
}

View File

@ -235,7 +235,7 @@ function showApps() {
appList.forEach(function (app) { appList.forEach(function (app) {
api.getBoxArt(app.id).then(function (resolvedPromise) { api.getBoxArt(app.id).then(function (resolvedPromise) {
var imageBlob = new Blob([resolvedPromise], {type: "image/png"}); var imageBlob = new Blob([resolvedPromise], {type: "image/png"});
$("#game-grid").append($("<div>", {html:$("<img \>", {src: URL.createObjectURL(imageBlob), id: 'game-'+app.id, name: app.title }), class: 'box-art mdl-cell mdl-cell--3-col'})); $("#game-grid").append($("<div>", {html:$("<img \>", {src: URL.createObjectURL(imageBlob), id: 'game-'+app.id, name: app.title }), class: 'box-art mdl-cell mdl-cell--3-col'}).append($("<span>", {html: app.title, class:"game-title"})));
$('#game-'+app.id).on('click', startGame); $('#game-'+app.id).on('click', startGame);
if (api.currentGame === app.id){ // stylize the currently running game if (api.currentGame === app.id){ // stylize the currently running game