new style list of tournaments

sync_v2
Raz 7 months ago
parent 5d5aba938b
commit 42cf4abbd5
  1. 8
      tournaments/static/tournaments/css/style.css
  2. 54
      tournaments/templates/tournaments/tournaments.html

@ -629,6 +629,14 @@ h-margin {
justify-content: space-between; justify-content: space-between;
} }
.table-row-5-colums-tournament.footer {
grid-template-columns: 1fr; /* Override to just 2 columns for header */
text-align: center; /* Center the text content */
width: 100%;
color: gray;
text-decoration: underline !important; /* Ensures the link is underlined */
}
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
/* Adjust breakpoint as needed */ /* Adjust breakpoint as needed */
.table-row-5-colums-tournament { .table-row-5-colums-tournament {

@ -23,43 +23,48 @@
<div class="table-row-5-colums-tournament header"> <div class="table-row-5-colums-tournament header">
<label class="title">En cours</label> <label class="title">En cours</label>
</div>
{% for tournament in live %}
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
<div class="table-row-5-colums-tournament footer">
{% if live|length >= 10 %} {% if live|length >= 10 %}
<div class="mybox small"> <div class="small">
{% if club %} {% if club %}
<a href="{% url 'tournaments' %}?filter=1&club={{ club.id }}">tout voir</a> <a href="{% url 'tournaments' %}?filter=1&club={{ club.id }}">voir tous les tournois en cours</a>
{% else %} {% else %}
<a href="{% url 'tournaments' %}?filter=1">tout voir</a> <a href="{% url 'tournaments' %}?filter=1">voir tous les tournois en cours</a>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% for tournament in live %}
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
{% endif %} {% endif %}
{% if future %} {% if future %}
<div class="table-row-5-colums-tournament header"> <div class="table-row-5-colums-tournament header">
<label class="title">À venir</label> <label class="title">À venir</label>
{% if future|length >= 10 %} </div>
<div class="mybox small">
{% for tournament in future %}
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
<div class="table-row-5-colums-tournament footer">
{% if live|length >= 10 %}
<div class="small">
{% if club %} {% if club %}
<a href="{% url 'tournaments' %}?filter=0&club={{ club.id }}">tout voir</a> <a href="{% url 'tournaments' %}?filter=0&club={{ club.id }}">voir tous les tournois à venir</a>
{% else %} {% else %}
<a href="{% url 'tournaments' %}?filter=0">tout voir</a> <a href="{% url 'tournaments' %}?filter=0">voir tous les tournois à venir</a>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% for tournament in future %}
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
{% endif %} {% endif %}
</div> </div>
@ -73,20 +78,21 @@
<div class="table-row-5-colums-tournament header"> <div class="table-row-5-colums-tournament header">
<label class="title">Terminés</label> <label class="title">Terminés</label>
{% if ended|length >= 10 %} </div>
<div class="mybox small"> {% for tournament in ended %}
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
<div class="table-row-5-colums-tournament footer">
{% if live|length >= 10 %}
<div class="small">
{% if club %} {% if club %}
<a href="{% url 'tournaments' %}?filter=2&club={{ club.id }}">tout voir</a> <a href="{% url 'tournaments' %}?filter=2&club={{ club.id }}">voir tous les tournois terminés</a>
{% else %} {% else %}
<a href="{% url 'tournaments' %}?filter=2">tout voir</a> <a href="{% url 'tournaments' %}?filter=2">voir tous les tournois terminés</a>
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% for tournament in ended %}
{% include 'tournaments/tournament_row.html' %}
{% endfor %}
</div> </div>
</div> </div>
{% endif %} {% endif %}

Loading…
Cancel
Save