From d31614cb71266638f3731d304460483559cc6a43 Mon Sep 17 00:00:00 2001 From: Laurent Date: Sat, 12 Oct 2024 17:27:34 +0200 Subject: [PATCH 1/3] reduce font size for smaller screens --- tournaments/static/tournaments/css/style.css | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tournaments/static/tournaments/css/style.css b/tournaments/static/tournaments/css/style.css index 9249d31..7a08d87 100644 --- a/tournaments/static/tournaments/css/style.css +++ b/tournaments/static/tournaments/css/style.css @@ -28,6 +28,12 @@ body { margin: 0px 0px 100px 0px; } +@media screen and (max-width: 40em) { + body { + font-size: 0.8em; + } +} + label { color: #707070; font-size: 1.1em; @@ -196,7 +202,12 @@ tr { .large { font-family: "Montserrat-SemiBold"; font-size: 1.2em; - /* color: #707070; */ +} + +@media screen and (max-width: 40em) { + .large { + font-size: 0.9em; + } } .semibold { From 84462373b1920e3b0d3c14439ad31041d928dcca Mon Sep 17 00:00:00 2001 From: Laurent Date: Sat, 12 Oct 2024 17:50:06 +0200 Subject: [PATCH 2/3] Fixes display of group stages --- tournaments/models/group_stage.py | 5 +++++ .../templates/tournaments/group_stage_cell.html | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tournaments/models/group_stage.py b/tournaments/models/group_stage.py index 6f0a0dc..132ef43 100644 --- a/tournaments/models/group_stage.py +++ b/tournaments/models/group_stage.py @@ -162,6 +162,11 @@ class LiveGroupStage: "duration": self.formatted_duration() } + def started(self): + if self.start is None: + return False + return self.start < timezone.now() + class GroupStageTeam: def __init__(self, team_registration): self.names = team_registration.shortened_team_names() diff --git a/tournaments/templates/tournaments/group_stage_cell.html b/tournaments/templates/tournaments/group_stage_cell.html index 7c74043..ee90d69 100644 --- a/tournaments/templates/tournaments/group_stage_cell.html +++ b/tournaments/templates/tournaments/group_stage_cell.html @@ -21,17 +21,17 @@ {% endfor %}
- {% if group_stage.start %} + {% if group_stage.started %}
{{ team.wins_losses }}
{{ team.formatted_diff }}
{% else %} - {% if tournament.hide_weight %} -
- {% else %} -
{{ team.weight }}
- {% endif %} + {% if tournament.hide_weight %} +
+ {% else %} +
{{ team.weight }}
+ {% endif %} {% endif %}
From 07fbaab07c6ac2f3bf554cfb2757cda0c826a5b6 Mon Sep 17 00:00:00 2001 From: Raz Date: Sat, 12 Oct 2024 21:29:22 +0200 Subject: [PATCH 3/3] fix wc display --- tournaments/templates/tournaments/team_row.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tournaments/templates/tournaments/team_row.html b/tournaments/templates/tournaments/team_row.html index 4205bc4..09867b8 100644 --- a/tournaments/templates/tournaments/team_row.html +++ b/tournaments/templates/tournaments/team_row.html @@ -5,7 +5,8 @@
WC Tableau
{% elif team.wildcard_groupstage %}
WC Qualifications
- {% else %} + {% endif %} + {% if team.names %}
{% for name in team.names %}
{{ name }}
@@ -18,6 +19,8 @@
{% elif not team.wildcard_bracket and not team.wildcard_groupstage %}
{{ team.weight }}
+ {% elif team.names %} +
{{ team.weight }}
{% else %}
{% endif %}