Skip to content

Commit

Permalink
SHow medal and rank below each other on mobile scoreboard
Browse files Browse the repository at this point in the history
  • Loading branch information
nickygerritsen committed Mar 1, 2025
1 parent ede94dc commit 8391e00
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions webapp/templates/partials/scoreboard_table.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -390,15 +390,10 @@
{% endif %}
<tr class="{{ classes | join(' ') }}" data-team-id="{{ score.team.teamid }}" style="border-bottom-width: 0; height: 28px;">
{% if enable_ranking %}
<td class="scorepl {{medalColor}}" rowspan="2">
{# Only print rank when score is different from the previous team #}
{% if not displayRank %}
?
{% elseif previousTeam is null or scoreboard.scores[previousTeam.teamid].rank != score.rank %}
{{ score.rank }}
{% else %}
<td class="scorepl">
{% if medalsEnabled and medalColor != '' %}
<i class="fa fa-medal {{medalColor}} d-block me-2" style="font-size: 1.5rem;"></i>
{% endif %}
{% set previousTeam = score.team %}
</td>
{% endif %}
<td class="scoreaf">
Expand Down Expand Up @@ -486,6 +481,18 @@
{% endif %}
</tr>
<tr style="height: 32px;">
<td>
{# Only print rank when score is different from the previous team #}
<span class="d-block me-2">
{% if not displayRank %}
?
{% elseif previousTeam is null or scoreboard.scores[previousTeam.teamid].rank != score.rank %}
{{ score.rank }}
{% else %}
{% endif %}
</span>
{% set previousTeam = score.team %}
</td>
{% if showAffiliationLogos %}
{% set problemSpan = 3 %}
{% else %}
Expand Down

0 comments on commit 8391e00

Please sign in to comment.