Add podium styling and conditional rendering for players in musikgame detail template

This commit is contained in:
Edgar P. Burkhart 2025-06-15 13:12:24 +02:00
parent 33896916e6
commit b1ec960dfa
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 31 additions and 1 deletions

View file

@ -137,3 +137,27 @@ td.c, th.c {
table select {
margin-bottom: 0;
}
.podium {
> :first-child {
font-weight: 900;
font-size: 1.25em;
&::marker {
color: var(--pico-color-amber-200);
}
}
> :nth-child(2) {
font-weight: 800;
font-size: 1.1em;
&::marker {
color: var(--pico-color-grey-300);
}
}
> :nth-child(3) {
font-weight: 600;
font-size: 1.1em;
&::marker {
color: var(--pico-color-sand-300);
}
}
}

View file

@ -33,7 +33,13 @@
<h2>
<i class="ri-group-2-fill"></i> Joueurs
</h2>
<p>{{ musikgame.players.all|join:", " }}</p>
{% if musikgame.over %}
<ol class="podium">
{% for player in musikgame.players.all %}<li>{{ player.username }}</li>{% endfor %}
</ol>
{% else %}
<p>{{ musikgame.players.all|join:", " }}</p>
{% endif %}
<h2>
<i class="ri-music-2-fill"></i> Musiques
</h2>