Skip to content

Commit f24eee5

Browse files
committed
Add position to team name
1 parent 1c4eb6a commit f24eee5

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"scripts": {
99
"db": "json-server --watch demo/db.json",
1010
"build": "npx webpack --mode production",
11-
"start": "npx webpack --watch --mode development"
11+
"start": "npx webpack --watch --mode development",
12+
"prepublishOnly": "npm run build"
1213
},
1314
"repository": {
1415
"type": "git",

src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class BracketsViewer {
8989
if (participant !== undefined) {
9090
const cell = $('<td>').text(participant.name);
9191
const id = participant.id;
92-
92+
9393
this.teamRefsDOM[id].push(cell.get(0));
9494
cell.hover(
9595
() => $(this.teamRefsDOM[id]).addClass('hover'),
@@ -226,6 +226,9 @@ class BracketsViewer {
226226
nameDOM.text(participant === undefined ? 'TBD' : participant.name);
227227
scoreDOM.text(team.score === undefined ? '-' : team.score);
228228

229+
if (team.position !== undefined)
230+
nameDOM.append($('<span>').text(` (#${team.position})`));
231+
229232
if (team.result && team.result === 'win') {
230233
nameDOM.addClass('win');
231234
scoreDOM.addClass('win');

src/style.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ h3 {
241241
&.win {
242242
font-weight: bold;
243243
}
244+
245+
& > span {
246+
color: rgb(170, 170, 170);
247+
}
244248
}
245249

246250
.score {

0 commit comments

Comments
 (0)