Skip to content

Commit 8391e00

Browse files
SHow medal and rank below each other on mobile scoreboard
1 parent ede94dc commit 8391e00

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

webapp/templates/partials/scoreboard_table.html.twig

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -390,15 +390,10 @@
390390
{% endif %}
391391
<tr class="{{ classes | join(' ') }}" data-team-id="{{ score.team.teamid }}" style="border-bottom-width: 0; height: 28px;">
392392
{% if enable_ranking %}
393-
<td class="scorepl {{medalColor}}" rowspan="2">
394-
{# Only print rank when score is different from the previous team #}
395-
{% if not displayRank %}
396-
?
397-
{% elseif previousTeam is null or scoreboard.scores[previousTeam.teamid].rank != score.rank %}
398-
{{ score.rank }}
399-
{% else %}
393+
<td class="scorepl">
394+
{% if medalsEnabled and medalColor != '' %}
395+
<i class="fa fa-medal {{medalColor}} d-block me-2" style="font-size: 1.5rem;"></i>
400396
{% endif %}
401-
{% set previousTeam = score.team %}
402397
</td>
403398
{% endif %}
404399
<td class="scoreaf">
@@ -486,6 +481,18 @@
486481
{% endif %}
487482
</tr>
488483
<tr style="height: 32px;">
484+
<td>
485+
{# Only print rank when score is different from the previous team #}
486+
<span class="d-block me-2">
487+
{% if not displayRank %}
488+
?
489+
{% elseif previousTeam is null or scoreboard.scores[previousTeam.teamid].rank != score.rank %}
490+
{{ score.rank }}
491+
{% else %}
492+
{% endif %}
493+
</span>
494+
{% set previousTeam = score.team %}
495+
</td>
489496
{% if showAffiliationLogos %}
490497
{% set problemSpan = 3 %}
491498
{% else %}

0 commit comments

Comments
 (0)