Skip to content

Commit

Permalink
Fixing scoreboad for video.
Browse files Browse the repository at this point in the history
  • Loading branch information
renemadsen committed Mar 30, 2024
1 parent bad96af commit b828011
Show file tree
Hide file tree
Showing 5 changed files with 335 additions and 177 deletions.
176 changes: 90 additions & 86 deletions owlcms/frontend/components/Results.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class Results extends LitElement {
<table class="${this.athleteClasses()}" style="${this.athleteStyles()}">
${this.athletes
? html`
<thead>
<tr class="head">
<th class="groupCol" .innerHTML="${this.t?.Start}"></th>
<th class="name" .innerHTML="${this.t?.Name}"></th>
Expand All @@ -83,90 +84,93 @@ class Results extends LitElement {
<th class="sinclair" .innerHTML="${this.t?.ScoringTitle}"></th>
<th class="sinclairRank" .innerHTML="${this.t?.Rank}"></th>
</tr>
${(this.athletes ?? []).map(
(item) =>
html`
${item?.isSpacer
? html`
<tr>
<td class="spacer" style="grid-column: 1 / -1; justify-content: left;" innerHTML="-" ></td>
</tr>
`
: html`
<tr class="athlete">
<td class="${"start " + (item?.classname ?? "")}">
<div class="${item?.classname}"> ${item?.startNumber}</div>
</td>
<td class="${"name " + (item.classname ?? "")}">
<div class="${"name ellipsis " + (item?.classname ?? "")}">${item?.fullName}</div>
</td>
<td class="category">
<div>${item?.category}</div>
</td>
<td class="yob">
<div>${item?.yearOfBirth}</div>
</td>
<td class="custom1">
<div>${item?.custom1}</div>
</td>
<td class="custom2">
<div>${item?.custom2}</div>
</td>
<td class="${"club " + (item?.flagClass ?? "")}">
<div class="${item?.flagClass}" .innerHTML="${item?.flagURL} "></div>
<div class="clubName">
<div class="ellipsis" style="${"width: " + (item?.teamLength ?? "")}">${item?.teamName}</div>
</div>
</td>
<td class="vspacer"></td>
${(item?.sattempts ?? []).map(
(attempt, index) =>
html`
<td class="${(attempt?.goodBadClassName ?? "") + " " + (attempt?.className ?? "")}">
<div class="${(attempt?.goodBadClassName ?? "") + " " + (attempt?.className ?? "")}">${attempt?.stringValue}</div>
</td>
`)}
<td class="best">
<div .innerHTML="${item?.bestSnatch} "></div>
</td>
<td class="rank">
<div .innerHTML="${item?.snatchRank} "></div>
</td>
<td class="vspacer"></td>
${(item?.cattempts ?? []).map(
(attempt, index) =>
html`
<td class="${(attempt?.goodBadClassName ?? "") + " " + (attempt?.className ?? "")}">
<div class="${(attempt?.goodBadClassName ?? "") + " " + (attempt?.className ?? "")}">${attempt?.stringValue}</div>
</td>
`)}
<td class="best">
<div .innerHTML="${item?.bestCleanJerk}"></div>
</td>
<td class="rank">
<div .innerHTML="${item?.cleanJerkRank}"></div>
</td>
<td class="vspacer"></td>
<td class="total">
<div>${item?.total}</div>
</td>
<td class="totalRank">
<div .innerHTML="${item?.totalRank}"></div>
</td>
<td class="sinclair">
<div>${item?.sinclair}</div>
</td>
<td class="sinclairRank">
<div>${item?.sinclairRank}</div>
</td>
</tr>
`}
`)}
`
: html``}
<tr>
<td class="filler" .style="grid-column: 1 / -1; ${this.fillerStyles()}"> &nbsp; </td>
</tr>
</thead>
<tbody>
${(this.athletes ?? []).map(
(item) =>
html`
${item?.isSpacer
? html`
<tr>
<td class="spacer" style="grid-column: 1 / -1; justify-content: left;" innerHTML="-" ></td>
</tr>
`
: html`
<tr class="athlete">
<td class="${"start " + (item?.classname ?? "")}">
<div class="${item?.classname}"> ${item?.startNumber}</div>
</td>
<td class="${"name " + (item.classname ?? "")}">
<div class="${"name ellipsis " + (item?.classname ?? "")}">${item?.fullName}</div>
</td>
<td class="category">
<div>${item?.category}</div>
</td>
<td class="yob">
<div>${item?.yearOfBirth}</div>
</td>
<td class="custom1">
<div>${item?.custom1}</div>
</td>
<td class="custom2">
<div>${item?.custom2}</div>
</td>
<td class="${"club " + (item?.flagClass ?? "")}">
<div class="${item?.flagClass}" .innerHTML="${item?.flagURL} "></div>
<div class="clubName">
<div class="ellipsis" style="${"width: " + (item?.teamLength ?? "")}">${item?.teamName}</div>
</div>
</td>
<td class="vspacer"></td>
${(item?.sattempts ?? []).map(
(attempt, index) =>
html`
<td class="${(attempt?.goodBadClassName ?? "") + " " + (attempt?.className ?? "")}">
<div class="${(attempt?.goodBadClassName ?? "") + " " + (attempt?.className ?? "")}">${attempt?.stringValue}</div>
</td>
`)}
<td class="best">
<div .innerHTML="${item?.bestSnatch} "></div>
</td>
<td class="rank">
<div .innerHTML="${item?.snatchRank} "></div>
</td>
<td class="vspacer"></td>
${(item?.cattempts ?? []).map(
(attempt, index) =>
html`
<td class="${(attempt?.goodBadClassName ?? "") + " " + (attempt?.className ?? "")}">
<div class="${(attempt?.goodBadClassName ?? "") + " " + (attempt?.className ?? "")}">${attempt?.stringValue}</div>
</td>
`)}
<td class="best">
<div .innerHTML="${item?.bestCleanJerk}"></div>
</td>
<td class="rank">
<div .innerHTML="${item?.cleanJerkRank}"></div>
</td>
<td class="vspacer"></td>
<td class="total">
<div>${item?.total}</div>
</td>
<td class="totalRank">
<div .innerHTML="${item?.totalRank}"></div>
</td>
<td class="sinclair">
<div>${item?.sinclair}</div>
</td>
<td class="sinclairRank">
<div>${item?.sinclairRank}</div>
</td>
</tr>
`}
`)}
`
: html``}
<tr>
<td class="filler" .style="grid-column: 1 / -1; ${this.fillerStyles()}"> &nbsp; </td>
</tr>
</tbody>
${this.leaders
? html`
<tbody class="leaders" style="${this.leadersStyles()}">
Expand Down Expand Up @@ -256,12 +260,12 @@ class Results extends LitElement {
</div>
`)}
<div class="${"recordNotification " + (this.recordKind ?? "")}"> ${this.recordMessage} </div>
<div style="position: absolute; bottom: 2em; right: 2em; display: flex; align-items: center; font-weight: thin; font-size: 0.9em;"><img src="local/logos/owlcms-logo.svg" style="height:1.25em; margin-bottom:-0.2em">&nbsp;owlcms</div>
<!--<div style="position: absolute; bottom: 2em; right: 2em; display: flex; align-items: center; font-weight: thin; font-size: 0.9em;"><img src="local/logos/owlcms-logo.svg" style="height:1.25em; margin-bottom:-0.2em">&nbsp;owlcms</div>-->
</div>
</div>
`
: html`<div style="${this.bottomSpacerStyles()}">&nbsp;
<div style="position: absolute; bottom: 0.5em; right: 2em; display: flex; align-items: center; font-weight: thin; font-size: 0.9em; line-height: 1.25em"><img src="local/logos/owlcms-logo.svg" style="height:1.25em; margin-bottom:-0.2em">&nbsp;owlcms</div>
<!--<div style="position: absolute; bottom: 0.5em; right: 2em; display: flex; align-items: center; font-weight: thin; font-size: 0.9em; line-height: 1.25em"><img src="local/logos/owlcms-logo.svg" style="height:1.25em; margin-bottom:-0.2em">&nbsp;owlcms</div>-->
</div>
`}
</div>
Expand Down
16 changes: 8 additions & 8 deletions shared/src/main/resources/css/transparent/currentathlete.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ div > div.attemptBar > div.attempts > table > tr > td.totalRank {
}

.breakTime {
color: var(--breakTimerColor)
color: #ffe11a;
grid-column: 6/7;
}

.athleteTimer {
color: var(--athleteTimerColor);
color: #ffe11a;
}

table.results {
Expand Down Expand Up @@ -395,10 +395,10 @@ table.results td.liftName div {
}

:host .dark .request {
background-color: #002A63;
background-color: #ffe11a;
border-radius: 5px 5px 5px 5px;
border: 0;
color: #ffffff;
color: #002A63;
font-style: italic;
width: var(--narrow-width);
text-align: center;
Expand All @@ -420,10 +420,10 @@ table.results td.liftName div {

:host .dark td.current {
/* intentionally light, we want the yellow background */
background-color: #002A63;
background-color: #ffe11a;
border-radius: 5px 5px 5px 5px;
border: 0;
color: #ffffff;
color: #002A63;
font-weight: bold;
width: var(--narrow-width);
text-align: center;
Expand Down Expand Up @@ -478,10 +478,10 @@ table.results td.liftName div {
}

:host .dark table.results td.empty {
background-color: #00ff00;
background-color: #002A63;
border-radius: 5px 5px 5px 5px;
color: #002A63;
border: 0;
border: 0;
font-style: italic;
width: var(--narrow-width);
margin-right: 5px;;
Expand Down
Loading

0 comments on commit b828011

Please sign in to comment.