Aggiunge i18n IT/EN/FR/DE/ES, pagine pubbliche squadre e UX archivio.
Il selettore lingua funziona sul web e sulle app native; su Android la preferenza è persistita e applicata al riavvio. Incluse anche eliminazione replay a scope e campi pagina pubblica squadra. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -74,6 +74,8 @@
|
||||
<% end %>
|
||||
</td>
|
||||
<td style="white-space:nowrap">
|
||||
<%= link_to "Pagina pubblica", public_team_page_path(team.slug), target: "_blank", rel: "noopener" %>
|
||||
·
|
||||
<%= link_to "Dettagli", public_team_details_path(team) %>
|
||||
·
|
||||
<%= link_to "Partite", public_team_matches_path(team) %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% content_for :title, "Match Live TV — Diretta live partite giovanili da telefono" %>
|
||||
<% content_for :meta_description, "Non puoi andare in palestra? Guarda la diretta live della partita di tuo figlio dal telefono o dal computer, senza installare app. Pallavolo, calcio e sport giovanili: link da condividere con nonni e parenti, archivio se te la perdi." %>
|
||||
<% content_for :title, t("home.title") %>
|
||||
<% content_for :meta_description, t("home.meta_description") %>
|
||||
<% content_for :canonical_url, seo_absolute_url(root_path) %>
|
||||
<% content_for :head do %>
|
||||
<script type="application/ld+json">
|
||||
@@ -10,7 +10,7 @@
|
||||
"url" => seo_absolute_url(root_path),
|
||||
"applicationCategory" => "SportsApplication",
|
||||
"operatingSystem" => "Web, Android, iOS",
|
||||
"description" => "Piattaforma per dirette live e archivio partite delle società sportive giovanili."
|
||||
"description" => t("home.schema_description")
|
||||
}.to_json) %>
|
||||
</script>
|
||||
<% end %>
|
||||
@@ -20,104 +20,94 @@
|
||||
<div class="hero-content">
|
||||
<p class="hero-app-name">Match Live TV</p>
|
||||
<p class="hero-live-badge"><span class="hero-live-dot" aria-hidden="true"></span> LIVE</p>
|
||||
<h1>Ogni partita, ogni evento, per chi <span class="hero-accent">non può esserci.</span></h1>
|
||||
<p class="tagline">
|
||||
Trasmetti in diretta dallo smartphone. I nonni, i parenti lontani, gli amici —
|
||||
guardano dal browser, senza installare nulla.
|
||||
E se te la sei persa, la ritrovi nell'archivio.
|
||||
</p>
|
||||
<h1><%= raw t("home.headline_html") %></h1>
|
||||
<p class="tagline"><%= t("home.tagline") %></p>
|
||||
<div class="hero-cta">
|
||||
<%= link_to "Registra la tua squadra", public_signup_path, class: "btn btn-primary" %>
|
||||
<%= link_to "Guarda le dirette", public_live_index_path, class: "btn btn-secondary" %>
|
||||
<%= link_to t("home.cta_signup"), public_signup_path, class: "btn btn-primary" %>
|
||||
<%= link_to t("home.cta_live"), public_live_index_path, class: "btn btn-secondary" %>
|
||||
</div>
|
||||
<ul class="hero-features" aria-label="Vantaggi principali">
|
||||
<ul class="hero-features" aria-label="<%= t('home.features_aria') %>">
|
||||
<li class="hero-feature-item">
|
||||
<span class="hero-feature-icon" aria-hidden="true"><i class="fa-solid fa-tower-broadcast"></i></span>
|
||||
<span class="hero-feature-label">Dirette stabili</span>
|
||||
<span class="hero-feature-label"><%= t("home.feature_stable") %></span>
|
||||
</li>
|
||||
<li class="hero-feature-item">
|
||||
<span class="hero-feature-icon" aria-hidden="true"><i class="fa-solid fa-cloud"></i></span>
|
||||
<span class="hero-feature-label">Archivio sicuro</span>
|
||||
<span class="hero-feature-label"><%= t("home.feature_archive") %></span>
|
||||
</li>
|
||||
<li class="hero-feature-item">
|
||||
<span class="hero-feature-icon" aria-hidden="true"><i class="fa-solid fa-user-group"></i></span>
|
||||
<span class="hero-feature-label">Condividi con chi vuoi</span>
|
||||
<span class="hero-feature-label"><%= t("home.feature_share") %></span>
|
||||
</li>
|
||||
<li class="hero-feature-item hero-feature-item--last">
|
||||
<span class="hero-feature-icon" aria-hidden="true"><i class="fa-solid fa-mobile-screen"></i></span>
|
||||
<span class="hero-feature-label">Tutto dal tuo telefono</span>
|
||||
<span class="hero-feature-label"><%= t("home.feature_phone") %></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="hero-visual">
|
||||
<%= image_tag "/hero-devices.png", alt: "Smartphone su treppiede per la diretta e secondo telefono per il punteggio in palestra", class: "hero-devices-img", loading: "eager", fetchpriority: "high" %>
|
||||
<%= image_tag "/hero-devices.png", alt: t("home.hero_alt"), class: "hero-devices-img", loading: "eager", fetchpriority: "high" %>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section wrap">
|
||||
<h2>Come funziona lo streaming per squadre giovanili</h2>
|
||||
<h2><%= t("home.how_title") %></h2>
|
||||
<div class="steps">
|
||||
<div class="step step--visual">
|
||||
<div class="step-visual">
|
||||
<%= image_tag "/home-step-registra-squadra.png?v=1", alt: "Registrazione squadra: scudo, pallone e modulo con email, password e nome squadra", class: "step-visual-img", loading: "lazy" %>
|
||||
<%= image_tag "/home-step-registra-squadra.png?v=1", alt: t("home.step1_title"), class: "step-visual-img", loading: "lazy" %>
|
||||
</div>
|
||||
<div class="step-num">01</div>
|
||||
<h3>Registra la squadra</h3>
|
||||
<p>La società si iscrive sul sito e sceglie il piano più adatto.</p>
|
||||
<h3><%= t("home.step1_title") %></h3>
|
||||
<p><%= t("home.step1_body") %></p>
|
||||
</div>
|
||||
<div class="step step--visual">
|
||||
<div class="step-visual">
|
||||
<%= image_tag "/home-step-invita-trasmette.png?v=1", alt: "Invito a trasmettere: smartphone con invio email e busta con accetta invito", class: "step-visual-img", loading: "lazy" %>
|
||||
<%= image_tag "/home-step-invita-trasmette.png?v=1", alt: t("home.step2_title"), class: "step-visual-img", loading: "lazy" %>
|
||||
</div>
|
||||
<div class="step-num">02</div>
|
||||
<h3>Invita chi trasmette</h3>
|
||||
<p>Coach e volontari ricevono un invito: ognuno accede con la propria email.</p>
|
||||
<h3><%= t("home.step2_title") %></h3>
|
||||
<p><%= t("home.step2_body") %></p>
|
||||
</div>
|
||||
<div class="step step--visual">
|
||||
<div class="step-visual">
|
||||
<%= image_tag "/home-step-vai-in-diretta.png?v=1", alt: "Vai in diretta: smartphone su treppiede, punteggio live e condivisione link", class: "step-visual-img", loading: "lazy" %>
|
||||
<%= image_tag "/home-step-vai-in-diretta.png?v=1", alt: t("home.step3_title"), class: "step-visual-img", loading: "lazy" %>
|
||||
</div>
|
||||
<div class="step-num">03</div>
|
||||
<h3>Vai in diretta</h3>
|
||||
<p>Dal telefono si avvia la partita: punteggio aggiornato e link da condividere con le famiglie.</p>
|
||||
<h3><%= t("home.step3_title") %></h3>
|
||||
<p><%= t("home.step3_body") %></p>
|
||||
</div>
|
||||
<div class="step step--visual">
|
||||
<div class="step-visual">
|
||||
<%= image_tag "/home-step-tutti-guardano.png?v=2", alt: "Tutti guardano da casa: archivio partite, partita salvata e link per genitori e parenti", class: "step-visual-img", loading: "lazy" %>
|
||||
<%= image_tag "/home-step-tutti-guardano.png?v=2", alt: t("home.step4_title"), class: "step-visual-img", loading: "lazy" %>
|
||||
</div>
|
||||
<div class="step-num">04</div>
|
||||
<h3>Tutti guardano da casa</h3>
|
||||
<p>Genitori, nonni e parenti aprono il link nel browser. La partita resta anche in archivio.</p>
|
||||
<h3><%= t("home.step4_title") %></h3>
|
||||
<p><%= t("home.step4_body") %></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section wrap plans-teaser">
|
||||
<h2>Piani per dirette live e archivio partite</h2>
|
||||
<p class="plans-teaser-lead">Inizia gratis. Passa a Premium quando vuoi più partite in contemporanea, archivio più lungo e diretta anche su YouTube.</p>
|
||||
<h2><%= t("home.plans_title") %></h2>
|
||||
<p class="plans-teaser-lead"><%= t("home.plans_lead") %></p>
|
||||
<div class="plans-teaser-visual">
|
||||
<%= image_tag "/home-piani-ecosistema.png?v=1", alt: "Ecosistema Match Live TV: smartphone in diretta, laptop con live e statistiche, tablet con archivio partite e cloud", class: "plans-teaser-img", loading: "lazy" %>
|
||||
<%= image_tag "/home-piani-ecosistema.png?v=1", alt: t("home.plans_alt"), class: "plans-teaser-img", loading: "lazy" %>
|
||||
</div>
|
||||
<%= link_to "Confronta i piani", public_prezzi_path, class: "btn btn-primary" %>
|
||||
<%= link_to t("home.plans_cta"), public_prezzi_path, class: "btn btn-primary" %>
|
||||
</section>
|
||||
|
||||
<section class="section wrap seo-prose">
|
||||
<h2>Streaming partite giovanili: perché le famiglie scelgono Match Live TV</h2>
|
||||
<h2><%= t("home.seo_title") %></h2>
|
||||
<p><%= raw t("home.seo_p1_html") %></p>
|
||||
<p><%= raw t("home.seo_p2_html") %></p>
|
||||
<p>
|
||||
Allenatori e dirigenti cercano un modo semplice per mandare in <strong>diretta live</strong> le partite
|
||||
di <strong>pallavolo giovanile</strong>, calcio, basket e altri sport: senza attrezzature da TV,
|
||||
solo con lo smartphone in palestra. Match Live TV è pensato per le società dilettantistiche che vogliono
|
||||
far guardare <strong>Under 14, Under 16, Under 18</strong> e settori giovanili a chi è lontano.
|
||||
</p>
|
||||
<p>
|
||||
Un genitore che lavora, un nonno che non può viaggiare, un parente all’estero: aprono un link e seguono
|
||||
la partita dal browser. Se arrivano in ritardo, la <strong>registrazione in archivio</strong> (con i piani Premium)
|
||||
resta disponibile per giorni. Niente account complicati per chi guarda — solo per lo staff che trasmette.
|
||||
</p>
|
||||
<p>
|
||||
Hai dubbi su come funziona? Leggi le <%= link_to "domande frequenti", public_faq_path %>,
|
||||
scopri <%= link_to "Match Live TV per la pallavolo giovanile", public_pallavolo_path %>
|
||||
o <%= link_to "registra la squadra gratis", public_signup_path %>.
|
||||
<%= raw t(
|
||||
"home.seo_p3_html",
|
||||
faq_link: link_to(t("home.seo_faq_link"), public_faq_path),
|
||||
volleyball_link: link_to(t("home.seo_volleyball_link"), public_pallavolo_path),
|
||||
signup_link: link_to(t("home.seo_signup_link"), public_signup_path)
|
||||
) %>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
<% content_for :title, "Squadre su Match Live TV — Dirette e replay sport giovanili" %>
|
||||
<% content_for :meta_description, "Scopri le squadre sportive giovanili che trasmettono su Match Live TV. Cerca per nome, filtra per sport, trova dirette in corso e archivi replay." %>
|
||||
<% content_for :canonical_url, seo_absolute_url(public_team_pages_path(filter_params_for_canonical)) %>
|
||||
|
||||
<div class="wrap team-directory">
|
||||
<h1>Squadre su Match Live TV</h1>
|
||||
<p class="results-hint">
|
||||
Società e squadre con dirette, replay pubblici o partite in programma.
|
||||
Cerca la tua squadra e apri la pagina per seguire calendario e archivio.
|
||||
</p>
|
||||
|
||||
<%= form_with url: public_team_pages_path, method: :get, local: true, class: "team-directory-filters" do %>
|
||||
<div class="search-form team-directory-filters__search">
|
||||
<input
|
||||
type="search"
|
||||
name="q"
|
||||
value="<%= @query %>"
|
||||
placeholder="Nome squadra, società, città o palestra…"
|
||||
aria-label="Cerca squadra"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<button type="submit" class="btn btn-primary">Cerca</button>
|
||||
</div>
|
||||
|
||||
<div class="team-directory-filters__row">
|
||||
<div class="team-directory-filters__field">
|
||||
<label for="sport" class="team-directory-filters__label">Sport</label>
|
||||
<select name="sport" id="sport" class="team-directory-filters__select" onchange="this.form.requestSubmit()">
|
||||
<option value="">Tutti gli sport</option>
|
||||
<% @sport_options.each do |sport| %>
|
||||
<option value="<%= sport[:key] %>"<%= " selected" if @sport == sport[:key] %>><%= sport[:label] %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="team-directory-filters__field team-directory-filters__field--chips">
|
||||
<span class="team-directory-filters__label" id="team-filter-chips-label">Mostra</span>
|
||||
<div class="team-directory-chips" role="group" aria-labelledby="team-filter-chips-label">
|
||||
<label class="filter-chip<%= " is-active" if @live_filter %>">
|
||||
<%= check_box_tag :live, "1", @live_filter, id: "filter_live", class: "filter-chip__input", onchange: "this.form.requestSubmit()" %>
|
||||
<span class="filter-chip__face" aria-hidden="true">
|
||||
<span class="filter-chip__dot filter-chip__dot--live"></span>
|
||||
In diretta
|
||||
</span>
|
||||
</label>
|
||||
<label class="filter-chip<%= " is-active" if @replays_filter %>">
|
||||
<%= check_box_tag :replays, "1", @replays_filter, id: "filter_replays", class: "filter-chip__input", onchange: "this.form.requestSubmit()" %>
|
||||
<span class="filter-chip__face" aria-hidden="true">
|
||||
<span class="filter-chip__icon">▶</span>
|
||||
Con replay
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if @query.present? || @sport.present? || @live_filter || @replays_filter %>
|
||||
<div class="team-directory-filters__actions">
|
||||
<span class="team-directory-filters__label team-directory-filters__label--spacer" aria-hidden="true"> </span>
|
||||
<%= link_to "Azzera", public_team_pages_path, class: "btn btn-secondary team-directory-filters__reset" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @query.present? || @sport.present? || @live_filter || @replays_filter %>
|
||||
<p class="results-hint">
|
||||
<%= @entries.size %> squadre trovate
|
||||
<% if @query.present? %> per «<%= h @query %>»<% end %>
|
||||
<% if @sport.present? %> · <%= Sports::Catalog.find_optional(@sport)&.dig(:label) || @sport %><% end %>
|
||||
</p>
|
||||
<% else %>
|
||||
<p class="results-hint"><%= @entries.size %> squadre attive</p>
|
||||
<% end %>
|
||||
|
||||
<% if @entries.any? %>
|
||||
<div class="team-directory-grid">
|
||||
<% @entries.each do |entry| %>
|
||||
<% team = entry.team %>
|
||||
<% club = team.club %>
|
||||
<% logo = team.effective_logo_url.presence || club.effective_logo_url %>
|
||||
<%= link_to public_team_page_path(team.slug), class: "team-directory-card" do %>
|
||||
<div class="team-directory-card__media">
|
||||
<% if team.team_photo_url.present? %>
|
||||
<%= image_tag team.team_photo_url, alt: "", class: "team-directory-card__photo", loading: "lazy" %>
|
||||
<% elsif logo.present? %>
|
||||
<%= image_tag logo, alt: "", class: "team-directory-card__photo team-directory-card__photo--logo", loading: "lazy" %>
|
||||
<% else %>
|
||||
<div class="team-directory-card__photo team-directory-card__photo--fallback" aria-hidden="true">
|
||||
<%= team.name.first(2).upcase %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="team-directory-card__body">
|
||||
<p class="team-directory-card__club"><%= club.name %></p>
|
||||
<h2 class="team-directory-card__name"><%= team.name %></h2>
|
||||
<p class="team-directory-card__meta"><%= team.sport_label %></p>
|
||||
<div class="team-directory-card__badges">
|
||||
<% if entry.live_now %>
|
||||
<span class="badge badge-on-air">In diretta</span>
|
||||
<% end %>
|
||||
<% if entry.upcoming_count.positive? %>
|
||||
<span class="badge badge-scheduled"><%= entry.upcoming_count %> in programma</span>
|
||||
<% end %>
|
||||
<% if entry.replay_count.positive? %>
|
||||
<span class="badge badge-wait"><%= entry.replay_count %> replay</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="empty-state">
|
||||
<% if @query.present? || @sport.present? || @live_filter || @replays_filter %>
|
||||
<p><strong>Nessuna squadra trovata</strong> con i filtri selezionati.</p>
|
||||
<p><%= link_to "Mostra tutte le squadre attive", public_team_pages_path, class: "btn btn-secondary" %></p>
|
||||
<% else %>
|
||||
<p><strong>Nessuna squadra attiva al momento.</strong></p>
|
||||
<p>Quando una società avvierà dirette o pubblicherà replay, comparirà qui.</p>
|
||||
<%= link_to "Vai alle dirette live", public_live_index_path, class: "btn btn-secondary", style: "margin-top:12px;display:inline-block" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p class="team-directory-footer muted">
|
||||
<%= link_to "Dirette in corso", public_live_index_path %> ·
|
||||
<%= link_to "Archivio replay", public_replay_index_path %>
|
||||
</p>
|
||||
</div>
|
||||
@@ -0,0 +1,175 @@
|
||||
<% content_for :title, "#{@team.name} — #{@club.name} | Match Live TV" %>
|
||||
<% content_for :meta_description, team_page_meta_description(@team, @club) %>
|
||||
<% content_for :canonical_url, seo_absolute_url(public_team_page_path(@team.slug)) %>
|
||||
<% content_for :head do %>
|
||||
<script type="application/ld+json">
|
||||
<%= raw(team_page_structured_data(@team, @club).to_json) %>
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
<div class="wrap team-public-page">
|
||||
<nav class="team-dashboard-nav" aria-label="Percorso">
|
||||
<%= link_to "← Tutte le squadre", public_team_pages_path, class: "team-dashboard-nav__club" %>
|
||||
</nav>
|
||||
|
||||
<header class="roster-hero card team-public-hero" style="--club-primary:<%= @team.effective_primary_color %>;--club-secondary:<%= @team.effective_secondary_color %>">
|
||||
<div class="roster-hero__intro">
|
||||
<p class="roster-hero__club"><%= @club.name %></p>
|
||||
<h1 class="roster-hero__title"><%= @team.name %></h1>
|
||||
<p class="team-public-meta">
|
||||
<%= @team.sport_label %>
|
||||
<% if @live_sessions.any? %>
|
||||
· <span class="hero-live-dot" aria-hidden="true"></span> <strong>In diretta ora</strong>
|
||||
<% end %>
|
||||
</p>
|
||||
<% if @team.description.present? %>
|
||||
<div class="roster-hero__desc"><%= simple_format @team.description %></div>
|
||||
<% end %>
|
||||
<div class="team-public-actions">
|
||||
<% if @live_sessions.any? %>
|
||||
<%= link_to "Guarda la diretta", public_live_path(@live_sessions.first), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
<%= link_to "Tutte le dirette", public_live_index_path(club_id: @club.id), class: "btn btn-secondary" %>
|
||||
<% if @recordings.any? %>
|
||||
<%= link_to "Archivio replay", public_replay_index_path(team_id: @team.id), class: "btn btn-secondary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="roster-hero__media">
|
||||
<% logo = @team.effective_logo_url.presence || @club.effective_logo_url %>
|
||||
<% if @team.team_photo_url.present? %>
|
||||
<%= image_tag @team.team_photo_url, alt: @team.name, class: "roster-hero__photo" %>
|
||||
<% elsif logo.present? %>
|
||||
<%= image_tag logo, alt: @team.name, class: "roster-hero__photo roster-hero__photo--logo" %>
|
||||
<% else %>
|
||||
<div class="roster-hero__photo roster-hero__photo--empty team-public-logo-fallback" aria-hidden="true">
|
||||
<span><%= @team.name.first(2).upcase %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<% if @live_sessions.any? %>
|
||||
<section class="team-public-section" aria-labelledby="team-live-heading">
|
||||
<h2 id="team-live-heading" class="section-heading">In diretta adesso</h2>
|
||||
<div class="live-grid">
|
||||
<% @live_sessions.each do |session| %>
|
||||
<% match = session.match %>
|
||||
<% on_air = @online_paths.include?(session.mediamtx_path_name) %>
|
||||
<article class="live-card">
|
||||
<%= live_match_card_heading(match, link_team: false) %>
|
||||
<p class="meta">
|
||||
<% if match.location.present? %><%= match.location %> · <% end %>
|
||||
Match Live TV
|
||||
</p>
|
||||
<% if session.score_state %>
|
||||
<p class="card-score">
|
||||
<span class="card-sets"><%= live_score_sets_label(session.score_state, match) %></span>
|
||||
<% if live_score_partials_label(session.score_state).present? %>
|
||||
<span class="card-partials">Parziali: <%= live_score_partials_label(session.score_state) %></span>
|
||||
<% end %>
|
||||
<span class="card-points"><%= session.score_state.home_points %> - <%= session.score_state.away_points %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<div class="badges">
|
||||
<% if on_air %>
|
||||
<span class="badge badge-on-air">In onda</span>
|
||||
<% elsif session.paused? %>
|
||||
<span class="badge badge-connecting">In pausa</span>
|
||||
<% else %>
|
||||
<span class="badge badge-live">Live</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= link_to "Guarda diretta →", public_live_path(session), class: "btn-watch" %>
|
||||
</article>
|
||||
<% end %>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
<% if @upcoming_matches.any? %>
|
||||
<section class="team-public-section" aria-labelledby="team-upcoming-heading">
|
||||
<h2 id="team-upcoming-heading" class="section-heading<%= " section-heading--spaced" if @live_sessions.any? %>">Prossime partite</h2>
|
||||
<p class="results-hint">Programmate dal club: la diretta partirà quando lo staff avvierà la trasmissione.</p>
|
||||
<div class="live-grid upcoming-grid">
|
||||
<% @upcoming_matches.each do |match| %>
|
||||
<article class="live-card live-card--upcoming">
|
||||
<h3 class="live-card__title">
|
||||
<span class="live-card__matchup"><%= @team.name %> vs <%= match.opponent_name %></span>
|
||||
</h3>
|
||||
<p class="meta">
|
||||
<% if match.location.present? %><%= match.location %> · <% end %>
|
||||
<%= match.category.presence || @team.sport_label %>
|
||||
</p>
|
||||
<p class="upcoming-when"><%= live_scheduled_relative(match.scheduled_at) %></p>
|
||||
<div class="badges">
|
||||
<span class="badge badge-scheduled">In programma</span>
|
||||
</div>
|
||||
</article>
|
||||
<% end %>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
<% if @recordings.any? %>
|
||||
<section class="team-public-section" aria-labelledby="team-replays-heading">
|
||||
<h2 id="team-replays-heading" class="section-heading section-heading--spaced">Replay recenti</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 %>
|
||||
<span class="replay-card__duration"><%= rec.duration_label %></span>
|
||||
<span class="replay-card__play" aria-hidden="true">▶</span>
|
||||
</div>
|
||||
<div class="replay-card__body">
|
||||
<strong class="replay-card__title"><%= rec.title_or_default %></strong>
|
||||
<p class="replay-card__meta"><%= l_local(rec.recorded_at_or_fallback) %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<p class="team-public-more">
|
||||
<%= link_to "Vedi tutti i replay di #{@team.name} →", public_replay_index_path(team_id: @team.id) %>
|
||||
</p>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
<% if @roster_by_category %>
|
||||
<section class="team-public-section" aria-labelledby="team-roster-heading">
|
||||
<h2 id="team-roster-heading" class="section-heading section-heading--spaced">Organico</h2>
|
||||
<div class="team-public-roster">
|
||||
<% TeamRosterMember::DISPLAY_ORDER.each do |category| %>
|
||||
<% members = @roster_by_category[category] %>
|
||||
<% next if members.blank? %>
|
||||
<section class="roster-section card">
|
||||
<header class="roster-section__head">
|
||||
<h3 class="roster-section__title"><%= TeamRosterMember::CATEGORY_LABELS[category] %></h3>
|
||||
<span class="roster-section__count"><%= members.size %></span>
|
||||
</header>
|
||||
<div class="roster-list">
|
||||
<% members.each do |person| %>
|
||||
<%= render "shared/roster_person_card", person: person, team: @team, editable: false, compact: true %>
|
||||
<% end %>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
<% if @live_sessions.empty? && @upcoming_matches.empty? && @recordings.empty? %>
|
||||
<div class="empty-state empty-state--soft team-public-empty">
|
||||
<p><strong>Nessuna diretta o replay al momento.</strong></p>
|
||||
<p>Torna a controllare prima delle prossime gare: qui compariranno dirette, calendario e archivio della squadra.</p>
|
||||
<%= link_to "Vedi tutte le dirette", public_live_index_path, class: "btn btn-secondary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -55,6 +55,7 @@
|
||||
<div class="team-details-actions">
|
||||
<% if @can_manage %>
|
||||
<%= link_to "← Società", public_club_path(@club), class: "btn btn-secondary" %>
|
||||
<%= link_to "Pagina pubblica", public_team_page_path(@team.slug), class: "btn btn-secondary", target: "_blank", rel: "noopener" %>
|
||||
<%= link_to "Responsabili trasmissione", public_team_invite_path(@team), class: "btn btn-secondary" %>
|
||||
<% end %>
|
||||
<% if current_user.can_stream_for?(@team) %>
|
||||
|
||||
@@ -25,6 +25,21 @@
|
||||
</div>
|
||||
|
||||
<%= render "shared/branding_fields", record: @team, show_inherit_hint: true, legend: "Branding squadra (override)" %>
|
||||
|
||||
<%= label_tag "team[slug]", "Indirizzo pagina pubblica" %>
|
||||
<p class="branding-hint" style="margin-top:0">
|
||||
Genitori e tifosi trovano la squadra su
|
||||
<strong><%= MatchLiveTv.app_public_url.chomp("/") %>/squadre/<span id="team-slug-preview"><%= @team.slug %></span></strong>
|
||||
</p>
|
||||
<%= text_field_tag "team[slug]", @team.slug, pattern: "[a-z0-9]+(-[a-z0-9]+)*", title: "Solo lettere minuscole, numeri e trattini" %>
|
||||
|
||||
<%= label_tag "team[roster_public]", class: "checkbox-label", style: "display:flex;align-items:center;gap:8px;margin-top:16px" do %>
|
||||
<%= hidden_field_tag "team[roster_public]", "0" %>
|
||||
<%= check_box_tag "team[roster_public]", "1", @team.roster_public?, id: "team_roster_public" %>
|
||||
Mostra l'organico sulla pagina pubblica
|
||||
<% end %>
|
||||
<p class="branding-hint">Se attivo, giocatori e staff sono visibili a chiunque abbia il link. Puoi lasciarlo disattivato per privacy.</p>
|
||||
|
||||
<p class="branding-hint">
|
||||
Colori società:
|
||||
<span class="color-swatch" style="background:<%= @club.effective_primary_color %>"></span>
|
||||
|
||||
Reference in New Issue
Block a user