Skip to content

Commit 07f819e

Browse files
Update mobile scoreboard.
- Make team names not fall of the screen by calculating their max width. - Make non mobile scoreboard not left-aligned. - Add a bit of margin to the header. - Make the problem boxes right aligned. - Change the card at the top to show 2 lines (name + contestt time) on mobile.
1 parent e24ac34 commit 07f819e

File tree

4 files changed

+311
-282
lines changed

4 files changed

+311
-282
lines changed

webapp/public/style_domjudge.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ del {
219219
display: block;
220220
overflow: hidden;
221221
}
222+
222223
.toolong:after {
223224
content: "";
224225
width: 30%;
@@ -675,4 +676,4 @@ blockquote {
675676
-ms-transform:rotate(-35deg);
676677
-o-transform:rotate(-35deg);
677678
transform:rotate(-35deg);
678-
}
679+
}

webapp/templates/partials/scoreboard.html.twig

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,37 @@
1818
{% endif %}
1919

2020
<div class="card" {% if refreshstop is defined %}data-ajax-refresh-stop="1"{% endif %}>
21-
<div class="card-header" style="font-family: Roboto, sans-serif; display: flex;">
22-
<span style="font-weight: bold;">{{ current_contest.name }}</span>
23-
<span id="contesttimer">
24-
{% if scoreboard is null %}
25-
{{ current_contest | printContestStart }}
26-
{% elseif scoreboard.freezeData.showFinal(jury) %}
27-
{% if current_contest.finalizetime is empty %}
28-
preliminary results - not final
29-
{% else %}
30-
final standings
31-
{% endif %}
32-
{% elseif scoreboard.freezeData.stopped %}
33-
contest over, waiting for results
34-
{% elseif static %}
35-
{% set now = 'now'|date('U') %}
36-
{{ current_contest.starttime | printelapsedminutes(now) }}
37-
{% else %}
38-
{% if current_contest.freezeData.started %}
39-
started:
21+
<div class="card-header" style="font-family: Roboto, sans-serif;">
22+
<div class="row">
23+
<div class="col-md-6 col-12">
24+
<span style="font-weight: bold;">{{ current_contest.name }}</span>
25+
</div>
26+
<div class="col-md-6 col-12 text-md-end text-start">
27+
<span id="contesttimer">
28+
{% if scoreboard is null %}
29+
{{ current_contest | printContestStart }}
30+
{% elseif scoreboard.freezeData.showFinal(jury) %}
31+
{% if current_contest.finalizetime is empty %}
32+
preliminary results - not final
33+
{% else %}
34+
final standings
35+
{% endif %}
36+
{% elseif scoreboard.freezeData.stopped %}
37+
contest over, waiting for results
38+
{% elseif static %}
39+
{% set now = 'now'|date('U') %}
40+
{{ current_contest.starttime | printelapsedminutes(now) }}
4041
{% else %}
41-
starts:
42+
{% if current_contest.freezeData.started %}
43+
started:
44+
{% else %}
45+
starts:
46+
{% endif %}
47+
{{ current_contest.starttime | printtime }} - ends: {{ current_contest.endtime | printtime }}
4248
{% endif %}
43-
{{ current_contest.starttime | printtime }} - ends: {{ current_contest.endtime | printtime }}
44-
{% endif %}
45-
</span>
49+
</span>
50+
</div>
51+
</div>
4652
</div>
4753

4854
{% if static %}

0 commit comments

Comments
 (0)