Preliminary styling to mostly show play times.
background-position: -100px -150px;
}
+.loss:before {
+ color: #C11;
+ content: '✘';
+}
+.win:before {
+ color: #297ACC;
+ content: '✔';
+}
+
.old {
text-decoration: line-through;
}
.ladders {
grid-row: 3;
}
+.matches {
+ grid-column: 1;
+}
@media (min-width: 576px) {
.members {
})
.then(clan => {
let tiernum = (rank) => rank <= 8 ? 1 : rank <= 25 ? 2 : rank <= 50 ? 3 : 4;
+ let matchtime = (d) => d.getDate() + '/' + (d.getMonth() + 1) +
+ ' ' + d.getHours() + ":" + ('0' + d.getMinutes()).slice(-2);
outcont.outerHTML = `
<h1>${clan.tag || clan.members[0].name}</h1>
<ul class=ladders>
</figure></a></li>
`).join('')}
</ul>
+ <ul class=matches>
+ ${clan.matches.splice(0, 3).map(match => `
+ <li data-members="${match.players}" class=${match.decision.toLowerCase()}>
+ ${matchtime(new Date(match.date * 1000))} ${match.type}
+ </li>
+ `).join('')}
+ </ul>
`
document.querySelectorAll('[data-members]').forEach(li => {