From b1ec960dfa2a0a85659ca11f658211e76bf2a511 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 15 Jun 2025 13:12:24 +0200 Subject: [PATCH] Add podium styling and conditional rendering for players in musikgame detail template --- base/static/css/main.css | 24 +++++++++++++++++++++++ game/templates/game/musikgame_detail.html | 8 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/base/static/css/main.css b/base/static/css/main.css index 219394c..f1133eb 100644 --- a/base/static/css/main.css +++ b/base/static/css/main.css @@ -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); + } + } +} diff --git a/game/templates/game/musikgame_detail.html b/game/templates/game/musikgame_detail.html index 84d998d..f4720ef 100644 --- a/game/templates/game/musikgame_detail.html +++ b/game/templates/game/musikgame_detail.html @@ -33,7 +33,13 @@

Joueurs

-

{{ musikgame.players.all|join:", " }}

+ {% if musikgame.over %} +
    + {% for player in musikgame.players.all %}
  1. {{ player.username }}
  2. {% endfor %} +
+ {% else %} +

{{ musikgame.players.all|join:", " }}

+ {% endif %}

Musiques