Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #33 from shundroid/final
Browse files Browse the repository at this point in the history
rankingを改良
  • Loading branch information
dadaa authored Aug 1, 2016
2 parents 4b64813 + 01594ad commit 8022a07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ footer section {
font-size: 13px;
}

#ranking li span::before {
#ranking li .ranking-hp::before {
content: "HP: ";
}

Expand Down
7 changes: 6 additions & 1 deletion js/result-screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8022a07

Please sign in to comment.