fix lucky loser everywhere

timetoconfirm
Raz 7 months ago
parent 840d11ea7e
commit 1c5cc25e49
  1. 9
      tournaments/static/tournaments/css/style.css
  2. 41
      tournaments/templates/tournaments/bracket_match_cell.html
  3. 33
      tournaments/templates/tournaments/broadcast/broadcasted_match.html
  4. 4
      tournaments/templates/tournaments/match_cell.html

@ -1105,3 +1105,12 @@ h-margin {
.odd-row { .odd-row {
background-color: #e6f2ff; /* Light blue */ background-color: #e6f2ff; /* Light blue */
} }
.player-flex-row {
display: flex;
justify-content: space-between;
height: 24px;
align-items: center;
gap: 8px;
margin-right: 8px;
}

@ -17,28 +17,31 @@
{% for team in match.teams %} {% for team in match.teams %}
<div class="match-result {% cycle 'bottom-border' '' %}"> <div class="match-result {% cycle 'bottom-border' '' %}">
<div class="player {% if team.names|length == 1 %}single-player{% else %}two-players{% endif %}"> <div class="player {% if team.names|length == 1 %}single-player{% else %}two-players{% endif %}">
{% if team.id %} <div class="player-flex-row">
<a href="{% url 'team-details' tournament.id team.id %}" class="player-link"> {% if team.id %}
{% endif %} <a href="{% url 'team-details' tournament.id team.id %}" class="player-link">
{% endif %}
{% if team.is_lucky_loser or team.walk_out == 1 %} <div>
<div class="overlay-text"> {% for name in team.names %}
{% if match.should_show_lucky_loser_status and team.is_lucky_loser %}(LL){% elif team.walk_out == 1 %}(WO){% endif %} <div class="semibold{% if team.walk_out == 1 %} strikethrough{% endif %}{% if team.is_winner %} winner{% endif %}">
</div> {% if name|length > 0 %}
{% endif %} {{ name }}
{% else %}
&nbsp;
{% endif %}
</div>
{% endfor %}
</div>
{% if team.id and team.weight %}
</a>
{% endif %}
{% for name in team.names %} {% if team.is_lucky_loser or team.walk_out == 1 %}
<div class="semibold{% if team.walk_out == 1 %} strikethrough{% endif %}{% if team.is_winner %} winner{% endif %}"> <div class="minor-info bold" style="height: 100%; padding-right: 20px;">
{% if name|length > 0 %} {% if match.should_show_lucky_loser_status and team.is_lucky_loser %}(LL){% endif %}
{{ name }} </div>
{% else %}
&nbsp;
{% endif %} {% endif %}
</div> </div>
{% endfor %}
{% if team.id %}
</a>
{% endif %}
</div> </div>
{% if match.has_walk_out %} {% if match.has_walk_out %}

@ -20,23 +20,22 @@
'single-player': match.teams[i-1].names.length === 1, 'single-player': match.teams[i-1].names.length === 1,
'two-players': match.teams[i-1].names.length === 2 'two-players': match.teams[i-1].names.length === 2
}"> }">
<!-- Show lucky loser or walkout status --> <div class="player-flex-row">
<template x-if="match.should_show_lucky_loser_status && match.teams[i-1].is_lucky_loser"> <div>
<div class="overlay-text right-label minor-info semibold">(LL)</div> <template x-for="name in match.teams[i-1].names">
</template> <div :class="{
<template x-if="match.teams[i-1].walk_out === 1"> 'bold': true,
<div class="overlay-text right-label minor-info semibold">(WO)</div> 'strikethrough': match.teams[i-1].walk_out === 1,
</template> 'winner': match.teams[i-1].is_winner
}">
<template x-for="name in match.teams[i-1].names"> <span x-text="name === '' ? ' ' : name"></span>
<div :class="{ </div>
'bold': true, </template>
'strikethrough': match.teams[i-1].walk_out === 1, </div>
'winner': match.teams[i-1].is_winner <template x-if="match.should_show_lucky_loser_status && match.teams[i-1].is_lucky_loser">
}"> <div class="minor-info semibold">(LL)</div>
<span x-text="name === '' ? ' ' : name"></span> </template>
</div> </div>
</template>
</div> </div>
<div class="scores"> <div class="scores">
<template x-for="score in match.teams[i-1].scores"> <template x-for="score in match.teams[i-1].scores">

@ -16,7 +16,7 @@
<div class="match-result {% cycle 'bottom-border' '' %}"> <div class="match-result {% cycle 'bottom-border' '' %}">
<div class="player {% if team.names|length == 1 %}single-player{% else %}two-players{% endif %}"> <div class="player {% if team.names|length == 1 %}single-player{% else %}two-players{% endif %}">
<div class="flex-row"> <div class="player-flex-row">
{% if team.id and team.weight %} {% if team.id and team.weight %}
<a href="{% url 'team-details' tournament.id team.id %}" class="player-link"> <a href="{% url 'team-details' tournament.id team.id %}" class="player-link">
{% endif %} {% endif %}
@ -34,7 +34,7 @@
{% if team.is_lucky_loser or team.walk_out == 1 %} {% if team.is_lucky_loser or team.walk_out == 1 %}
<div class="minor-info bold" style="height: 100%; padding-right: 20px;"> <div class="minor-info bold" style="height: 100%; padding-right: 20px;">
{% if match.should_show_lucky_loser_status and team.is_lucky_loser %}(LL){% elif team.walk_out == 1 %}(WO){% endif %} {% if match.should_show_lucky_loser_status and team.is_lucky_loser %}(LL){% endif %}
</div> </div>
{% endif %} {% endif %}
</div> </div>

Loading…
Cancel
Save