mirror of https://github.com/dirtbags/moth.git
Integrate Ken's "monarch of the category"
This commit is contained in:
parent
5dfcb6324f
commit
3d8c47d316
|
@ -57,6 +57,11 @@
|
||||||
width: inherit;
|
width: inherit;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
.topscore::before {
|
||||||
|
content: "✩";
|
||||||
|
font-size: 75%;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 450px) {
|
@media only screen and (max-width: 450px) {
|
||||||
#rankings span.teamname {
|
#rankings span.teamname {
|
||||||
|
|
|
@ -74,7 +74,8 @@ async function update() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
let block = teampoints.appendChild(document.createElement("span"))
|
// XXX: Figure out how to do this properly with flexbox
|
||||||
|
let block = row.appendChild(document.createElement("span"))
|
||||||
let points = scores.GetPoints(category, teamID)
|
let points = scores.GetPoints(category, teamID)
|
||||||
let width = MaxScoreWidth * score / topScore
|
let width = MaxScoreWidth * score / topScore
|
||||||
|
|
||||||
|
@ -82,6 +83,7 @@ async function update() {
|
||||||
block.title = `${points} points`
|
block.title = `${points} points`
|
||||||
block.style.width = `${width}%`
|
block.style.width = `${width}%`
|
||||||
block.classList.add("category", `cat${categoryNumber}`)
|
block.classList.add("category", `cat${categoryNumber}`)
|
||||||
|
block.classList.toggle("topscore", score == 1)
|
||||||
|
|
||||||
categoryNumber += 1
|
categoryNumber += 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue