Skip to content

Commit

Permalink
Highlight whole team name column for categories
Browse files Browse the repository at this point in the history
  • Loading branch information
nickygerritsen committed Mar 2, 2025
1 parent 54427fa commit 4d5a8af
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
9 changes: 5 additions & 4 deletions webapp/public/js/domjudge.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,11 @@ function initFavouriteTeams()
}
}
scoreboard[j].style.background = "lightyellow";
const scoretn = scoreboard[j].querySelector('.scoretn');
if (scoretn && scoretn.classList.contains('cl_FFFFFF')) {
scoretn.classList.remove('cl_FFFFFF');
scoretn.classList.add('cl_FFFFE0');
const whiteCells = scoreboard[j].querySelectorAll('.cl_FFFFFF');
for (let k = 0; k < whiteCells.length; k++) {
const whiteCell = whiteCells[k];
whiteCell.classList.remove('cl_FFFFFF');
whiteCell.classList.add('cl_FFFFE0');
}
if (mobile) {
scoreboard[j + 1].style.background = "lightyellow";
Expand Down
38 changes: 19 additions & 19 deletions webapp/templates/partials/scoreboard_table.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@
{% set previousTeam = score.team %}
</td>
{% endif %}
<td class="scoreaf">
{% if color is null %}
{% set color = "#FFFFFF" %}
{% set colorClass = "_FFFFFF" %}
{% else %}
{% set colorClass = color | replace({"#": "_"}) %}
{% set backgroundColors = backgroundColors | merge({(color): 1}) %}
{% endif %}
<td class="scoreaf cl{{ colorClass }}">
{% if showFlags %}
{% if score.team.affiliation %}
{% set link = null %}
Expand All @@ -176,7 +183,7 @@
{% endif %}
</td>
{% if showAffiliationLogos %}
<td class="scoreaf">
<td class="scoreaf cl{{ colorClass }}">
{% if score.team.affiliation %}
{% set link = null %}
{% if jury %}
Expand All @@ -197,14 +204,7 @@
</td>
{% endif %}
{% if public %}
<td class="scoreaf heart"></td>
{% endif %}
{% if color is null %}
{% set color = "#FFFFFF" %}
{% set colorClass = "_FFFFFF" %}
{% else %}
{% set colorClass = color | replace({"#": "_"}) %}
{% set backgroundColors = backgroundColors | merge({(color): 1}) %}
<td class="scoreaf heart cl{{ colorClass }}"></td>
{% endif %}
<td class="scoretn cl{{ colorClass }}" title="{{ score.team.effectiveName }}">
{% set link = null %}
Expand Down Expand Up @@ -411,7 +411,13 @@
{% endif %}
</td>
{% endif %}
<td class="scoreaf">
{% if color is null %}
{% set color = "#FFFFFF" %}
{% set colorClass = "_FFFFFF" %}
{% else %}
{% set colorClass = color | replace({"#": "_"}) %}
{% endif %}
<td class="scoreaf cl{{ colorClass }}">
{% if showFlags %}
{% if score.team.affiliation %}
{% set link = null %}
Expand All @@ -425,7 +431,7 @@
{% endif %}
</td>
{% if showAffiliationLogos %}
<td class="scoreaf">
<td class="scoreaf cl{{ colorClass }}">
{% if score.team.affiliation %}
{% set link = null %}
{% if jury %}
Expand All @@ -446,13 +452,7 @@
</td>
{% endif %}
{% if public %}
<td class="scoreaf heart"></td>
{% endif %}
{% if color is null %}
{% set color = "#FFFFFF" %}
{% set colorClass = "_FFFFFF" %}
{% else %}
{% set colorClass = color | replace({"#": "_"}) %}
<td class="scoreaf heart cl{{ colorClass }}"></td>
{% endif %}
<td class="scoretn cl{{ colorClass }}" title="{{ score.team.effectiveName }}">
{% set link = null %}
Expand Down

0 comments on commit 4d5a8af

Please sign in to comment.