Aggiunge i tornei con hub, pagina pubblica e tabellone per semifinali e finali.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
<section class="team-public-section" id="risultati" aria-labelledby="tournament-results-heading">
|
||||
<h2 id="tournament-results-heading" class="section-heading visually-hidden"><%= t("tournaments.page.tabs.risultati") %></h2>
|
||||
<p class="results-hint"><%= t("tournaments.page.board_hint") %></p>
|
||||
<% if @matches.any? %>
|
||||
<% tournament_matches_grouped_by_date(@matches).each do |date, matches| %>
|
||||
<h3 class="tournament-board__day">
|
||||
<%= date ? l(date, format: :long) : t("tournaments.hub.stream_plan_unscheduled") %>
|
||||
</h3>
|
||||
<div class="tournament-table-wrap">
|
||||
<table class="data tournament-board">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("tournaments.hub.datetime") %></th>
|
||||
<th><%= t("tournaments.hub.court") %></th>
|
||||
<th><%= t("tournaments.hub.stream_plan_match") %></th>
|
||||
<th><%= t("tournaments.page.score") %></th>
|
||||
<th><%= t("tournaments.hub.stream_plan_live_col") %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% matches.each do |match| %>
|
||||
<%= render "public/tournament_pages/board_row", match: match %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="muted"><%= t("tournaments.hub.no_matches") %></p>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
<% if @recordings.any? %>
|
||||
<section class="team-public-section">
|
||||
<h2 class="section-heading section-heading--spaced"><%= t("tournaments.page.section_replays") %></h2>
|
||||
<div class="replay-grid">
|
||||
<% @recordings.each do |rec| %>
|
||||
<% match = rec.stream_session.match %>
|
||||
<%= link_to public_replay_path(rec.stream_session_id), class: "replay-card" do %>
|
||||
<div class="replay-card__media">
|
||||
<% if rec.thumbnail_url %>
|
||||
<img src="<%= rec.thumbnail_url %>" alt="" class="replay-card__thumb" loading="lazy" width="320" height="180">
|
||||
<% else %>
|
||||
<div class="replay-card__thumb replay-card__thumb--placeholder" aria-hidden="true">
|
||||
<span class="replay-card__placeholder-icon">▶</span>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if rec.duration_label.present? %>
|
||||
<span class="replay-card__duration"><%= rec.duration_label %></span>
|
||||
<% end %>
|
||||
<span class="replay-card__play" aria-hidden="true">▶</span>
|
||||
</div>
|
||||
<div class="replay-card__body">
|
||||
<strong class="replay-card__title"><%= rec.title.presence || match.matchup_label %></strong>
|
||||
<p class="replay-card__meta"><%= match.matchup_label %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user