diff --git a/tournaments/templates/tournaments/broadcast/broadcast.html b/tournaments/templates/tournaments/broadcast/broadcast.html index 134466d..98bff39 100644 --- a/tournaments/templates/tournaments/broadcast/broadcast.html +++ b/tournaments/templates/tournaments/broadcast/broadcast.html @@ -24,13 +24,15 @@
diff --git a/tournaments/templates/tournaments/broadcast/broadcast_club.html b/tournaments/templates/tournaments/broadcast/broadcast_club.html index 2ebd531..91c1df5 100644 --- a/tournaments/templates/tournaments/broadcast/broadcast_club.html +++ b/tournaments/templates/tournaments/broadcast/broadcast_club.html @@ -8,6 +8,18 @@ {% block content %}
+ +
+
+ + Diffusion automatique du club + - Cycle automatiquement entre tous les tournois actifs +- 3 jours + +
+
+ + +
@@ -30,7 +42,8 @@ {{ tournament.private_label }}
- Automatic | + Auto | + Event Auto | (beta) Tableau | (beta) Planning | Matchs | diff --git a/tournaments/templates/tournaments/broadcast/broadcasted_auto.html b/tournaments/templates/tournaments/broadcast/broadcasted_auto.html index 3222ddf..e775f46 100644 --- a/tournaments/templates/tournaments/broadcast/broadcasted_auto.html +++ b/tournaments/templates/tournaments/broadcast/broadcasted_auto.html @@ -200,6 +200,7 @@
+
{% if tournament.event.images.exists %} @@ -213,4 +214,94 @@
{% endif %} + + diff --git a/tournaments/templates/tournaments/broadcast/broadcasted_bracket.html b/tournaments/templates/tournaments/broadcast/broadcasted_bracket.html index c9f9529..0ca7970 100644 --- a/tournaments/templates/tournaments/broadcast/broadcasted_bracket.html +++ b/tournaments/templates/tournaments/broadcast/broadcasted_bracket.html @@ -43,6 +43,24 @@ padding: 20px; max-width: 45%; } + + /* Reduce font size for player names */ + .broadcast-mode .player .semibold { + font-size: 0.85em !important; + line-height: 1.2 !important; + } + + /* Reduce font size for team weight */ + .broadcast-mode .score.numbers { + font-size: 0.85em !important; + } + + /* Optional: Also reduce single/two player text if needed */ + .broadcast-mode .single-player .semibold, + .broadcast-mode .two-players .semibold { + font-size: 0.85em !important; + line-height: 1.2 !important; + } diff --git a/tournaments/templates/tournaments/broadcast/broadcasted_club_auto.html b/tournaments/templates/tournaments/broadcast/broadcasted_club_auto.html new file mode 100644 index 0000000..54d079b --- /dev/null +++ b/tournaments/templates/tournaments/broadcast/broadcasted_club_auto.html @@ -0,0 +1,63 @@ + + + + Club Auto Broadcast + + + + + + + + + diff --git a/tournaments/templates/tournaments/broadcast/broadcasted_event_auto.html b/tournaments/templates/tournaments/broadcast/broadcasted_event_auto.html new file mode 100644 index 0000000..69d8c90 --- /dev/null +++ b/tournaments/templates/tournaments/broadcast/broadcasted_event_auto.html @@ -0,0 +1,63 @@ + + + + Event Auto Broadcast + + + + + + + + + diff --git a/tournaments/templates/tournaments/broadcast/broadcasted_planning.html b/tournaments/templates/tournaments/broadcast/broadcasted_planning.html index 00f2385..fcf5241 100644 --- a/tournaments/templates/tournaments/broadcast/broadcasted_planning.html +++ b/tournaments/templates/tournaments/broadcast/broadcasted_planning.html @@ -267,7 +267,7 @@ this.currentDayIndex = 0; this.currentPageIndex = 0; } - }, 15000); + }, 20000); }, calculateFractionWidth() { diff --git a/tournaments/views.py b/tournaments/views.py index c8d9bb7..29a3434 100644 --- a/tournaments/views.py +++ b/tournaments/views.py @@ -521,18 +521,29 @@ def tournament_broadcast_home(request, tournament_id): def automatic_broadcast(request, tournament_id): tournament = get_object_or_404(Tournament, pk=tournament_id) - return render(request, 'tournaments/broadcast/broadcasted_auto.html', { + response = render(request, 'tournaments/broadcast/broadcasted_auto.html', { 'tournament': tournament, 'qr_code_url': qr_code_url(request, tournament_id), 'qr_code_options': qr_code_options(), }) + # Allow iframe embedding from same origin + response['X-Frame-Options'] = 'SAMEORIGIN' + return response def automatic_broadcast_event(request, event_id): event = get_object_or_404(Event, pk=event_id) tournaments = Tournament.objects.filter(event=event) tournament_ids = [str(tournament.id) for tournament in tournaments] - return render(request, 'tournaments/broadcast/broadcasted_auto_event.html', { + + # Create QR code URL for the event broadcast + qr_code_url_val = reverse('automatic-broadcast-event', args=[event_id]) + qr_code_url_full = request.build_absolute_uri(qr_code_url_val) + + return render(request, 'tournaments/broadcast/broadcasted_event_auto.html', { 'tournament_ids': tournament_ids, + 'event': event, + 'qr_code_url': qr_code_url_full, + 'qr_code_options': qr_code_options(), }) def qr_code_url(request, tournament_id): @@ -774,13 +785,10 @@ def club_broadcast_auto(request, broadcast_code): ) tournament_ids = [str(tournament.id) for tournament in tournaments] - #print(tournament_ids) - return render(request, 'tournaments/broadcast/broadcasted_auto_event.html', { + + return render(request, 'tournaments/broadcast/broadcasted_club_auto.html', { 'tournament_ids': tournament_ids, 'club_name': club.name, - 'qr_code_url': qr_code_url_with_query(request, club.id), - 'qr_code_options': qr_code_options(), - }) def download(request):