From a53fa2cb06f4ef96d8058a772cc0dfa86467682e Mon Sep 17 00:00:00 2001 From: t22couch <thibaud.couchet@imt-atlantique.net> Date: Wed, 12 Mar 2025 23:22:43 +0100 Subject: [PATCH] Couleur du ranking --- AppGCC/AppGCC/templates/ranking.html | 33 +++++++++++++++++++++------ AppGCC/daily_challenges.csv | 1 + AppGCC/db.sqlite3 | Bin 131072 -> 131072 bytes AppGCC/scores.csv | 1 + AppGCC/users.csv | 1 + 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/AppGCC/AppGCC/templates/ranking.html b/AppGCC/AppGCC/templates/ranking.html index 01dafb4..0ac4e67 100644 --- a/AppGCC/AppGCC/templates/ranking.html +++ b/AppGCC/AppGCC/templates/ranking.html @@ -3,22 +3,41 @@ <head> <title>Classement</title> <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> <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"> <h2 class="text-3xl font-bold text-[#102564] text-center mb-6">Classement</h2> <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 %} - <li class="flex items-center justify-between p-4 bg-gray-100 rounded-lg shadow-lg hover:shadow-xl transition duration-300"> - <div class="flex flex-col"> - <span class="text-lg font-medium text-[#102564]">{{ user.username }}</span> - <span class="text-sm text-gray-500">Points: {{ user.score }}</span> + <li class="flex items-center justify-between p-4 + {% if forloop.counter == 1 %} + bg-gradient-to-r from-yellow-500 to-yellow-400 text-white text-2xl + {% 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> - <span class="text-sm text-gray-500">{{ forloop.counter }}</span> + <span class="font-medium">{{ forloop.counter }}</span> </li> {% endfor %} - </ul> </div> diff --git a/AppGCC/daily_challenges.csv b/AppGCC/daily_challenges.csv index 3cb403f..438c70b 100644 --- a/AppGCC/daily_challenges.csv +++ b/AppGCC/daily_challenges.csv @@ -8,3 +8,4 @@ 2025-03-12,,20,27,21 2025-03-12,17,18,21,30 2025-03-12,18,16,22,30 +2025-03-12,19,28,18,22 diff --git a/AppGCC/db.sqlite3 b/AppGCC/db.sqlite3 index eb72f9af66c28b8622af1470cdf392b46c5d79fa..5c56fd9b9bc7474e650944e45a79315ad2337988 100644 GIT binary patch delta 619 zcmaixO>fe00LHCk3{+aRhecf$k(rn*|E=$|+!%#17`3D0rCeA`3vGEXg#rhG_ytrB zizfRDO9%%OuYLqi#?vmw>psAyanWQ46O-ro<av_cZ#wl&r@l8&psly-F=%UXT-x!X zYbzcSItdyOy8N<(V;<ChI$u40e%pV#n6>>A2fcTz9QB0)0iQn_2vW&}tQ9#yIMPii z#<>h@kb`E|<?$j>tmO7bbV}3d7*1dW4KNbm#8ZNZ;7o*KwkeY3DAsXo-FAM*`FDv7 z<8<rc_3K(-xo-Vf@u2Yee6<tw!skdFzF5qb@O{J+f^JNq%ZpccA5BKh@qq3qH5VJv zt}|%ZdYB&D^`Q~wOwOuTxAoL8Z}qUWYef$Yfo+uBmL~9^p9LIe*fCYz8|Dj5OR1Nw zzSG!^tE`w2*q3ZRoy8elP)ah*=Z#9D8)wR?hQN#tYAuipTdJ1o>~$s@EgxVOsGD}U zEBD4=uv@N?SYGTqE!D*g6Q>O--7Fne_EUBtF&>sOy=+a%m{gssONE##xpG!CosOK8 zs)IH+I;sIz?DzQr9>JYnPEaE41Ym_BUXt{<3o4olsxej)icVUrn#K#It5jWuXE?qB zNbE0Pg1I4q!fA|LK70S&3nNM78+?T{kr46@{<@fbhBr4o8R&lyUtgYmygY+8#0P)8 UUQgcH@I;|G`0)57@e}&=3$>uY?f?J) delta 469 zcmajb&u-FS008hbb$^^m8{uG_W^p<aFWtWO+uDBIN@0Up)_yIpr5CrZ4EQLtrK6S} z9K;t;IV}1RO9%%Ouf`|vWW4K{2bg;G<_r7|zwvl=JYIeKh|0ZttWvqzslBtDd9Xx7 z>Uy(HW#`{^ctB^?veT8*+-&me?mSBtOLT@=Ojm-<J8X$r%qCx%`Qr7xhgWAp&>Dnp zH$^`5VcLQ|>52V5OeE+vlL&4%50eIoN_vYZ*fcoLMh12-hpNdT4oij$aS&Es?7ynU zqSP&@gooW!dwFE3Zqus?!-kH9D2+lO#@Mk#t4xY<Ti+F-<yL_fU+EY%B(oqwQ6H3K z4P3w)DiFzWdG-82Q$`U!t|g$~u~JPI+lm<lxK|u#_KCtP^{7+{DpDtDIT03$#0ijS z1~8G2NHK}?{AE-x==qw2kIM>Z`skoMa+8juUl7X}r6b%O)}Je3A63wvcX(!dnlAuh zj{}es#3zD~2fKM5Y$GHCS)M=r@N=1AzO!Za2lJclvCr7|v&k1`Ym2T@|4V#xd-Lh` YhT1Uh|4XiI&<Zu>KCWNy|Ditr1%YpuaR2}S diff --git a/AppGCC/scores.csv b/AppGCC/scores.csv index 786a23c..d3033a6 100644 --- a/AppGCC/scores.csv +++ b/AppGCC/scores.csv @@ -2,3 +2,4 @@ user_id,score 2,49 17,10 18,26 +19,36 diff --git a/AppGCC/users.csv b/AppGCC/users.csv index aa3eb09..14e763d 100644 --- a/AppGCC/users.csv +++ b/AppGCC/users.csv @@ -4,3 +4,4 @@ 15,uuuuuuuu 17,oiewuytourytyretyutyttyrtyruryturyturtyruty 18,yyyyy +19,ttrertertet -- GitLab