File tree Expand file tree Collapse file tree 3 files changed +23
-8
lines changed
Expand file tree Collapse file tree 3 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ function parseStandings(standings: Standing[]) {
6262}
6363
6464function standingComponent ( standing : Standing ) {
65- return /*html*/ `
65+ return /*html*/ `
6666 <tr>
6767 <td class="team-info">
6868 <div class="image-wrapper">
@@ -93,9 +93,11 @@ function parseLastResults(lastResults: MATCH_RESULT[]) {
9393}
9494
9595function dotComponent ( result : MATCH_RESULT ) {
96- return /*html*/ `
97- <div class="dot" style="background-color: #${ resultToColor ( result ) } "></div>
98- ` ;
96+ return /*html*/ `<div class="${
97+ result === MATCH_RESULT . UNKNOWN ? "empty-dot" : "dot"
98+ } " style="${
99+ result === MATCH_RESULT . UNKNOWN ? "border-color" : "background-color"
100+ } : #${ resultToColor ( result ) } "></div>`;
99101}
100102
101103function resultToColor ( result : MATCH_RESULT ) {
@@ -106,6 +108,10 @@ function resultToColor(result: MATCH_RESULT) {
106108 return "A5A5A5" ;
107109 case MATCH_RESULT . WON :
108110 return "00E100" ;
111+ case MATCH_RESULT . UNKNOWN :
112+ return "A5A5A5" ;
113+ default :
114+ return "A5A5A5" ;
109115 }
110116}
111117
@@ -118,7 +124,7 @@ function styles() {
118124 margin-right: 10%;
119125 width: 80%;
120126 }
121- }
127+ }
122128 table {
123129 border-collapse: collapse;
124130 width: 100%;
@@ -142,7 +148,7 @@ function styles() {
142148 justify-content: center;
143149 margin-right: 8px;
144150 }
145- .img {
151+ .img {
146152 width: auto;
147153 height: auto;
148154 }
@@ -156,6 +162,13 @@ function styles() {
156162 width: 15px;
157163 border-radius: 50%;
158164 }
165+ .empty-dot {
166+ height: 13px;
167+ width: 13px;
168+ border-radius: 50%;
169+ border-style: solid;
170+ border-width: 2px;
171+ }
159172 </style>
160173 ` ;
161174}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ export enum MATCH_RESULT {
22 LOST = 0 ,
33 DRAW = 1 ,
44 WON = 2 ,
5+ UNKNOWN = 3 ,
56}
67
78export type Standing = {
You can’t perform that action at this time.
0 commit comments