From 88cb88c419eba3e6bb9445aa2c6b4c1ec3c7bb59 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Sat, 25 May 2024 09:56:17 +0200 Subject: [PATCH] update css and html --- tournaments/static/tournaments/css/style.css | 30 +++++++++++++++++++ .../templates/tournaments/club_row.html | 2 +- .../templates/tournaments/tournament_row.html | 21 +++++++++++-- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/tournaments/static/tournaments/css/style.css b/tournaments/static/tournaments/css/style.css index e1bf56f..2386925 100644 --- a/tournaments/static/tournaments/css/style.css +++ b/tournaments/static/tournaments/css/style.css @@ -536,6 +536,13 @@ svg { width: 100px; } +.table-row-1-colum { + display: grid; + grid-template-columns: 1px auto; + /* Vertically center the content within each column */ + padding: 5px 0px; +} + .table-row-2-colums { display: grid; grid-template-columns: 2fr 60px; @@ -626,6 +633,29 @@ screen and (min-width: 80em) { text-align: left; } +.table-cell-responsive-large { + flex-grow: 1; + display: none; +} + +.table-cell-responsive-short { + flex-grow: 1; + display: block; +} + +@media print, +screen and (min-width: 80em) { + .table-row-4-colums-tournament { + grid-template-columns: auto 1fr auto auto; + } + .table-cell-responsive-large { + display: block; + } + .table-cell-responsive-short { + display: none; + } +} + .wrap { display: flex; flex-direction: column; diff --git a/tournaments/templates/tournaments/club_row.html b/tournaments/templates/tournaments/club_row.html index 58fc272..a911018 100644 --- a/tournaments/templates/tournaments/club_row.html +++ b/tournaments/templates/tournaments/club_row.html @@ -1,6 +1,6 @@ {% load static %} -
+
{{ club.name }} diff --git a/tournaments/templates/tournaments/tournament_row.html b/tournaments/templates/tournaments/tournament_row.html index b603a28..1a64ac0 100644 --- a/tournaments/templates/tournaments/tournament_row.html +++ b/tournaments/templates/tournaments/tournament_row.html @@ -4,7 +4,7 @@
{{ tournament.level }}
{{ tournament.category }}
-
+
{{ tournament.event.club.name }}
{% if tournament.name_and_event %}
@@ -12,9 +12,24 @@
{% endif %}
+
+
{{ tournament.event.club.acronym }}
+ {% if tournament.event.name %} +
{{ tournament.event.name }}
+ {% endif %} + {% if tournament.name %} +
{{ tournament.name }}
+ {% endif %} +
+ {% if tournament.team_count_display %} -
{{ tournament.team_count_display }}
+
{{ tournament.team_count_display }}
{% endif %} -
{{ tournament.formatted_start_date }}
+
+
{{ tournament.formatted_start_date }}
+ {% if tournament.team_count_display %} +
{{ tournament.team_count_display }}
+ {% endif %} +