From 01594ad85c998898a2dec89e675b71d1c9e46071 Mon Sep 17 00:00:00 2001 From: shundroid Date: Mon, 1 Aug 2016 12:24:05 +0900 Subject: [PATCH] =?UTF-8?q?ranking=E3=82=92=E6=94=B9=E8=89=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/style.css | 2 +- js/result-screen.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index 62f7894..c43ec00 100644 --- a/css/style.css +++ b/css/style.css @@ -304,7 +304,7 @@ footer section { font-size: 13px; } -#ranking li span::before { +#ranking li .ranking-hp::before { content: "HP: "; } diff --git a/js/result-screen.js b/js/result-screen.js index fc585a0..cb4fe8b 100644 --- a/js/result-screen.js +++ b/js/result-screen.js @@ -30,11 +30,16 @@ function ResultScreen() { playerListItem.textContent = player.name; const hpElement = document.createElement("span"); hpElement.textContent = player.states.hp; + hpElement.classList.add("ranking-hp"); playerListItem.appendChild(hpElement); + const colorElement = document.createElement("span"); + colorElement.textContent = player.states.color; + colorElement.style.backgroundColor = player.states.color; + playerListItem.appendChild(colorElement); this.rankingElement.appendChild(playerListItem); }); this.oniElement.innerHTML = ""; - rankingDetail.onis.forEach(name => { + Object.keys(rankingDetail.onis).forEach(name => { const oniListItem = document.createElement("li"); oniListItem.textContent = name; this.oniElement.appendChild(oniListItem);