diff --git a/theme/scoreboard.css b/theme/scoreboard.css index 7381764..c95fa65 100644 --- a/theme/scoreboard.css +++ b/theme/scoreboard.css @@ -57,6 +57,11 @@ width: inherit; max-width: 100%; } +.topscore::before { + content: "✩"; + font-size: 75%; + vertical-align: top; +} @media only screen and (max-width: 450px) { #rankings span.teamname { diff --git a/theme/scoreboard.mjs b/theme/scoreboard.mjs index 5eaf0d3..e01a6a2 100644 --- a/theme/scoreboard.mjs +++ b/theme/scoreboard.mjs @@ -74,7 +74,8 @@ async function update() { 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 width = MaxScoreWidth * score / topScore @@ -82,6 +83,7 @@ async function update() { block.title = `${points} points` block.style.width = `${width}%` block.classList.add("category", `cat${categoryNumber}`) + block.classList.toggle("topscore", score == 1) categoryNumber += 1 }