parent
ae968fcf46
commit
09e3de8f11
@ -0,0 +1,22 @@ |
|||||||
|
{% extends 'tournaments/broadcast_base.html' %} |
||||||
|
|
||||||
|
{% load static %} |
||||||
|
|
||||||
|
{% block head_title %}Broadcast{% endblock %} |
||||||
|
{% block first_title %}{{ tournament.event.display_name }}{% endblock %} |
||||||
|
{% block second_title %}Broadcast{% endblock %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
|
||||||
|
<div class="grid-x"> |
||||||
|
<div class="cell medium-6 large-6 topblock my-block"> |
||||||
|
<div class="bubble"> |
||||||
|
<div><a href="{% url 'broadcasted-matches' tournament.id %}">Matchs</a></div> |
||||||
|
<div><a href="{% url 'broadcasted-group-stages' tournament.id %}">Poules</a></div> |
||||||
|
<div><a href="{% url 'broadcasted-summons' tournament.id %}">Convocations</a></div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
{% endblock %} |
||||||
@ -0,0 +1,54 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html> |
||||||
|
{% load static %} |
||||||
|
|
||||||
|
<head> |
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
||||||
|
<link |
||||||
|
rel="stylesheet" |
||||||
|
href="{% static 'tournaments/css/foundation.min.css' %}" |
||||||
|
/> |
||||||
|
<link rel="stylesheet" href="{% static 'tournaments/css/style.css' %}" /> |
||||||
|
<link rel="stylesheet" href="{% static 'tournaments/css/broadcast.css' %}" /> |
||||||
|
|
||||||
|
<link |
||||||
|
rel="icon" |
||||||
|
type="image/png" |
||||||
|
href="{% static 'tournaments/images/favicon.png' %}" |
||||||
|
/> |
||||||
|
|
||||||
|
<script src="{% static 'tournaments/js/alpine.min.js' %}"></script> |
||||||
|
|
||||||
|
<title>{% block head_title %}Page Title{% endblock %}</title> |
||||||
|
|
||||||
|
</head> |
||||||
|
|
||||||
|
<body> |
||||||
|
<div class="wrapper"> |
||||||
|
<header> |
||||||
|
<div class="grid-x"> |
||||||
|
<div class="cell medium-6 large-6 topblock my-block"> |
||||||
|
<div class="bubble"> |
||||||
|
<img |
||||||
|
src="{% static 'tournaments/images/PadelClub_logo_512.png' %}" |
||||||
|
class="logo inline" |
||||||
|
/> |
||||||
|
<div class="inline"> |
||||||
|
<h1 class="club">{% block first_title %}Page Title{% endblock %}</h1> |
||||||
|
<h1 class="event">{% block second_title %}Page Title{% endblock %}</h1> |
||||||
|
<!-- <span>Propulsé par Padel Club</span> --> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</header> |
||||||
|
|
||||||
|
<main> |
||||||
|
<!-- Content --> |
||||||
|
{% block content %} |
||||||
|
<!-- The content of child templates will be inserted here --> |
||||||
|
{% endblock %} |
||||||
|
</main> |
||||||
|
</div> |
||||||
|
</body> |
||||||
|
</html> |
||||||
@ -0,0 +1,131 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
{% load static %} |
||||||
|
<html> |
||||||
|
<head> |
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
||||||
|
<link rel="stylesheet" href="{% static 'tournaments/css/foundation.min.css' %}" /> |
||||||
|
<link rel="stylesheet" href="{% static 'tournaments/css/style.css' %}" /> |
||||||
|
<link rel="stylesheet" href="{% static 'tournaments/css/broadcast.css' %}" /> |
||||||
|
|
||||||
|
<link rel="icon" type="image/png" href="{% static 'tournaments/images/favicon.png' %}" /> |
||||||
|
|
||||||
|
<title>Padel</title> |
||||||
|
|
||||||
|
<script src="{% static 'tournaments/js/alpine.min.js' %}"></script> |
||||||
|
|
||||||
|
</head> |
||||||
|
|
||||||
|
<body x-data="{ |
||||||
|
paginatedGroupStages: null, |
||||||
|
active: 1, |
||||||
|
retrieveMatches() { |
||||||
|
fetch('/tournament/{{ tournament.id }}/group-stages/json/') |
||||||
|
.then(res => res.json()) |
||||||
|
.then((data) => { |
||||||
|
this.paginatedGroupStages = this.paginate(data, 4) |
||||||
|
}) |
||||||
|
}, |
||||||
|
paginate(array, pageSize) { |
||||||
|
let paginatedArray = []; |
||||||
|
for (let i = 0; i < array.length; i += pageSize) { |
||||||
|
paginatedArray.push(array.slice(i, i + pageSize)); |
||||||
|
} |
||||||
|
return paginatedArray; |
||||||
|
}, |
||||||
|
loop() { |
||||||
|
this.retrieveMatches() |
||||||
|
setInterval(() => { |
||||||
|
this.retrieveMatches() |
||||||
|
this.active = this.active === this.paginatedGroupStages.length ? 1 : this.active+1 |
||||||
|
}, 15000) |
||||||
|
} |
||||||
|
|
||||||
|
}" x-init="loop()"> |
||||||
|
|
||||||
|
<div class="wrapper"> |
||||||
|
<main class="page-body"> |
||||||
|
<div class="container"> |
||||||
|
|
||||||
|
<div class="grid-x"> |
||||||
|
<div class="cell medium-6 large-6 topblock my-block"> |
||||||
|
<div class="bubble"> |
||||||
|
<img |
||||||
|
src="{% static 'tournaments/images/PadelClub_logo_512.png' %}" |
||||||
|
class="logo inline" |
||||||
|
/> |
||||||
|
<div class="inline"> |
||||||
|
<h1 class="club">{{ tournament.name }}</h1> |
||||||
|
<h1 class="event">Poules</h1> |
||||||
|
<!-- <span>Propulsé par Padel Club</span> --> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="grid-x padding-bottom"> |
||||||
|
|
||||||
|
<template x-for="i in paginatedGroupStages.length" > |
||||||
|
<template x-for="group_stage in paginatedGroupStages[i-1]" > |
||||||
|
|
||||||
|
<div class="cell medium-6 large-3 my-block" x-show="active === i"> |
||||||
|
<div class="dark_bubble"> |
||||||
|
|
||||||
|
<div class="flex-row"> |
||||||
|
<label class="left-label matchtitle white"><span x-text="group_stage.title"></span></label> |
||||||
|
<!-- <label class="right-label info"><span x-text="group_stage.date"></span></label> --> |
||||||
|
</div> |
||||||
|
|
||||||
|
<template x-for="i in group_stage.teams.length"> |
||||||
|
|
||||||
|
<div> |
||||||
|
<div class="table-row-2-colums team-names-box padding-bottom-small"> |
||||||
|
|
||||||
|
<div class="table-cell table-cell-large"> |
||||||
|
<template x-for="name in group_stage.teams[i-1].names"> |
||||||
|
|
||||||
|
<div class="semibold" x-data="{ |
||||||
|
showName(name, team) { |
||||||
|
let html = `<span class='` |
||||||
|
if (team.is_winner) html += `winner` |
||||||
|
html += `'>` |
||||||
|
html += name |
||||||
|
html += `</span>` |
||||||
|
return html |
||||||
|
}, |
||||||
|
}" x-html="showName(name, group_stage.teams[i-1])"> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
</div> |
||||||
|
<div class="table-cell center"> |
||||||
|
<div class="score ws"><span x-text="group_stage.teams[i-1].win_loss"></span></div> |
||||||
|
<div class="ws"><span x-text="group_stage.teams[i-1].diff"></span></div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div x-show="i === 1"> |
||||||
|
<div class="bottom-border"></div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<div class="top-margin flex-row"> |
||||||
|
<label class="left-label minor-info"><span class="beige" x-text="group_stage.duration"></span></label> |
||||||
|
<!-- <label class="right-label minor-info"><span x-text="group_stage.court"></span></label> --> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</template> |
||||||
|
</template> |
||||||
|
|
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
</main> |
||||||
|
</div> |
||||||
|
|
||||||
|
</body> |
||||||
|
</html> |
||||||
@ -0,0 +1,70 @@ |
|||||||
|
{% extends 'tournaments/broadcast_base.html' %} |
||||||
|
|
||||||
|
{% block head_title %}Convocations{% endblock %} |
||||||
|
{% block first_title %}{{ tournament.name }}{% endblock %} |
||||||
|
{% block second_title %}Convocations{% endblock %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
|
||||||
|
{% load static %} |
||||||
|
|
||||||
|
|
||||||
|
<div x-data="{ |
||||||
|
paginatedMatches: null, |
||||||
|
active: 1, |
||||||
|
retrieveMatches() { |
||||||
|
fetch('/tournament/{{ tournament.id }}/summons/json/') |
||||||
|
.then(res => res.json()) |
||||||
|
.then((data) => { |
||||||
|
this.paginatedMatches = this.paginate(this.paginate(data, 16), 8) |
||||||
|
}) |
||||||
|
}, |
||||||
|
paginate(array, pageSize) { |
||||||
|
let paginatedArray = []; |
||||||
|
for (let i = 0; i < array.length; i += pageSize) { |
||||||
|
paginatedArray.push(array.slice(i, i + pageSize)); |
||||||
|
} |
||||||
|
return paginatedArray; |
||||||
|
}, |
||||||
|
loop() { |
||||||
|
this.retrieveMatches() |
||||||
|
setInterval(() => { |
||||||
|
this.retrieveMatches() |
||||||
|
this.active = this.active === this.paginatedMatches.length ? 1 : this.active+1 |
||||||
|
}, 15000) |
||||||
|
} |
||||||
|
|
||||||
|
}" x-init="loop()"> |
||||||
|
|
||||||
|
|
||||||
|
<div class="grid-x padding-bottom"> |
||||||
|
<template x-for="i in paginatedMatches.length" > |
||||||
|
<template x-for="column in paginatedMatches[i-1]" > |
||||||
|
<div class="cell medium-6 large-6 topblock my-block"> |
||||||
|
<div class="bubble"> |
||||||
|
<template x-for="summon in column" > |
||||||
|
<div class="table-row-4-colums bottom-border"> |
||||||
|
<div class="table-cell table-cell-large semibold"> |
||||||
|
<template x-for="i in summon.names.length"> |
||||||
|
<span x-text="summon.names[i-1]"></span> |
||||||
|
</template> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="table-cell"><span x-text="summon.weight"></span></div> |
||||||
|
<div class="table-cell large center"><span x-text="summon.date"></span></div> |
||||||
|
<div class="table-cell"><div class="mybox center"><span x-text="summon.stage"></span></div></div> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</template> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %} |
||||||
Loading…
Reference in new issue