Skip to content
Snippets Groups Projects
Commit a53fa2cb authored by COUCHET Thibaud's avatar COUCHET Thibaud
Browse files

Couleur du ranking

parent ca9131c7
No related branches found
No related tags found
No related merge requests found
...@@ -3,22 +3,41 @@ ...@@ -3,22 +3,41 @@
<head> <head>
<title>Classement</title> <title>Classement</title>
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
</head> </head>
<body class="bg-[#dfdbec] flex items-center justify-center min-h-screen p-6"> <body class="bg-[#dfdbec] flex items-center justify-center min-h-screen p-6">
<div class="bg-white p-8 rounded-2xl shadow-2xl w-full max-w-3xl"> <div class="bg-white p-8 rounded-2xl shadow-2xl w-full max-w-3xl">
<h2 class="text-3xl font-bold text-[#102564] text-center mb-6">Classement</h2> <h2 class="text-3xl font-bold text-[#102564] text-center mb-6">Classement</h2>
<ul class="space-y-4"> <ul class="space-y-4">
<!-- Loop through the ranking and display their username and points from [{'username': 'Thibaud', 'score': 49}] and classement far right-->
{% for user in ranking %} {% for user in ranking %}
<li class="flex items-center justify-between p-4 bg-gray-100 rounded-lg shadow-lg hover:shadow-xl transition duration-300"> <li class="flex items-center justify-between p-4
<div class="flex flex-col"> {% if forloop.counter == 1 %}
<span class="text-lg font-medium text-[#102564]">{{ user.username }}</span> bg-gradient-to-r from-yellow-500 to-yellow-400 text-white text-2xl
<span class="text-sm text-gray-500">Points: {{ user.score }}</span> {% elif forloop.counter == 2 %}
bg-gradient-to-r from-gray-400 to-gray-300 text-white text-xl
{% elif forloop.counter == 3 %}
bg-gradient-to-r from-[#cd7f32] to-[#b56d4e] text-white text-xl
{% else %}
bg-gray-100 text-[#102564] text-lg
{% endif %}
rounded-lg shadow-lg hover:shadow-xl transition duration-300">
<div class="flex items-center space-x-3">
{% if forloop.counter == 1 %}
<i class="fas fa-medal text-yellow-300"></i>
{% elif forloop.counter == 2 %}
<i class="fas fa-medal text-gray-200"></i>
{% elif forloop.counter == 3 %}
<i class="fas fa-medal text-[#d49e6a]"></i>
{% endif %}
<div class="flex flex-col">
<span class="font-medium">{{ user.username }}</span>
<span class="text-sm text-gray-500">Points: {{ user.score }}</span>
</div>
</div> </div>
<span class="text-sm text-gray-500">{{ forloop.counter }}</span> <span class="font-medium">{{ forloop.counter }}</span>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
......
...@@ -8,3 +8,4 @@ ...@@ -8,3 +8,4 @@
2025-03-12,,20,27,21 2025-03-12,,20,27,21
2025-03-12,17,18,21,30 2025-03-12,17,18,21,30
2025-03-12,18,16,22,30 2025-03-12,18,16,22,30
2025-03-12,19,28,18,22
No preview for this file type
...@@ -2,3 +2,4 @@ user_id,score ...@@ -2,3 +2,4 @@ user_id,score
2,49 2,49
17,10 17,10
18,26 18,26
19,36
...@@ -4,3 +4,4 @@ ...@@ -4,3 +4,4 @@
15,uuuuuuuu 15,uuuuuuuu
17,oiewuytourytyretyutyttyrtyruryturyturtyruty 17,oiewuytourytyretyutyttyrtyruryturyturtyruty
18,yyyyy 18,yyyyy
19,ttrertertet
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment