Fix and cleanup

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

@ -27,13 +27,23 @@
<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>`
return html
},
}" x-html="showScore(score, match.teams[i-1])">
</span>
</template>
<span x-data="{
showWalkOut(match, team) {
let html = ``
if (match.has_walk_out) { if (match.has_walk_out) {
html += `<span class='score ws w60px'>` html += `<span class='score ws w60px'>`
@ -43,32 +53,11 @@
return html return html
}, },
}" x-html="showScore(score, match.teams[i-1])"> }" x-html="showWalkOut(match, match.teams[i-1])">
</span> </span>
</template>
</div> </div>
</div> </div>
<!--
{% 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 %}
{% if match.has_walk_out %}
<span class="score ws w60px">
{% if team.walk_out %}WO{% endif %}
</span>
{% endif %}
{% else %}
<span class="score ws">{{ team.weight }}</span>
{% endif %}
-->
<div x-show="i === 1"> <div x-show="i === 1">
<div class="bottom-border"></div> <div class="bottom-border"></div>
</div> </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