Fix and cleanup

clubs
Laurent 2 years ago
parent 12e4198432
commit a34e8b9e22
  1. 47
      tournaments/templates/tournaments/broadcasted_match.html
  2. 8
      tournaments/templates/tournaments/broadcasted_matches.html

@ -27,47 +27,36 @@
<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">
<span class="score ws" x-data="{ <span x-data="{
showScore(score, team) { showScore(score, team) {
let html = `<span class='` let html = `<span class='score ws w30px`
if (team.is_winner) html += `winner` if (team.is_winner) html += ` winner`
html += `'>` html += `'>`
html += score html += score
html += `</span>` html += `</span>`
if (match.has_walk_out) {
html += `<span class='score ws w60px'>`
if (team.walk_out) html += `WO`
html += `</span>`
}
return html return html
}, },
}" x-html="showScore(score, match.teams[i-1])"> }" x-html="showScore(score, match.teams[i-1])">
</span> </span>
</template>
</div>
</div>
<!-- </template>
{% if match.started %} <span x-data="{
{% for score in team.scores %} showWalkOut(match, team) {
<div class="scores"> let html = ``
<span class="score ws{% if team.is_winner %} winner{% endif %}">{{ score }}</span>
</div>
{% endfor %}
{% if match.has_walk_out %} if (match.has_walk_out) {
<span class="score ws w60px"> html += `<span class='score ws w60px'>`
{% if team.walk_out %}WO{% endif %} if (team.walk_out) html += `WO`
</span> html += `</span>`
{% endif %} }
{% else %} return html
<span class="score ws">{{ team.weight }}</span> },
{% endif %} }" x-html="showWalkOut(match, match.teams[i-1])">
--> </span>
</div>
</div>
<div x-show="i === 1"> <div x-show="i === 1">
<div class="bottom-border"></div> <div class="bottom-border"></div>

@ -72,11 +72,13 @@
<template x-for="match in paginatedMatches[i-1]" > <template x-for="match in paginatedMatches[i-1]" >
<div class="cell medium-6 large-3 my-block" x-show="active === i"> <div class="cell medium-6 large-3 my-block" x-show="active === i">
<div class="bubble">
{% include 'tournaments/broadcasted_match.html' %}
<!-- <div class="bubble">
<div class="flex-row"> <div class="flex-row">
<label class="left-label matchtitle"><span x-text="match.title"></span></label> <label class="left-label matchtitle"><span x-text="match.title"></span></label>
<!-- <label class="right-label info"><span x-text="match.date"></span></label> -->
</div> </div>
<template x-for="i in match.teams.length"> <template x-for="i in match.teams.length">
@ -148,7 +150,7 @@
<label class="right-label minor-info semibold"><span x-text="match.court"></span></label> <label class="right-label minor-info semibold"><span x-text="match.court"></span></label>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>

Loading…
Cancel
Save