diff --git a/static/css/common.css b/static/css/common.css index 056a08b..e0cd0a0 100644 --- a/static/css/common.css +++ b/static/css/common.css @@ -61,4 +61,8 @@ h2 { #link_div > a:hover { color: white; +} + +img.emoji { + height: 14px; } \ No newline at end of file diff --git a/static/js/game_loader.js b/static/js/game_loader.js index 4890329..9bfb447 100644 --- a/static/js/game_loader.js +++ b/static/js/game_loader.js @@ -7,7 +7,6 @@ $(document).ready(function (){ }); socket.on("states_update", function (json) { //json is an object containing all game updates - console.log(json) var searchparams = new URLSearchParams(window.location.search); var exists = false; for (game of json) { @@ -17,7 +16,10 @@ $(document).ready(function (){ } } if (!exists) { - // inform the user the game has ended + $('game').remove() + $('#game_container').text("The game you're looking for either doesn't exist or has already ended.") } + + twemoji.parse(document.body); }); }); \ No newline at end of file diff --git a/static/js/grid_loader.js b/static/js/grid_loader.js index 667c6b7..abaca9a 100644 --- a/static/js/grid_loader.js +++ b/static/js/grid_loader.js @@ -89,9 +89,10 @@ const insertEmpty = (grid) => { const insertGame = (gridboxnum, game) => { var thisBox = grid.children[gridboxnum]; - thisBox.innerHTML = game.html; thisBox.className = "game"; thisBox.timestamp = game.timestamp; + thisBox.innerHTML = game.html; + twemoji.parse(thisBox); }; const insertLeague = (league) => { diff --git a/templates/base.html b/templates/base.html index 8eaaf00..9c8373a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,7 @@
+