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

@ -72,11 +72,13 @@
<template x-for="match in paginatedMatches[i-1]" >
<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">
<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>
<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>
</div>
</div>
</div> -->
</div>
</template>

Loading…
Cancel
Save