|
121 | 121 | <% end %> |
122 | 122 |
|
123 | 123 | <!-- Match Results --> |
124 | | - <% if @matches_by_phase.any? %> |
| 124 | + <% if @matches_by_date.any? || @upcoming_matches.any? %> |
125 | 125 | <div style="margin-bottom:24px"> |
126 | 126 | <%= retro_panel(title: "Partidas", category: "// HISTÓRICO", footer: @season_data[:name]) do %> |
127 | | - <% @matches_by_phase.each do |phase, matches| %> |
| 127 | + <% if @upcoming_matches.any? %> |
128 | 128 | <div style="margin-bottom:20px"> |
129 | 129 | <div class="retro-sep" style="margin-bottom:12px"> |
130 | 130 | <div class="retro-sep-line"></div> |
131 | | - <span class="retro-sep-label"><%= phase_label(phase) %></span> |
| 131 | + <span class="retro-sep-label">PRÓXIMAS</span> |
132 | 132 | <div class="retro-sep-line-r"></div> |
133 | 133 | </div> |
| 134 | + <div style="display:grid;gap:6px"> |
| 135 | + <% @upcoming_matches.each do |match| %> |
| 136 | + <%= render partial: "seasons/match_row", locals: { match: match } %> |
| 137 | + <% end %> |
| 138 | + </div> |
| 139 | + </div> |
| 140 | + <% end %> |
134 | 141 |
|
| 142 | + <% @matches_by_date.each_with_index do |(date, matches), idx| %> |
| 143 | + <div style="margin-bottom:<%= idx < @matches_by_date.length - 1 ? '20px' : '0' %>"> |
| 144 | + <div class="retro-sep" style="margin-bottom:12px"> |
| 145 | + <div class="retro-sep-line"></div> |
| 146 | + <span class="retro-sep-label"><%= format_date_brt(date + " 00:00:00") %></span> |
| 147 | + <div class="retro-sep-line-r"></div> |
| 148 | + </div> |
135 | 149 | <div style="display:grid;gap:6px"> |
136 | 150 | <% matches.each do |match| %> |
137 | | - <% t1 = match["Team1"]; t2 = match["Team2"] %> |
138 | | - <% winner = match["Winner"]; played = winner.present? %> |
139 | | - <% t1s = match["Team1Score"].to_i; t2s = match["Team2Score"].to_i %> |
140 | | - |
141 | | - <div style="border:1px solid <%= played ? 'rgba(200,155,60,0.15)' : 'rgba(5,150,170,0.12)' %>;background:rgba(15,24,35,0.6);padding:10px 14px;display:flex;align-items:center;gap:10px"> |
142 | | - <div style="flex:1;display:flex;align-items:center;gap:6px;min-width:0;opacity:<%= played && winner != t1 ? '0.4' : '1' %>"> |
143 | | - <%= team_logo(t1, size: 22) %> |
144 | | - <span style="font-size:17px;font-weight:bold;color:rgba(255,255,255,0.85);font-family:var(--retro-font);overflow:hidden;text-overflow:ellipsis;white-space:nowrap"><%= team_abbr(t1) %></span> |
145 | | - </div> |
146 | | - |
147 | | - <div style="flex-shrink:0;text-align:center;min-width:56px"> |
148 | | - <% if played %> |
149 | | - <div style="display:flex;align-items:center;justify-content:center;gap:4px"> |
150 | | - <span style="font-size:18px;font-weight:900;font-family:var(--retro-font);color:<%= winner == t1 ? 'var(--color-kl-win)' : 'rgba(255,255,255,0.2)' %>"><%= t1s %></span> |
151 | | - <span style="color:rgba(255,255,255,0.15);font-size:16px">:</span> |
152 | | - <span style="font-size:18px;font-weight:900;font-family:var(--retro-font);color:<%= winner == t2 ? 'var(--color-kl-win)' : 'rgba(255,255,255,0.2)' %>"><%= t2s %></span> |
153 | | - </div> |
154 | | - <div style="font-size:17px;color:var(--retro-gold-dim);font-family:var(--retro-font);letter-spacing:0.08em;margin-top:1px">Bo<%= match["BestOf"].to_i > 0 ? match["BestOf"] : 1 %></div> |
155 | | - <% else %> |
156 | | - <span style="font-size:17px;font-weight:bold;color:rgba(255,255,255,0.15);font-family:var(--retro-font)">VS</span> |
157 | | - <% end %> |
158 | | - </div> |
159 | | - |
160 | | - <div style="flex:1;display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;opacity:<%= played && winner != t2 ? '0.4' : '1' %>"> |
161 | | - <span style="font-size:17px;font-weight:bold;color:rgba(255,255,255,0.85);font-family:var(--retro-font);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right"><%= team_abbr(t2) %></span> |
162 | | - <%= team_logo(t2, size: 22) %> |
163 | | - </div> |
164 | | - |
165 | | - <div style="flex-shrink:0;min-width:54px;text-align:right"> |
166 | | - <span style="font-size:16px;color:rgba(255,255,255,0.25);font-family:var(--retro-font)"><%= format_datetime_brt(match["DateTime_UTC"]) %></span> |
167 | | - </div> |
168 | | - </div> |
| 151 | + <%= render partial: "seasons/match_row", locals: { match: match } %> |
169 | 152 | <% end %> |
170 | 153 | </div> |
171 | 154 | </div> |
|
0 commit comments